DBMS Fundamentals

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

What is Data?

Data is a collection of a distinct small unit of information. It can be used in a variety


of forms like text, numbers, media, bytes, etc. it can be stored in pieces of paper or
electronic memory, etc.

Word 'Data' is originated from the word 'datum' that means 'single piece of
information.' It is plural of the word datum.

In computing, Data is information that can be translated into a form for efficient
movement and processing. Data is interchangeable.

What is Database?
A database is an organized collection of data, so that it can be easily accessed and
managed.

You can organize data into tables, rows, columns, and index it to make it easier to
find relevant information.

Database handlers create a database in such a way that only one set of software
program provides access of data to all the users.

The main purpose of the database is to operate a large amount of information by


storing, retrieving, and managing data.

There are many dynamic websites on the World Wide Web nowadays which are
handled through databases. For example, a model that checks the availability of
rooms in a hotel. It is an example of a dynamic website that uses a database.

There are many databases available like MySQL, Sybase, Oracle, MongoDB,


Informix, PostgreSQL, SQL Server, etc.

Modern databases are managed by the database management system (DBMS).

SQL or Structured Query Language is used to operate on the data stored in a


database. SQL depends on relational algebra and tuple relational calculus.

A cylindrical structure is used to display the image of a database.

What is RDBMS
RDBMS stands for Relational Database Management Systems..
All modern database management systems like SQL, MS SQL Server, IBM DB2,
ORACLE, My-SQL and Microsoft Access are based on RDBMS.

It is called Relational Data Base Management System (RDBMS) because it is based


on relational model introduced by E.F. Codd.

How it works
Data is represented in terms of tuples (rows) in RDBMS.

Relational database is most commonly used database. It contains number of tables


and each table has its own primary key.

Due to a collection of organized set of tables, data can be accessed easily in RDBMS.

Brief History of RDBMS


During 1970 to 1972, E.F. Codd published a paper to propose the use of relational
database model.

RDBMS is originally based on that E.F. Codd's relational model invention.

What is table
The RDBMS database uses tables to store data. A table is a collection of related data
entries and contains rows and columns to store data.

A table is the simplest example of data storage in RDBMS.

Let's see the example of student table.

ID Name AGE COURSE

1 Ajeet 24 B.Tech

2 aryan 20 C.A

3 Mahesh 21 BCA

4 Ratan 22 MCA

5 Vimal 26 BSC
What is field
Field is a smaller entity of the table which contains specific information about every
record in the table. In the above example, the field in the student table consist of id,
name, age, course.

What is row or record


A row of a table is also called record. It contains the specific information of each
individual entry in the table. It is a horizontal entity in the table. For example: The
above table contains 5 records.

Let's see one record/row in the table.

1 Ajeet 24 B.Tech

What is column
A column is a vertical entity in the table which contains all information associated
with a specific field in a table. For example: "name" is a column in the above table
which contains all information about student's name.

Ajeet

Aryan

Mahesh

Ratan

Vimal

Keys
o Keys play an important role in the relational database.

o It is used to uniquely identify any record or row of data from the table. It is
also used to establish and identify relationships between tables.
For example: In Student table, ID is used as a key because it is unique for each
student. In PERSON table, passport_number, license_number, SSN are keys since
they are unique for each person.

Types of key:
1. Primary key
o It is the first key which is used to identify one and only one instance of an
entity uniquely. An entity can contain multiple keys as we saw in PERSON
table. The key which is most suitable from those lists become a primary key.
o In the EMPLOYEE table, ID can be primary key since it is unique for each
employee. In the EMPLOYEE table, we can even select License_Number and
Passport_Number as primary key since they are also unique.
o For each entity, selection of the primary key is based on requirement and
developers.

2. Foreign key
o Foreign keys are the column of the table which is used to point to the primary
key of another table.
o In a company, every employee works in a specific department, and employee
and department are two different entities. So we can't store the information
of the department in the employee table. That's why we link these two tables
through the primary key of one table.
o We add the primary key of the DEPARTMENT table, Department_Id as a new
attribute in the EMPLOYEE table.
o Now in the EMPLOYEE table, Department_Id is the foreign key, and both the
tables are related.

You might also like