dbms notes
dbms notes
Topperworld.in
Introduction to dbms
❖ Data
❖ Database
©Topperworl d
DBMS
©Topperworl d
DBMS
• DBMS provides the interface to perform the various operations like creation,
deletion, modification, etc.
• DBMS allows the user to create their databases as per their requirement.
• DBMS accepts the request from the application and provides specific data
through the operating system.
• DBMS contains the group of programs which acts according to the user
instruction.
➢ Advantage of DBMS
◆ Data sharing:An authorized user can share the data among multiple
users.
required.
©Topperworl d
DBMS
➢ Disadvantage of DBMS
◆ Size:It occupies large disk space and large memory to run efficiently.
◆ Cost:DBMS requires a high-speed data processor and larger memory to
run DBMS software, so it is costly.
❖ Types of Databases
There are various types of databases used for storing different varieties of data:
©Topperworl d
DBMS
1) Centralized Database
⚫ It comforts the users to access the stored data from different locations
through several applications.
⚫ These applications contain the authentication process to let users
access data securely.
⚫ An example of a Centralized database can be Central Library that carries
a central database of each library in a college/university.
©Topperworl d
DBMS
2) Distributed Database
©Topperworl d
DBMS
3) Relational Database
⚫ This database is based on the relational data model, which stores data
in the form of rows(tuple) and columns(attributes), and together forms
a table(relation).
⚫ A relational database uses SQL for storing, manipulating, as well as
maintaining the data. E.F. Codd invented the database in 1970.
⚫ Each table in the database carries a key that makes the data unique
from others.
⚫ Examples of Relational databases are MySQL, Microsoft SQL Server,
Oracle, etc.
©Topperworl d
DBMS
➢ A means Atomicity: This ensures the data operation will complete either
with success or with failure. It follows the 'all or nothing' strategy. For
example, a transaction will either be committed or will abort.
➢ C means Consistency: If we perform any operation over the data, its
value before and after the operation should be preserved. For example,
the account balance before and after the transaction should be correct,
i.e., it should remain conserved.
➢ I means Isolation: There can be concurrent users for accessing data at
the same time from the database. Thus, isolation between the data
should remain isolated. For example, when multiple transactions occur
at the same time, one transaction effects should not be visible to the
other transactions in the database.
➢ D means Durability: It ensures that once it completes the operation and
commits the data, data changes should remain permanent.
4) NoSQL Database
©Topperworl d
DBMS
©Topperworl d
DBMS
5) Cloud Database
✓ Microsoft Azure
✓ Kamatera
✓ PhonixNAP
✓ ScienceSoft
©Topperworl d
DBMS
6) Object-oriented Databases
⚫ The type of database that uses the object-based data model approach
for storing data in the database system.
⚫ The data is represented and stored as objects which are similar to the
objects used in the object-oriented programming language.
7) Hierarchical Databases
⚫ Data get stored in the form of records that are connected via links. Each
child record in the tree will contain only one parent. On the other hand,
each parent record can have multiple child records.
©Topperworl d
DBMS
8) Network Databases
9) Personal Database
©Topperworl d
DBMS
©Topperworl d
DBMS
➢ How it works
➢ Table/Relation
Properties of a Relation:
©Topperworl d
DBMS
1 Ajeet 24 B.Tech
2 aryan 20 C.A
3 Mahesh 21 BCA
4 Ratan 22 MCA
5 Vimal 26 BSC
➢ Row or Record
Properties of a row
• All tuples of the relation have the same format and the same number
of entries.
©Topperworl d
DBMS
1 Ajeet 24 B.Tech
➢ Column/attribute
Properties of an Attribute
• Attributes that uniquely identify each tuple of a relation are the primary
key.
➢ Data item/Cells
The smallest unit of data in the table is the individual data item. It is stored at
the intersection of tuples and attributes.
In the below example, the data item in the student table consists of Ajeet, 24
and Btech, etc.
©Topperworl d
DBMS
1 Ajeet 24 B.Tech
➢ Degree
The total number of attributes that comprise a relation is known as the degree
of the table.
➢ Cardinality
The total number of tuples at any one time in a relation is known as the table's
cardinality. The relation whose cardinality is 0 is called an empty table.
➢ Domain
The domain refers to the possible values each attribute can contain. It can be
specified using standard data types such as integers, floating numbers, etc.
➢ NULL Values
The NULL value of the table specifies that the field has been left blank during
record creation.
©Topperworl d
DBMS
It is different from the value filled with zero or a field that contains space.
❖ Data Integrity
There are the following categories of data integrity exist with each RDBMS:
Although DBMS and RDBMS both are used to store information in physical
database but there are some remarkable differences between them.
The main differences between DBMS and RDBMS are given below:
No. DBMS RDBMS
©Topperworl d
DBMS
4) DBMS does not apply any RDBMS defines the integrity constraint for
security with regards to data the purpose of ACID (Atomocity,
manipulation. Consistency, Isolation and Durability)
property.
5) DBMS uses file system to in RDBMS, data values are stored in the
store data, so there will be form of tables, so a relationship between
these data values will be stored in the
no relation between the form of a table as well.
tables.
©Topperworl d
DBMS
9) Examples of DBMS are file Example of RDBMS are mysql, postgre, sql
systems, xml etc. server, oracle etc.
©Topperworl d