What is a database? What can I do in Microsoft Access? Some things you ought to know before using Access Basics: Working with a table (Ex. 1) Tables and Forms (Ex. 2) Filters and Sorting (Ex. 3) Relational Databases: a short overview

You can relate data in one table to data in another table if those two tables share a common field (or "attribute"). For example, John Doe is both a student at Hopkins and a former military man. Does Hopkins need to know everything about his military history? No -- it's unlikely that all Hopkins students have that information. Do his former commanding officers need to know what courses he's taking? No. It would be easier to match John's info from the Hopkins database to info in a military database if you needed to know something about his military history. You would use some bit of information about John that would be in each database to link the two together. This relieves data redundancy and can help keep data valid (by checking it from multiple tables).

There are several kinds of relationships. A one-to-one relationship indicates that one record in a table can match one and only one from another table. In this case, you would use a piece of data that is unique for each record in a table (often something called a primary key, which is a unique identifier for each record) and link those two. Example: John Doe's SSN from one table to his SSN in another.

A one-to-many relationship means that one record in one table can have many related records in another, but records from the other table can only relate back to one record in the first table. Example: Cars and car owners. One person can own many cars, but for insurance, each car is owned by only one person.

In a many-to-many relationship, a record in either table can relate to many records in the other table. Example: A table of student information and a table of courses at Hopkins. Each course can be taken by many students, and each student can take many courses. How does one relate the two tables in this case? Ultimately you want to link a unique identifier for students, SSN, to a unique identifier for courses, the course number. However, relational algebra, which drives relational databases, has no way of representing a many-to-many relationship mathematically. The way around this? Create an intermediate table, in which the course numbers and SSNs are associated (an enrollment table), and use one-to-many relationships into that table to effectively obtain that many-to-many relationship. This will become a bit more apparent as we do this in Access.

A Look Ahead (Ex. 4) In the second Access chapter, you will learn to do table design, with special attention to elements that help preserve data integrity, such as field data types, input masks, data validation and error messages. You should pay special attention to how a good table design with mindfulness toward getting valid, useful data can make databases very easy and far more useful.