Database Management System: Unit I: Relational Databases

Relational Model

Relational Databases - Database Management System

In relational model, table is a collection of data items arranged in rows and columns. The table cannot have duplicate data or rows. Below is an example of student table

Relational Model

There are some commonly used terms in Relational Model and those are -

Table or relation: In relational model, table is a collection of data items arranged in rows and columns. The table cannot have duplicate data or rows. Below is an example of student table

Tuple or record or row: The single entry in the table is called tuple. The tuple represents a set of related data. In above Student table there are four tuples. One of the tuple can be represented as

Attribute or columns: It is a part of table that contains several records. Each record can be broken down into several small parts of data known as attributes. For example the above table consists of four attributes such as RollNo,Name,Marks and Phone.

Relation schema: A relation schema describes the structure of the relation, with the name of the relation (i.e. name of table), its attributes and their names and type.

Relation Instance: It refers to specific instance of relation i.e. containing a specific set of rows. For example - the following is a relation instance - which contains the records with marks above 80.

Domain: For each attribute of relation, there is a set of permitted values called domain. For example - in above table, the domain of attribute Marks is set of all possible permitted marks of the students. Similarly the domain of Name attribute is all possible names of students.

That means Domain of Marks attribute is (88,83,98)

Atomic:The domain is atomic if elements of the domain are considered to be indivisible units. For example in above Student table, the attribute Phone is non-atomic.

NULL attribute: A null is a special symbol, independent of data type, which means either unknown or inapplicable. It does not mean zero or blank. For example - Consider a salary table that contains NULL

Degree: It is nothing but total number of columns present in the relational database. In given Student table –

The degree is 4.

Cardinality: It is total number of tuples present i in the relational database. In above given table the cardinality is 3

Example 1.9.1 Find out following for given Staff table

i) No of Columns

ii) No of tuples

iii) Different attributes

iv) Degree

v) Cardinality

Solution:

i) No of Columns = 6

ii) No of Tuples = 3

iii) Different attributes are StaffID, Name, Sex, Designation, Salary, DOJ

iv) Degree Total number of columns = 6

v) Cardinality =Total number of rows = 3

Database Management System: Unit I: Relational Databases : Tag: : Relational Databases - Database Management System - Relational Model