Relational Model Flashcards
In the context of RDBMS…
What is meant by DDL?
(Data Definition Language)
Refers to defining relation schemas and constraints.
In the context of RDBMS…
What is meant by DML?
(Data Manipulation Language)
Refers to inserting, updating, deleting and retrieving data.
In the context of RDBMS…
What is meant by DCL?
(Data Control Language)
Refers to security and accessibility.
What is an attribute in a relational data model?
One (of potentially many) properties that define an entity.
What is a tuple in a relational data model?
Each row in the relation is known as a tuple.
E.g:
- UserID, Name, Address, Phone (The format a tuple might take)
- 451, John, Detroit, 071626339 (An instance of a tuple)
What is the cardinality in the relational data model?
The number of tuples in a relation.
What is degree in the relational data model?
The number of attributes in the relation
What is in a column?
The column contais the set of values for any particular attribute.
What is a NULL value?
A value which is either not known or unavailable, it is filled with “NULL”.
What is a relational database?
A collection of relations
What would a relational schema for a member of staff with attributes staffNo, name, dob, and branchNo, which references a branch with attributes branchNo, street, city, and postcode look like?
Branch(branchNo,street,city,postcode)
Primary key branchNo
Staff(staffNo,Name,DOB,branchNo)
primary key StaffNo
foreign key branchNo references Branch(branchNo)
Bold means underlined, means primary key
What is a primary key?
Uniquely identify a tuple. Must not have duplicate values, or it cannot identify a specific tuple. Only one primary key.
Cannot be null.
Specifies the most important attribute for the relation
What is a candidate key?
A set of attributes that uniquely identify tuples in the relation. Can be more than one candidate key.
Can be null.
What is a foreign key?
An attribute or set of attributes that uniquely identiy a row of a different table.
In terms of relational integrity…
What is meant by domain constraints?
Domain constraints mean that data values must live in a specified domain.
E.g. Phone numbers will always be made up of exclusively integers.