Relational DBMS Concepts

Facebooktwitterredditpinterestlinkedinmailby feather

What is RDBMS?

RDBMS stands for Relational Database Management System.
The relational database management system is a type of DBMS that stores information in the form of related tables and uses a relational model defined by the EF Codd.
Relational DBMS is a system that manages the relational databases. The database is called ‘relational’ because the values in each table are related to each other. A Relational database is a collection of an organized set of tables (rows and columns) from which data can be accessed easily.
Popular examples of RDBMS include Microsoft Access, SQL Server, Oracle database, MySQL and IBM DB2.

Features of RDBMS

  • It provides data to be stored in the tables in the form of rows and columns.
  • It provides the facility of primary key to uniquely identify each row in a relation.
  • It creates indexes for fast data access.
  • It provides the primary and foreign key to share a common column in more than one table.

Table

In RDBMS, a table is a collection of data elements represented in a structured format in terms of rows and columns. In a database, each table has a specific name. It is the simplest form for storing the data in the relational database management system.
Databases contain multiple tables, where each table is designed for a specific purpose.
For example, a college database may contain separate tables for students, course, and Teachers. Each table in a database may include its own set of attributes or fields, based on what type of data, the table needs to store. In tables, each field or attribute is considered as a column, while each record is considered as a row. Specific value can be retrieved from the database table by requesting data from an individual column and row.

Database: College

Table: Student

Roll no. Name City Age
101 Akhil Meerut 20
102 Chetan Delhi 22
103 Anubhav Ghaziabad 21
104 Rishabh Shivam 20

Table: Course

Course_id Course_name
C1 MCA
C2 M. tech
C3 MBA

Table: Teacher

Teacher_id Name City
201 Ankit Delhi
202 Manoj Delhi
203 Tarun Ghaziabad
204 Yash Delhi

Record

Each row in the database table is known as a record. It is also known as a tuple. A record or tuple is composed of attributes and contains the data about one particular person or an item in a database. Highlighted row for the roll no 102 in the below table Student is an example of a record.

Table: Student

Rollno Name City Age
101 Akhil Meerut 20
102 Chetan Delhi 22
103 Anubhav Ghaziabad 21
104 Rishabh Shivam 20

Field

A database table consists of several rows. Each row can be broken down into several smaller entities known as fields. It is also known as an attribute.
A field or an attribute is a column in the database table which is designed to maintain particular information about each row in the table. The above student table consists of four attributes Rollno, Name, City and Age.

Table: Student

Rollno Name City Age

Degree

The number of fields or attributes in a relation or table is known as a Degree. The above table Student has degree 4.

Cardinality

The number of tuples or records in a relation is known as its Cardinality. The above table Student has cardinality= 4.

Domain

A domain is a collection of possible values for an attribute in the database table. For example, a domain of month in a year can accept January, February, March…December as values, a domain of dates can accept all possible valid dates etc. We specify the domain of attribute while creating a table.
A field or an attribute cannot accept those values that are outside of its domains.

In the below table Student, the rollno attribute has an integer domain. Therefore, attribute, or column name or a field can accept only integer values, i.e., roll no cannot has values like10.11, ‘first’, etc.

Table: Student

Rollno Name City Age
101 Akhil Meerut 20
10.11 Chetan Delhi 22
first Anubhav Ghaziabad 21
104 Rishabh Shivam 20

What is a NULL value?

The value is unknown, or the value is not applicable for an attribute. It is represented by a blank space. It is different from the value filled with zero or a field that contains space.

Roll no. Name City Age
101 Akhil   20
102 Chetan Delhi 22
103 Anubhav   21
104 Rishabh Shivam 20
Facebooktwitterredditpinterestlinkedinmailby feather