It's always easier to learn theory when it's directly related to something tangibleespecially a detailed, real-world example you can use. But there are a few essential database terms I want you to know right away, so let me introduce them using a make-believe example.
A table is a grid of rows and columns. Often there are gridlines to distinguish the columns and rows, but the lines themselves merely provide visual clarity. Table 1.1 is a table of contact information for the members of the Hoops Club of Littletown, Georgia, which each Sunday gets together to watch an NBA game on TV.
Notice that the data in any particular column is of the same kind. For example, the Last Name column has only last names, and the Phone column has only phone numbers. Also, each row contains data about just one personyou won't find any information about George Harrelson in the Helen Michaelson row.
Field, Record, and Value
On the first day of my high-school bookkeeping class, my teacher asked us to define debit and credit. Many students had had some exposure to accounting, and they produced a range of definitions. Each was quickly dismissed by the CPA standing before us, who easily produced counter-examples and exposed logical errors for all attempts. Finally, he said, "Just remember: Debit means left side, and credit means right side." It was the most useful thing anybody ever told me about accounting.
Database theory and accounting theory might have little in common, but in this one sense, they are alike: A simple definition can sometimes serve best. So I ask you to think of a field as a column in a table, even though a more informative definition might be "a single trait or characteristic about the subject of a table." In Table 1.1, Last Name, First Name, Address, and Phone are all fields.
In the same way, it's best to think of a record as simply a row in a table, even though a more comprehensive description might be "a group of traits about a particular item." In the table, the data in the first row beginning with Michaelson and extending through 555-6548 is a record.
A value is the actual data entered at the intersection of a row and column. In the table, Helen is a value in the First Name field, and 42 Karl Malone Dr. is a value in the Address field.
The next four chaptersindeed, most of this bookare an attempt to answer the question "What is a relational database?" So I don't try to define it now. But I ask you to remember three things: