Week 2 - Flashcards
What is the challenge of the conceptual data model?
With the conceptual data model, we need to transform a textual description of a real problem into a set of concepts conveying exactly the same information.
What are the two fundamental approaches of conceptual data modelling?
Entity-Relationship Modelling Relational modelling (mathematical)
What is a limitation of ER model?
It does not guarantee optimality in operations and query executions, whereas the Relational Modelling does
What is a conceptional data model?
It is a mathematical model for interpreting our data. It uses theorems from set theory, functional dependency and normalisation theory and relational algebra
What do we need to identify before using the conceptual data model?
The entities, attributes and relationships
Any entity and any relationship are modelled as a relation, which maps to a 2-D table. What are the rows and columns in this 2-D table?
Columns are an ordered set of attributes.
A set of tuples (rows) represents instances.
There exists a specific attribute that uniquely identifies a tuple in the relation
How do you define a schema of a relation?
Hint: include relation R, attributes A1,…,An, and domain Di.
The schema of a relation: R(A1,A2,…,An)
Relation with name R and an ordered set of attributes A1,A2,…,An.
Each attribute Ai assumes values in a domain Di
How do you define a tuple t of relation R?
A tuple t of R is an ordered set of values corresponding to attributes of R, satisfying the domain constraints:
t=(v1,v2,…,vn), vi in Di
What is an instance of a relation r(R)?
An instance of a relation r(R) is a set of tuples:
r(R) = {t1,t2,t3,…,tm}: ti is a tuple of R
What are the possible reasons for a null value?
Represents an unknown, inapplicable, uncertain or missing value.
How do you define a relational database schema?
it is a set of relations:
s = {R1,R2,…,Rn} or {Null}
What is the definition of relational constraints?
Relational constraints are conditions that must hold on all instances, for each relation
What are the three fundamental constraints?
Key constraints (unique tuple identification) Entity integrity constraint (keys are never null) Referential integrity constraint (interpretation of relationships)
What is the superkey of a relation?
A superkey of a relation R is a set of attributes containing at least one attribute that uniquely identifies any tuple.
Where SK is the super key and t1 and t2 are two distinct tuples, if t1 doesn’t equal t2 in the instance r(R), then what can we say about t1[SK] and t2[SK]
t1[SK] doesn’t equal t2[SK]