2-6 CHAPTER 2 • DATABASES AND ACCOUNTING SYSTEMS
Database Objects
• RDBMS model defines the conceptual view that the user has of all the objects contained by
the database system.
➢ The RDBMS model represents both data and relationships between them.
➢ The order (position) of the columns in relation to each other is unimportant.
➢ Each row is unique from all other rows in the relation.
• Customer table—Coffee merchant (Figure 2.4)
➢ Rows represent customers—each row must be unique
➢ Columns represent attributes of each customer, schema for table includes: CustomerID
(primary key), CompanyName, PhoneNumber, and Contact
➢ Attribute values are within columns
Primary and Foreign Key Attributes
• Primary key is a column (or group of columns) that uniquely identifies a given row—the
CustID column, for example (Figure 2.5).
• Data Dictionary is a collection of tables containing the definition, characteristics, structure,
and description of all data maintained by the RDBMS.
• Foreign key is an attribute in one table that must match the primary key in another table—the
CustomerID column of the tblInvoice table, for example, shown in Figure 2.5.
• tblInvoice and tblCustomer tables can be joined on the CustID/CustomerID fields.
• Each column of a table is an attribute.
• Columns, including the primary key column and any foreign key columns, can appear in any
order.
• Microsoft Access does not require that each table have primary key, but each table should
have one.
Schema of a Relation
• A schema is a representation of a table that lists all its attributes and identifies the primary
key and, optionally, foreign keys
Data Dictionary
• Every relational database system has a data dictionary.