2 Tutorial Relational Model
2 Tutorial Relational Model
Relational Model
Relation
A B C D
a1 b1 c1 d1
a1 b2 c2 d1
a1 b1 c2 d2
i. Super keys
{A}, {B}, {C}, {D}, {A,B}, {A,C},{A,D}, {B,C}, {B,D}, {C,D}, {A,B,C},
{A,B,D}, {A,C,D}, {B,C,D}, {A,B,C,D}
i. Referential Integrity.
This is where all the foreign key may have a null entry or either it matches the
primary key. This is only allowed based on certain rules as it shall not be a
part of the primary table and the entry must match the value of the primary
key which is related. This maintains the correspondence between rows of the
child and parent table. Example of a referential integrity is as below
- Customer (CustID, CustName)
CT042-3-1-IDB Page 1 of 2
- Order (OrderID, CustID, OrderDate)
As you can see between the database there is one connection that links both
of them which is the CustID.
iii. Null.
Null is where a data isn’t assigned any value yet. It can be represented by a
null. Null doesn’t mean 0 it just means no value yet. A null isn’t allowed to
be inserted inside a primary key. Example of null usage is when you haven’t
get the person’s contact number. Thus that cell can be represented by a null.
Each cell has only one value. You can’t insert multiple value inside one cell.
Which means only can have one contact number
Each attribute has one name such as custNo,custName, id and etc. Duplication of
name is not allowed.
The value of an attribute are from the same domain such as Id can only be from
000-999. Value less or more than the range is not accepted
each tuple are distinct from one another. This is to avoid any duplication of row
The attributes and tuple can be arranged in any way. There isn’t any order for that
needs to be followed
CT042-3-1-IDB Page 2 of 2