Lecture 8: Relational Database Model Flashcards
Table in formal relational model term is
relation
Column header in formal relational model term is
attribute
All possible column values in formal relational model term is
domain
row in formal relational model term is
tuple
in formal relational model the term table definition is
schema of a relation
in formal relational model the term populated table
state of relation
T or F
a relation can have no key
false
Key of a relation identifies what ?
identifies a row in the table
schema of a relation is denoted as
R(A1,A2,A3…)
T or f
each attribute has a domain or a set of valid values
true
t or f
domain has only the logical definition
false, it has a logical definition and also has a datatype or a format
a tuple is represented by
enclosed in angled brackets
schema of a database is denoted by
S(R1,R2,R3…)
t or f
tuples are ordered
false
t or f
attributes in a relation schema R and of the values with the tuple are ordered
true
t or f
tuple values can be a group of values
false, tuple values must be atomic
t or f
each value must be from the domain off the attribute for that column
true
t or f
null values represents values that are unknown or inapplicable
true
name three main constraints types
- Key constraint
- Entity integrity constraint
- Referential integrity constraint
Super key is a
is a set of attributes that are taken collectively and can identify all other attribute uniquely
t or f
two tuples can have the same value for their super key
false
t or f
a super key can be one or more key
true
a key is a minimal
superkey
t or f
any super key is a key
false
t or f
any set of attributes that includes a key is a superkey
true
entity integrity is
primary key can’t be null values in any tuple
referential integrity is
if a relation is referencing another using foreign keys then it can’t use values other than one in the relation it’s referencing
t or f
a value of a foreign key can be null
true
t or f
a value of a foreign key can be a value that doesn’t exist in the referenced relation
false
t or f
a foreign key can be a part of its primary key
false
semantic integrity is
based on the application and cannot be expressed by the model per se
what language is used in sql 99 to allow triggers and assertion
a constraint specification
t or f
the relational database state is union of all individual relation states
true
t or f
if a database is changed the state remain the same
false, if a database changed a new state arises
actions that can be taken in integrity constraints violations
- Cancel : the operation that causes the violation
- Perform : the operation but inform the user of the violation
- Trigger additional updates : so the violation is corrected (Cascade or null)
- Execute a user-specified error-correction routine
t or f
insert may violate the domain constraint
true
t or f
insert doesn’t violate the key constraint
false
t or f
insert doesn’t violate the referential integrity constraint
false
t or f
insert may violates the entity integrity constraint
true
t or f
it’s legal if a primary key is deleted
false, If a primary key is being deleted is referenced from other tuples in the database
if delete is trying to remove a PK what actions can be performed
Restrict: reject the deletion
Cascade: to attempt to cascade the deletion by deleting tuples that reference the tuple that is being deleted
Set Null or Set Default: set the FK of the referencing tuples to NULL or changed to reference another default valid tuple
update may violate …. and ….
domain constraint, and not-null constraint
t or f
it is legal to update a foreign key
false, may violate referential integrity
t or f
updating ordinary attributes, doesn’t violate any constraints
false, it can violate domain constraint