Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Each entry in the Application Dictionary corresponds to a view, or
  perspective, on your database. A view is not the same as a data file.

  At the "top" of a view is its Master Data File, known in the Artful
  Dictionary as FILE_NAME. The master data file must have at least one
  index, known as its primary index. This index must uniquely identify
  each record in the table. For example, the primary index on a Customer
  file might reference the Account_No field, where each customer has a
  unique account number.

  A view may consist of several data files, each with one or more indexes,
  and all the files tied together in a web of relationships. In the sample
  program AAI, the Customer View looks like this:

  Files         Description                   Relate via
  -----------------------------------------------------------------
  CUSTOMER      Master Data File
  ORDERS        a child of customer           Account_No
  ORD_ITEM      a child of orders             Order_Num
  PRODUCT       a lookup from order items     Product_No
  PAYMENTS      a child of customer           Account_No
  INVOICES      a child of customer           Account_No

  This, when you are in the Customer window, the Zoom command
  provides access to Orders, Invoices and Payments. If you zoom to
  Orders, you enter the Orders View, which looks quite similar
  but is slightly different:

  Files         Description                   Relate via
  -----------------------------------------------------------------
  ORDERS        Master Data File
  CUSTOMER      a lookup from orders          Account_No
  ORD_ITEM      a child of orders             Order_Num
  PRODUCT       a lookup from order items     Product_No
  PAYMENTS      a lookup from orders          Account_No
  INVOICES      a lookup from orders          Account_No

Notes

  Because of the very general nature of the Artful Dictionary,
  one point is extremely important:

  You must name relating fields identically in both tables.

  Otherwise, the dictionary routines will not have a way of
  validating your relationship setup. If you name the fields
  differently (i.e. Order_Num in one file, Order_No in the
  other), you'll get a message that tells you the engine is
  unable to set the particular relationship. (Your program may
  still work, however. Rename one of the fields and the problem
  message will disappear.)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson