Relational
databases
Practical
definition: Organized collection of
data
stored in logically related tables.
Example:
1.
Open the
Northwind training database in MS Access 2003
(C:\TEMP\NorthwindTraining.mdb in 116 PHTC) by double-clicking on
the file name or by opening MS Access from the Start menu and locating
the database under File/Open. The database opens behind a "splash
screen":
(NOTE:
For practice on your own computer, make a
copy of the Northwind database before starting; or start in a blank new
database and import the Northwind tables you need.)
2. Close the splash screen by clicking OK.
The Main Switchboard form becomes visible in front of the database
window:
3.
Close the Main Switchboard by clicking on Display Database
Window. Verify that "Tables" is selected in the Objects bar on
the left.
4. Double-click on the Products table to see the data (open it
in Datasheet view, in MS Access terminology). A partial view:
5. Change to table Design view by clicking on the
View button (circled above) and find
the primary key. To check for other indexed columns, select
Indexes from the View menu:
6. Close the table
Referential
integrity constraints: Primary /
foreign
key relationships or rules defined using SQL or vendor extensions that
prevent loss or unwanted modification of data and maintain data
consistency throughout all tables in the database.
Example:
Relationships diagram in the Northwind database
1. Click the Relationships button (circled below) or choose Tools / Relationships:
The relationships window opens:
2. Find the Products table and its related
table
or tables.
3. Note the primary key and two foreign
keys in
the Products table.