What s in a Table?

What's in a Table?

You learned about some of the basic parts of a table in Chapter 4, "Planning a Database." But before you actually build a table, you should review the three basic components one more time:

  • Fields

  • Records

  • Primary key

Note

graphics/note.gif

You can download the Chapter 5.mdb sample file for this chapter from http://www.quepublishing.com/. If you want to follow along with our examples, download Chapter 4.mdb .


Fields

A field is the smallest unit of data in the database. In the plants database, some of the fields are CommonName, LatinName, StreetAddress, and City. Each thing you store in the database is described by one or more fields. As part of the process of designing tables, you'll tell Access which fields belong in each table.

Records

When you fill in all the fields in a table, you're creating a record . A table might contain no records at all (if you haven't entered any data yet), or it might contain hundreds, thousands, or even millions of records. In the plants database, for example, each individual plant is the subject of one record. You can't enter records in a table before you have defined the fields for that tableuntil then, there's no place to enter the data!

Figure 5.1 shows the connection between fields, records, and tables.

Figure 5.1. Fields and records in a table.

graphics/05fig01.gif

Primary Key

The other thing to keep in mind when building tables is that each table should have a primary key. A primary key , you'll recall, is the field (or group of fields) that uniquely identifies each record in a table. A bit later in the chapter you'll learn how to tell Access which field in your table contains the primary key.

Tip

graphics/tip.gif

If you forget to designate a primary key for a table, Access will remind you the first time you save the table. If you like, it will even create a primary key for you at that point.




Absolute Beginner's Guide to MicrosoftR Access 2002
Absolute Beginner's Guide to MicrosoftR Access 2002
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net