1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Relational Schema
A named relation defined by a set of attributes.
NAME OF RELATION(primary_key, foreign_key, attribute)
Format for relational schema
Relational Database
Collection of multiple normalized relations
Physical implementation of the relational data model andnormally one uses the services of the DBMS
Metadata (“data about data”)
referred to as the data dictionary or the system catalog or simply catalog.
Foreign Key (FK)
Is a column or set of columns whose value matches the primary key of another table
You can think of a foreign key as a copy of primary key from another relational table.
Constraints
Restrictions on the set of values allowed for attributes of relations
Allows to enforce rules in your database. These rules may affect business logic, database integrity, and/or table structures
Integrity Rules
Constraints or restrictions that apply to all instances of the database
Entity Integrity Rule (PK Constraint)
States that the value of the primary key can never be a null value
Requires that insert, update, and delete operations maintain the uniqueness and existence of all primary keys.
Null Value
Represents a value for an attribute that is currently unknown for a tuple
Not the same as zero or text string filled with spaces
Absence of a value
Referential Integrity Rule (FK Constraint)
States that if a relational table has a foreign key, then every value of the foreign key must be null or match the values in the relational table in which that foreign key is a primary key
NOT NULL Constraint
Allow you to specify that a column may not contain NULL values
DEFAULT Constraint
Allow you to specify a value that the database will use to populate fields that are left blank in the input source
Replacement for the use of NULL values
Great way to predefine common data elements
UNIQUE Constraint
Constraints you to specify that a column may not contain duplicate values
CHECK Constraint
Allow you to limit the types of data that users may insert in a database
Go beyond data types and allow you to define the specific values that may be included in a column.