Access

          click on  blank database – in right column

          click on Tables – under Objects in left column

          use Design View – provides you with ability to identify key

 

          KEY

·        A group of one or more attributes identifying a unique row in a relation.

·        Because relations may not have duplicate rows, every relation must have at lease one key which is the composite of all the attributes of the relation.

·        A key is sometimes called a logical key.

·        NOTE:  with some relational DBMS products, an index on a column is used to improve access and sorting speed.  It is sometimes called a physical key.

 

          PRIMARY KEY

·        A candidate key selected to be the key of a relation;

·        The primary key is used as a foreign key for representing relationships

 

          FOREIGN KEY

·        An attribute that is a key of one or more relations other than the one in which it appears.

·        Used to represent relationships.

 

         create a table which will hold department data

          type in DepartmentName – field text – size 50 is fine

         enter remaining attributes (i.e. field names)

         save table as DEPARTMENT

 

         create another table which will hold employee data

         enter desired attributes

         save table as EMPLOYEE

 

         click on Tools

          choose relationships

          put both tables on the surface by highlighting each and clicking on add

          close Show Table

          connect the DepartmentName fields in the two tables....

an edit relationships window will open – click on enforce referential integrity

          click on create

 

          REFERENTIAL INTEGRITY CONSTRAINT

·        A relationship constrint on foreign key values.

·        A referntial integrity constraint specifies that the values of a foreign key must be a subset of the primary key to which it refers.

 

          open Form Wizard

          add both tables to the wizard – an attribute at a time using >   or all of the attributes at once using >>

          notice the dotted notation

          keep clicking on next until finish appears then click on finish

          you can now enter data using the form

 

          click on Reports