Microsoft Access 2000 Courses | Microsoft Access 2002 Courses | Microsoft Access 2003 Courses |
Save money with an Access 2003 SAVE IT Scheme Access Course Dates & Pricing Page 2The next stage is for Access to "Enforce referential integrity" between these tables. That means, in essence, that it will ensure that the data is kept consistent between the two tables. If you try to delete a record from the customers table, and any orders exist for that customer, Access simply says "You can't do that". If you try to change the ID for a customer, Access will not allow this if orders exist against that CustomerID. Of course, there may be times when you really do want to remove a customer who has open orders - in which case you have to option of telling Access to allow this, but to ensure that the related orders are automatically removed too, or to allow you to change the customer's ID, but to pass that change to the related orders. In this way the data is kept consistent between tables, and there can never be "orphaned" records - for example orders placed against customers who no longer exist.
This is where Access, as a relational database, scores over the databasing capabilities of Excel, which is primarily an analysis tool. In Excel, data can be stored in a worksheet, which looks very like an Access table. However, although multiple worksheets can exist within a workbook, there is no way of linking them in a structured, enforceable way. Each worksheet is essentially an unrelated collection of data - it is known as a flat database system, in contrast to a relational database system. |
|||||||||