Home DBMS Tutorial Relational Model in DBMS

Relational Model in DBMS

by Ankit Chauhan
3 minutes read

The relational model, a foundational concept in database management systems (DBMS), provides a structured approach to organizing and managing data. By representing data in a tabular format, it offers a clear and intuitive way to store, retrieve, and manipulate information. The relational model was developed by E.F. Codd in 1970. It revolutionized database design by introducing a structured and flexible approach to data organization.

Key Terms in Relational Databases

  • Relation: A table representing a specific entity or concept.
  • Tuple: A row in a table, representing a single record.
  • Attribute: A column in a table, defining a specific characteristic of the entity.
  • Domain: The set of possible values for an attribute.
  • Cardinality: The number of rows in a table.
  • Degree: The number of columns in a table.

Let’s explain each term one by one in detail with the help of example:

Example: STUDENT Relation

You Might Be Interested In
Stu_NoS_NamePHONE_NOADDRESSGender
10112Mansi9874567891KanpurF
12839Rakesh9026288936DelhiM
33289Rashmi8583287182PuneF
27857Ankit7086819134GhaziabadM
17282Rohit9028939884DelhiM

Relation: A relation is usually represented as a table, organized into rows and columns. A relationship consists of multiple records. For example: student relation which contains tuples and attributes.

Tuple: The rows of a relation that contain the values corresponding to the attributes are called tuples. For example: in the Student relation there are 5 tuples.

The value of tuples contains (10112, Mansi, 9874567891,Kanpur, F) etc.

Data Item: The smallest unit of data in the relation is the individual data item. It is stored at the intersection of rows and columns are also known as cells. For Example: 10112, “Mansi” etc are data items in Student relation.

Domain: It contains a set of atomic values that an attribute can take. It could be accomplish explicitly by listing all possible values or specifying conditions that all values in that domain must be confirmed. For example: the domain of gender attributes is a set of data values “M” for male and “F” for female. No database software fully supports domains typically allowing the users to define very simple data types such as numbers, dates, characters etc.

Attribute: The smallest unit of data in relational model is an attribute. It contains the name of a column in a particular table. Each attribute Ai must have a domain, dom(Ai). For example: Stu_No, S_Name, PHONE_NO, ADDRESS, Gender are the attributes of a student relation. In relational databases a column entry in any row is a single value that contains exactly one item only.

Cardinality: The total number of rows at a time in a relation is called the cardinality of that relation. For example: In a student relation, the total number of tuples in this relation is3 so the cardinality of a relation is 3. The cardinality of a relation changes with time as more and more tuples get added or deleted.

Degree: The degree of association is called the total number of attributes in a relationship. The relation with one attribute is called unary relation, with two attributes is known a binary relation and with three attributes is known as ternary relation. For example: in the Student relation, the total number of attributes is 5, so the degree of the relations is 5. The degree of a relation does not change with time as tuples get added or deleted.

Relational instance: In the relational database system, the relational instance is represented by a finite set of tuples. Relation instances do not have duplicate tuples.

Relational schema: A relational schema contains the name of the relation and name of all columns or attributes.

Relational key: In the relational key, each row has one or more attributes. It can identify the row in the relation uniquely.

related posts

Leave a Comment

Enable Notifications OK No thanks