Tuto WEBDEV 25
Part 2: My first database 79 We are going to create the items of the "Orders" data file. In the data file description window, you will notice that an item has already been automatically created: "OrdersID". This item corresponds to the automatic file identifier. This item consists of the letters "ID" and the name of the data file. We are going to create the other items of this data file. ▶ First, we are going to create the "Date" item. This item will contain the order date. 1. In the description window of items, double-click in the "Name" column of first empty row. This column automatically becomes editable. Type "Date". 2. Click the "Caption" column. The item name is automatically displayed. We are going to modify the item caption by clicking on it: type "Order date". In the "Type" column, the "Text" type is automatically selected. Expand the list and select the "Date" type. 3. This item will be a key item (index) in our data file: the keys are used to accelerate the accesses to data and the sorts. Remark The concept of key is part of the item characteristics. When creating an item, you have the ability to specify whether it is: • not key, • unique key: the value of this key will be unique in the entire data file (i.e. in all the data file records), • key with duplicates: the value of this key can be found several times in the data file. • For a database in SQL format, the engine is using the indexes at the best. • For a sequential browse of a data file, all you have to do is specify the browse index (which means the key).
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==