Chapter 4 Flashcards
Data Structure
Data are organized in two-dimensional tables (also called relations) with columns and rows
Data Manipulation
Data stored in the tables may be manipulated through the use of a command language (Structured Query Language – SQL – was developed expressly for this purpose)
Data Integrity
Business rules may be defined that maintain the integrity of the data that is manipulated
Relational Database Model Constraints–Domain Integrity
constrains allowable values for columns(e.g., data type, column size, maximum value, etc.)
Relational Database Model Constraints–Policy Integrity
constrains data operations to business rules (e.g., only managers may place vendor orders)
Relational Database Model Constraints–Entity Integrity
prohibits null values for primary key column
Relational Database Model Constraints–Referential Integrity
constrains a foreign key value to match a primary key value in a related table
Example: For every value of CustomerID in the Order table there must be a matching value of CustomerID in the Customer table
Properties of Relational Tables–table (relation)
Each table (relation) in a given database has a unique name
Properties of Relational Tables-column (attribute)
within a given table has a unique name
- -Every column (attribute) is single-valued
- -Thus, multivalued attributes require special teatment when designing relational tables
Properties of Relational Tables–row (tuple)
Every row (tuple) in a table is unique
Primary Key (PK) (analogous to entity identifier)
A column (or columns) whose value uniquely identifies or differentiates each row in a table(e.g., EmployeeID)
Composite Key
a primary key made up of more than one column
e.g., FirstName + MiddleName + LastName
Foreign Key (FK)
A column in one table that serves as the primary key of another table in the same database (thus serving as a link between the two tables)
Candidate Key
If a table has more than one column that provides a way of uniquely identifying the rows of the table, then they are each called a candidate key
When there is more than one candidate key, one of them must be chosen to be the primary key of the table
alternate key
A candidate key that is not chosen to be the primary key of a table