Flash Cards
Study for final exam
A process of transforming conceptual data model into logical data model such as relational data model
Logical Database Design.
Most commonly used in modern Database applications
Relational Data model ( or relational model)
Data are organized in the form of table with rows and columns
Data structure
Operation are made using SQL to manipulate data stored in the relations
Data manipulation
Facilities are included to specify business rules that maintain the integrity of data when they are manipulated.
Data integrity
A named, two dimensional table of data.
Relation
Consists of a set of named columns and an arbitrary number of unnamed rows.
Relation (or table)
Becomes a relation name
Entity type
Named column of a relation.
Attribute
Each ___ of a relation corresponds to a record that contains ____ values for a single ____.
Row(Tuple), data(attribute), entity(instance)
An attribute or combination of attributes that uniquely identifies each row in a relation
EMPLOYEE1(*Emp_ID,Name,Dept_Name,Salary)
Primary Key
A primary key that consists of more than one attribute
Composite Key
An attribute in a relation of a database that serves as the primary key of another relation in the same database
E.g. DEPARTMENT(Dept_name, Location,Tel_no)
EMPLOYEE1(Emp_ID, Name, ^Dept_Name,Salary)
Foreign Key
Not all tables are relations
True
each relation has a unique name
true
The value at the intersection of each row and column is atomic. No multivalued attributes are allowed.
True
Each row is unique. No two identical rows in a relation.
True
Each attribute or column within a table has a unique name.
True
The sequence of columns is insignificant
True
The sequence of rows is insignificant
True
Consists of any number of relations
Relational Database
a description of the overall logical structure of the database
Schema
Two common methods for expressing a schema
Short text statements, a graphical representation
Includes several types of constraints to maintain the accuracy and integrity of data in the database
Relational Data Model
Domain Constraints, Entity Integrity, Referential Integrity
Major Integrity Constraints
All the values that appear in a column of a relation must be taken from the same domain
Domain Constraints
The set of values that may be assigned to an attribute
Domain
Domain name, meaning, data type, size or length, allowable values or allowable range
Domain definition
No Primary Key attribute (or component of a primary key attribute) can be null. It guarantees that every primary key attribute non- null.
Entity Integrity
assures that every relation has a primary key and that the data values for that primary key are all valid
Entity integrity rule
A value that may be assigned to an attributes when no other value applies or when the applicable value is unknown
Null
A rule that states that either each foreign key value must match a primary key value in another relation or the foreign key value must be null
Referential Integrity
In relational data models, associations between tables are defined through the use of ____
foreign keys
If the relationship is optional, then the foreign key could be null
True
Whether a foreign key can be null must be specified as a property of the foreign key attribute when the database is defined
True
A foreign key name must be the same as primary key name.
False - a foreign key name could be different from primary key name.
The foreign and primary keys can be from different domains.
False - The foreign and primary keys must be from the same domain.
A relation that contains minimal redundancy and allows users to insert, modify, and delete the rows in a table without anomalies
Well-structured Relation
An error or inconsistency that may result when a user attempts to update a table that contains redundant data.
Anomaly
Three types of anomalies
Insertion, deletion, modification anomaly