CH1 Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Definition

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.
End User: - They are the real users of the database. They can be developers, designers, administrator
or the actual users of the database.
DDL: - Data Definition Language (DDL) is a query fired to create database, schema, tables, mappings
etc in the database. These are the commands used to create the objects like tables, indexes in the
database for the first time. In other words, they create structure of the database.
DDL Compiler: - This part of database is responsible for processing the DDL commands. That means
these compilers actually breaks down the command into machine understandable codes. It is also
responsible for storing the metadata information like table name, space used by it, number of columns
in it, mapping information 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.
One can imagine this as when a person is asked some question, how this is broken down into waves
to reach the brain!
Query Optimizer: - When user fires some request, he is least bothered how it will be fired on the
database. He is not all aware of database or its way of performance. But whatever be the request, it
should be efficient enough to fetch, insert, update or delete the data from the database. The query
optimizer decides the best way to execute the user request which is received from the DML compiler.
It is similar to selecting the best nerve to carry the waves to brain!
Stored Data Manager: - This is also known as Database Control System. It is one the main central
system of the database. It is responsible for various tasks
It converts the requests received from query optimizer to machine understandable form. It makes
actual request inside the database. It is like fetching the exact part of the brain to answer.
It helps to maintain consistency and integrity by applying the constraints. That means, it does not
allow inserting / updating / deleting any data if it has child entry. Similarly it does not allow entering
any duplicate value into database tables.
It controls concurrent access. If there is multiple users accessing the database at the same time, it
makes sure, all of them see correct data. It guarantees that there is no data loss or data mismatch
happens between the transactions of multiple users.
It helps to backup the database and recover data whenever required. Since it is a huge database and
when there is any unexpected exploit of transaction, and reverting the changes are not easy. It
maintains the backup of all data, so that it can be recovered.
Data Files: - It has the real data stored in it. It can be stored as magnetic tapes, magnetic disks or
optical disks.
Compiled DML: - Some of the processed DML statements (insert, update, delete) are stored in it so
that if there is similar requests, it will be re-used.
Data Dictionary: - It contains all the information about the database. As the name suggests, it is the
dictionary of all the data items. It contains description of all the tables, view, materialized views,
constraints, indexes, triggers etc.

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.

The components of DBMS can be divided into two parts:

Components of a DBMS

Function and Services of DBMS


1. DDL Compiler:
o Data Description Language compiler processes schema definitions specified in the DDL.
o It includes metadata information such as the name of the files, data items, storage details
of each file, mapping information and constraints etc.
2. DML Compiler and Query optimizer:
o 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.
o 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.
3. Data Manager:
o The Data Manager is the central software component of the DBMS also knows as Database
Control System.
o 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.
4. Data Dictionary:
o Data Dictionary, which stores metadata about the database, in particular the schema of
the database.
o names of the tables, names of attributes of each table, length of attributes, and number
of rows in each table.
o Detailed information on physical database design such as storage structure, access paths,
files and record sizes.
o Usage statistics such as frequency of query and transactions.
o 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
5. Data Files:
o Which store the database itself.
6. Compiled DML:
o The DML complier converts the high level Queries into low level file access commands
known as compiled DML.
7. End Users:
o The second class of users then is end user, who interacts with system from online
workstation or terminals.
o Use the interface provided as an integral part of the database system software.
o 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.
o Such request are sent to query evaluation engine via DML pre-compiler and DML compiler
o The query evaluation engine accepts the query and analyses it.
o It finds the suitable way to execute the compiled SQL statements of the query.
o Finally, the compiled SQL statements are executed to perform the specified operation
o 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.
1. DDL Interpreter
2. DML Compiler
3. Embedded DML Pre-compiler
4. Query Evalution Engine
9. 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 space on disk.

Fetches data from disk storage to memory for being used.


1. Authorization Manager
2. Integrity Manager
3. Transaction Manager
4. File manager
5. Buffer Manager
 Functions of DBMS:
1. DBMS free the programmers from the need to worry about the organization and
location of the data i.e. it shields the users from complex hardware level details.
2. DBMS can organize process and present data elements from the database. This
capability enables decision makers to search and query database contents in
order to extract answers that are not available in regular Reports.
3. Programming is speeded up because programmer can concentrate on logic of the
application.
4. It includes special user friendly query languages which are easy to understand by
non-programming users of the system.
 The service provided by the DBMS includes:-
1. Authorization services like log on to the DBMS start the database stop the
Database etc.
2. Transaction supports like Recovery, Rollback etc,
3. Import and Export of Data.
4. Maintaining data dictionary
5. User's Monitoring

Functions and responsibilities of DBAs


DBA: person in the organization who controls the design and the use of the database refers
as DBA.
1. Schema Definition:
 The DBA definition the logical Schema of the database. A Schema refers to the overall
logical structure of the database.
 According to this schema, database will be developed to store required data for an
organization.
2. Storage Structure and Access Method Definition:
 The DBA decides how the data is to be represented in the stored database.
3. Assisting Application Programmers:
 The DBA provides assistance to application programmers to develop application
programs.
4. Physical Organization Modification:
 The DBA modifies the physical organization of the database to reflect the changing
needs of the organization or to improve performance.
5. Approving Data Access:
 The DBA determines which user needs access to which part of the database.
 According to this, various types of authorizations are granted to different users.
6. Monitoring Performance:
 The DBA monitors performance of the system. The DBA ensures that better
performance is maintained by making changes in physical or logical schema if
required.
7. Backup and Recovery:
 Database should not be lost or damaged.
 The DBA ensures this periodically backing up the database on magnetic tapes or
remote servers.
 In case of failure, such as virus attack database is recovered from this backup.

Functions of DBMS:

o DBMS free the programmers from the need to worry about the organization and location
of the data i.e. it shields the users from complex hardware level details.
o DBMS can organize process and present data elements from the database. This capability
enables decision makers to search and query database contents in order to extract
answers that are not available in regular Reports.
o Programming is speeded up because programmer can concentrate on logic of the
application.
o It includes special user friendly query languages which are easy to understand by non
programming users of the system.

The service provided by the DBMS includes :-

o Authorization services like log on to the DBMS start the database stop the Database etc.
o Transaction supports like Recovery, Rollback etc,
o Import and Export of Data.
o Maintaining data dictionary
o User's Monitoring
Entity-Relationship Model
Entity-Relationship (ER) Model is based on the notion of real-world entities and relationships among
them. While formulating real-world scenario into the database model, the ER Model creates entity
set, relationship set, general attributes and constraints.
ER Model is best used for the conceptual design of a database.
ER Model is based on − Entities and their attributes. Relationships among entities.
Entity − An entity in an ER Model is a real-world entity having properties called attributes. Every
attribute is defined by its set of values called domain. For example, in a school database, a student is
considered as an entity. Student has various attributes like name, age, class, etc.
Relationship − The logical association among entities is called relationship. Relationships are mapped
with entities in various ways. Mapping cardinalities define the number of association between two
entities.

Hierarchical Model
This database model organises data into a tree-like-structure, with a single root, to which all the other
data is linked. The hierarchy starts from the Root data, and expands like a tree, adding child nodes to
the parent nodes.
In this model, a child node will only have a single parent node.
This model efficiently describes many real-world relationships like index of a book, recipes etc.
In hierarchical model, data is organised into tree-like structure with one one-to-many relationship
between two different types of data, for example, one department can have many courses, many
professors and of-course many students.

Network Model
This is an extension of the Hierarchical model. In this model data is organised more like a graph, and
are allowed to have more than one parent node.
In this database model data is more related as more relationships are established in this database
model. Also, as the data is more related, hence accessing the data is also easier and fast. This database
model was used to map many-to-many data relationships.This was the most widely used database
model, before Relational Model was introduced.

You might also like