Relational model | Data models
RELATIONAL MODEL
INTRODUCTION-
Relational model stores the data in the form of table. It consists of three major components.
1.) The set of relations and set of domains that defines the way data can be represented.
2.) Integrity rules that defines the procedure to protect the data.
3.) The operations that can be performed on the table.
CHARACTERISTICS-
Characteristics of relational database are:-
1.) All data is conceptually represented as an orderly arrangement of data into rows and column called a relation or table.
2.) All the values are scaler i.e. at any given row or column position there is one and only one value.
3.) All operations are performed on the entire relation and the result is an entire relation.
BASIC TERMINOLOGY OF RELATIONAL DATABASE-
1.) TUPLE OF A RELATION-Each row in a table is known as tuple.
2.) CARDINALITY OF A RELATION- It is the no of tuples in the relation.
3.) DEGREE OF A RELATION-No of columns is known as degree of a relation.
4.) DOMAIN OF A RELATION-It defines the kind of data represented by the attribute.It is the set of all possible values that an attribute may contain.
5.) BODY OF THE RELATION-It consists of an unordered set of 0 or more tuples.
EXAMPLE:- Consider a table
1.) TUPLE OF A RELATION- 8
2.) CARDINALITY OF A RELATION- 8
3.) DEGREE OF A RELATION- 5
4.) DOMAIN OF A RELATION- All the data entered in the table is the domain of a relation.
KEYS OF A RELATION-
1.) PRIMARY KEY- It is the key that uniquely identifies a record. It doesn't have null values.
2.) FOREIGN KEY- It refers to the primary key of some other table.It permits only those values which appear in the primary key of the table to which it refers.
0 comments:
Post a Comment