Relational Database Flashcards
3 components of Relational Database
Data Structure
Data Manipulation
Data Integrity
Columns/fields
Attributes
Rows/tuples
Records
Data organized in the form of tables, rows and columns
Data Structure
Manipulate data in the relation usually through SQL
Data Manipulation
Facilities are included to specify business rules that maintain the integrity of data
Data Integrity
Relational Keys
Primary Key
Composite key
Foreign Key
Serves as a unique identifier for a particular record
Primary Key
Primary key that consists of more than one attributes
Composite Key
Attribute or fields that is used to refer to data contained in another relation (reference key).
Foreign Key
True or False:
Not all tables are relations
True
Logical structure of a database
Schema
Set of valid atomic values for a given attribute or field
Domain
An empty value
Null
Rules that apply to a particular relation
Specific Integrity Rules
Rules that apply to all relations
General Integrity Rules
Field that can possibly be
used as the primary key for the relation
Candidate Key
2 requirements of Entity Integrity Rule
Uniqueness requirement
Minimality requirement
“NO COMPONENT OF THE PRIMARY KEY OF
A BASE RELATION IS ALLOWED TO ACCEPT
NULLS”
The primary key cannot accept an empty value
Entity Integrity Rule
True or False:
The primary key can accept null values
False
Name the requirement:
No two tuples must have
the same value for the said field
Uniqueness requirement
Name the requirement:
If the candidate key is
composite, then no field or any of its components can
be eliminated without affecting its uniqueness property
Minimality Requirement
Rule expressing constraints/control of
organizational actions (business rule)
Action Assertion
A relation whose tuples or records are
physically stored in a database
Base Relation
“THE RELATIONS IN A DATABASE MUST NOT CONTAIN UNMATCHED
FOREIGN KEYS”
Referential Integrity Rule