DBMS, Unit-2
DBMS, Unit-2
Components of DBMS:
1. Software
2. Hardware
3. Procedures
4. Data
5. Users
Software
The main component of a Database Management System is the software. It is the set of
programs that are used to manage the database and control the overall computerized
database.
The DBMS software provides an easy-to-use interface to store, retrieve, and update
data in the database.
This software component is capable of understanding the Database Access Language
and converts it into actual database commands to execute or run them on the database.
Hardware
Procedures
Data
Users
The users are the people who control and manage the databases and perform different
types of operations on the databases in the database management system.
1) Application Programmers
2) Database Administrators
3) End-Users
1. Application Programmers
The users who write the application programs in programming languages (such as Java,
C++, or Visual Basic) to interact with databases are called Application Programmers.
A person who manages the overall DBMS is called a database administrator or simply
DBA.
3. End-Users
The end-users are those who interact with the database management system to
perform different operations by using the different database commands such as insert,
update, retrieve, and delete on the data, etc.
Database
Languages
Create, Insert,
Alter, Update,
Drop, grant, rollback,
Delete,
Rename, revoke savepoint,
Select
Truncate commit
Data Definition Language is used for defining the structure or schema of the database.
It is also used for creating tables, indexes, applying constraints, etc. in the database.
The result of compilation of DDL statements is a set of tables that is stored in a special
file called data dictionary or data directory – which contains metadata (data about
data).
A data dictionary is a file that contains metadata (data about data).
This language is used by the conceptual schema to access and retrieve the records
from/to the database respectively, where these records describe entities, relationships,
and attributes.
Alter: This command is used to alter or change the structure of the database table.
Drop: This command is used to delete a table, index, or views from the database.
Truncate: This command is used to delete the records or data from the table, but its
structure remains as it is.
Rename: This command is used to rename an object from the database.
Syntax:
alter table tablename rename to new_tablename;
Example :
Alter table student
Rename to student1;
It allow user to insert, update, delete and retrieve data from the database.
DML is also known as query language. A query language is a specialized programming language
for searching and changing the contents of a database. A well-known example is the Structured
Query Language.
Select: This command is used to retrieve or access the data from the database table.
o For Example : select * from student;
Insert: This command is used to insert the records into the table.
DCL is used to grant and revoke access permission from any database user.
To perform any operation in databases, such as for creating tables, sequences, or views, we
need privileges.
Grant:
There will be different types of users depending on their needs and way of accessing the
database.
1) Naïve Users
2) Application Users
3) Sophisticated Users
4) Specialized Users
Naïve users are unsophisticated users who do not have any knowledge of the database.
Their task is to just use to developed application and get the desired result.
For example:
The clerical staff in the bank is a naïve users. They don’t have any DBMS knowledge
but they still use the database and perform their given task.
2)Application Programmer :
They are the developers who interact with the database by means of DML queries.
These DML queries are written in the application programs like C, C++, JAVA, Pascal, etc.
These queries are converted into object code to communicate with the database.
They are computer professionals. Application programmers are users who are responsible
for developing the application programs or user interface.
For example :
writing a C program to generate the report of employees who are working in a
particular department will involve a query to fetch the data from the database. It
will include an embedded SQL query in the C Program.
3) Sophisticated Users –
Created By: Krupa Patel Page 8
They are database developers, who write SQL queries to select/insert/delete/update
data.
They do not use any application or programs to request the database.
They directly interact with the database by means of a query language like SQL.
These users will be scientists, engineers, and analysts who thoroughly study SQL and DBMS
to apply the concepts to their requirements.
In short, we can say this category includes designers and developers of DBMS and SQL.
4) Specialized Users –
These are also sophisticated users, but they write special database application programs.
They are the developers who develop the complex programs to the requirement.
For example:
Specialized users create applications such as computer-aided design, expert systems,
and knowledge bases that can store more complicated data types than any simple
application program.
1. Schema Definition:
The DBA defines the logical Schema of the database.A Schema refers to the overall logical
structure of the database.
According to this schema, a database will be developed to store required data for an
organization.
The DBA decides how the data is to be represented in the stored database.
The DBA modifies the physical organization of the database to reflext the changing
needs of the organization or to improve performance.
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 the performance of the system. The DBA ensures that better
performance is maintained by making changes in physical or logical schema if required.
There are two levels of data independence based on three levels of abstraction.
This is defined as the ability to change the physical level without affecting the logical level
or conceptual level is called Physical Data Independence.
This is defined as the ability to change the logical (conceptual) schema without changing
the external schema (user View) is called logical Data Independence.
For example :
The addition or removal of new entities, attributes, and relationships to the
conceptual schema should be possible without having to change the existing external
schema or having to rewrite existing application programs.
============================