Final Review Flashcards
What is the difference between a database and database management system (DBMS)?
A database is the data stored and a DBMS is the software that manages that data.
What does DML stand for and what is the standard?
DML stands for Data Manipulation Language, and the standard is SQL (structured query language)
Draw the ANSI / SPARC Architecture
Describe the Internal View
The physical representation of the database on the computer, that is, *how* the data is stored.
Describe the Conceptual View.
The logical structure of the database, that is, *what* data is stored and its relationships.
Describe the External View.
The *user’s view* of the database that provides the part of the database relevant to the user.
What are the three levels of the ANSI / SPARC architecture starting with the view closest to the user?
Dexternal, Conceptual, Physical (Internal)
A relation is a _______ with columns and rows.
A relation is a table with columns and rows.
A _______ is a named column of a relation.
An attribute is a named column of a relation.
A _______ is a row of a relation.
A tuple is a row of a relation
A _______ is a set of allowable values for one or more attributes.
domain
The _______ of a relation is the number of tuples it contains.
cardinality
The _______ of a relation is t he number of attributes it contains.
degree
The _______ of a relation is the structure of the relations including its domains.
intension
The _______ of a relation is the set of tuples currently in the relation.
extension
Define:
superkey
A set of attributes that uniquely identifies a tuple in a relation.
Define:
key
A *minimal* set of attributes that uniquely identifies a tuple in a relation
Define:
candidate key
One of the possible *keys* (NOT superkeys) of a relation
Define:
primary key
The candidate key designated as the distinguishing key of a relation
Define:
foreign key
A set of attributes in one relation referring to the primary key of another relation.
True or false:
A key is always a superkey.
True
True or false:
It is possible to have more than one key for a table and the keys may have different numbers of attributes.
True, as a key is a *minimal* number of attributes, though not necessarily a *minimum*. Thus, a student could be identified by student number, or by first & last name.
Define:
domain constraint
Every value for an attribute must be an element of the attribute’s domain or null
Define:
entity integrity constraint
No attribute of a primary key can be null
Define:
referential integrity constraint
If a foreign key exists in a relation, then the foreign key value must match a primary key value in the referenced relation or be null
R is a relation with 10 rows and 5 columns. S is a relation with 8 rows and 3 columns. What is the degree and cardinality of the Cartesian product?
degree = 8
cardinality = 80