100% found this document useful (1 vote)
30 views9 pages

RDBMS Unit I

The document provides an overview of the components and structure of a database management system (DBMS). It discusses how a DBMS acts as an interface between users and the database, allowing users to perform operations like inserting, deleting, updating, and retrieving data. It describes the main components of a DBMS, including the DDL and DML compilers, query optimizer, data manager, data dictionary, data files, and end users. It also provides brief explanations of each component's role and functions.

Uploaded by

tawipex886
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
30 views9 pages

RDBMS Unit I

The document provides an overview of the components and structure of a database management system (DBMS). It discusses how a DBMS acts as an interface between users and the database, allowing users to perform operations like inserting, deleting, updating, and retrieving data. It describes the main components of a DBMS, including the DDL and DML compilers, query optimizer, data manager, data dictionary, data files, and end users. It also provides brief explanations of each component's role and functions.

Uploaded by

tawipex886
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Unit First- Introduction and Basic Concepts

Structure of DBMS:
 DBMS (Database Management System) acts as an interface between the user and the
database. The user requests the DBMS to perform various operations such as insert,
delete, update and retrieval on the database.
 The components of DBMS perform these requested operations on the database and
provide necessary data to the users.

Applications: -

It can be considered as a user friendly web page where the user enters the requests. Here he
simply enters the details that he needs and presses buttons to get the data.

DDL Compiler:

 Data Description Language compiler processes schema definitions specified in the DDL.
 It includes metadata information such as the name of the files, data items, storage details
of each file, mapping information and constraints etc.

DML Compiler: -

When the user inserts, deletes, updates or retrieves the record from the database, he will be
sending request which he understands by pressing some buttons. But for the database to
work/understand the request, it should be broken down to object code. This is done by this
compiler. In other words The DML commands such as insert, update, delete, retrieve from the
application program are sent to the DML compiler for compilation into object code for database
access.

Query Optimizer: -

The object code is then optimized in the best way to execute a query by the query optimizer and
then send to the data manager. The query optimizer decides the best way to execute the user
request which is received from the DML compiler

 Data Manager:

 The Data Manager is the central software component of the DBMS also knows as
Database Control System.
 The Main Functions Of Data Manager Are:
1. Convert operations in user's Queries coming from the application programs or
combination of DML Compiler and Query optimizer which is known as Query
Processor from user's logical view to physical file system.
2. Controls DBMS information access that is stored on disk.
3. It also controls handling buffers in main memory.
4. It also enforces constraints to maintain consistency and integrity of the data.
5. It also synchronizes the simultaneous operations performed by the concurrent
users.
6. It also controls the backup and recovery operations.

 Data Dictionary:

 Data Dictionary, which stores metadata about the database, in particular the schema of the
database.
 names of the tables, names of attributes of each table, length of attributes, and number of rows in
each table.
 Detailed information on physical database design such as storage structure, access paths, files and
record sizes.
 Usage statistics such as frequency of query and transactions.
 Data dictionary is used to actually control the data integrity, database operation and accuracy. It
may be used as a important part of the DBMS

 Data Files:

 Which store the database itself.

 Compiled DML:
 The DML complier converts the high level Queries into low level file access commands known
as compiled DML.

 End Users:

 The second class of users then is end user, who interacts with system from online workstation or
terminals.
 Use the interface provided as an integral part of the database system software.

1. User can request, in form of query, to access database either directly by using particular language,
such as SQL, or by using some pre-developed application interface.
2. Such request are sent to query evaluation engine via DML pre-compiler and DML compiler
3. The query evaluation engine accepts the query and analyses it.
4. It finds the suitable way to execute the compiled SQL statements of the query.
5. Finally, the compiled SQL statements are executed to perform the specified operation
6. Query Processor Units:

Interprets DDL statements into a set of tables containing metadata.


Translates DML statements into low level instructions that the query evaluation engine
understands.
Converts DML statements embedded in an application program into procedure calls int
he host language.
Executes low level instructions generated by DML compiler.

a. DDL Interpreter
b. DML Compiler
c. Embedded DML Pre-compiler
d. Query Evalution Engine

7. Storage Manager Units

Checks the authority of users to access data.

Checks for the satisfaction of the integrity constraints.

Preserves atomicity and controls concurrency.

Manages allocation of splace on disk.

Fetches data from disk storage to memory for being used.

a. Authorization Manager
b. Integrity Manager
c. Transaction Manager
d. File manager
e. Buffer Manager
Users or DBMS
1. Online Users – These are the users who can communicate with DB directly using any online terminal
or indirectly through Application Interface.

- These users having very limited access and very average knowledge and skill of DB handling.

- E.g. A user visiting irctc.co.in web site to access Railway Database for booking online tickets.

2. Naïve Users - These are also called as end users or unsophisticated users.

- These users interacts with DB using previously created or installed application. These users may know
about the presence of DB system.

• E.g. a user operating ATM to perform bank transaction on his/her account.

3. Application Programmer – These are the professional programmers who are responsible for
developing application program or user interface utilized by the naive and online users.

- These programmers write the application programs in general purpose languages like VB, java,
COBOL, Assembly language, etc.

- These programmers may also use available tools to develop programs as per RAD(Rapid
Application Development).

- Today many high-end programming tools available which creates applications and also web
applications.

4. Sophisticated User – This user interacts with DB without using any application program.

- To complete any task, this user write queries to be compiled and executed by DBMS.

• Advantages Of DBMS:
1. Simplicity – as database is based on hierarchical structure, it’s design is simple.

2. Data Security –It is the first model which offers data security with the help of DBMS.

3. Data Sharing – As the database is stored in common place hence data can be shared between multiple
users.

4. Data Integrity – Because of parent child relationship, there will be first a parent segment and then
child.
5. Data Independence – It separates / isolates program and complex storage. If there are changes in data
no change in application program with less maintenance.

6. Efficiency – It is very efficient if DB contains large numbers of records with 1:m (one-t0-many)
relationships

Disadvantages
1. Implementation Complexity – Hierarchical DB is conceptually simple and easy to deign but
complex to implement.

- It needs good knowledge of physical data storage characteristics.

- Also if there is change in DB structure, it also needs changes in application programs

2. Inflexibility –Hierarchical DB is not flexible i.e not easy to change. If changes are made, it creates
more complexed DB model. If any segment deleted, it may cause error in whole DB str.

3. Database Management Problems – If any change is made in DB, it also needs changes in its
application program hence the maintenance becomes very difficult.

4. No Structural Independence – If there is change in DB then the functions in DBMS to access data
also to be changed

What is RDBMS (Relational Database


Management System)
RDBMS stands for Relational Database Management System.

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 Database Management System (RDBMS) because it is based on the


relational model introduced by E.F. Codd.

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

A relational database is the most commonly used database. It contains several tables, and each
table has its primary key.
Due to a collection of an organized set of tables, data can be accessed easily in RDBMS.

Brief History of RDBMS


From 1970 to 1972, E.F. Codd published a paper to propose using a relational database model.

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

Following are the various terminologies of RDBMS:

What is table/Relation?
Everything in a relational database is stored in the form of relations. 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. Each table represents some real-world objects such as person, place, or event about
which information is collected. The organized collection of data into a relational table is known
as the logical view of the database.

Properties of a Relation:

o Each relation has a unique name by which it is identified in the database.


o Relation does not contain duplicate tuples.
o The tuples of a relation have no specific order.
o All attributes in a relation are atomic, i.e., each cell of a relation contains exactly one
value.
A table is the simplest example of data stored in RDBMS.

Let's see the example of the 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 a row or record?


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

Properties of a row:

o No two tuples are identical to each other in all their entries.


o All tuples of the relation have the same format and the same number of entries.
o The order of the tuple is irrelevant. They are identified by their content, not by their
position.

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

ID Name AGE COURSE

1 Ajeet 24 B.Tech
What is a column/attribute?
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 a student's name.

Properties of an Attribute:

o Every attribute of a relation must have a name.


o Null values are permitted for the attributes.

Database Schema
A database schema is a structure that represents the logical storage of the data in
a database. It represents the organization of data and provides information about the
relationships between the tables in a given database. In this topic, we will understand
more about database schema and its types. Before understanding database schema, lets
first understand what a Database is.

What is Database?
A database is a place to store information. It can store the simplest data, such as a list of
people as well as the most complex data. The database stores the information in a well-
structured format.

What is Database Schema?


o A database schema is the logical representation of a database, which shows how
the data is stored logically in the entire database. It contains list of attributes and
instruction that informs the database engine that how the data is organized and
how the elements are related to each other.
o A database schema contains schema objects that may include tables, fields,
packages, views, relationships, primary key, foreign key,
o In actual, the data is physically stored in files that may be in unstructured form,
but to retrieve it and use it, we need to put it in a structured form. To do this, a
database schema is used. It provides knowledge about how the data is organized
in a database and how it is associated with other data.
o The schema does not physically contain the data itself; instead, it gives
information about the shape of data and how it can be related to other
tables or models.
o A database schema object includes the following:
o Consistent formatting for all data entries.
o Database objects and unique keys for all data entries.
o Tables with multiple columns, and each column contains its name and
datatype.

You might also like