Dbms-Unit-1-Database and Database Users
Dbms-Unit-1-Database and Database Users
Databases and
Database Users
INTRODUCTION
Introduction
Themain purpose od database system is to manage the
data.
Data is collection of facts, such as numbers, words,
measurements, observations or even just descriptions of
things.
Data is the plural of datum(a single piece of information).
When data is processed, organized, structured or presented
in a given context to make it useful or meaningful, it is
known as information.
What is Database
The database is a collection of inter-related data
which is used to retrieve, insert and delete the
data efficiently.
It is also used to organize the data in the form of
a table, schema, views, and reports, etc.
For example: The college Database organizes
the data about the admin, staff, students and
faculty etc.
Why Database?
Manage large amounts of data: A database stores and manages a large amount
of data on a daily basis.
Easy to update data: In a database, it is easy to update data using various Data
Manipulation Languages(DML).
Easy to research data: It is very easy to access and research data in a database.
This is done using DQL which allow searching of any data in the database and
performing computations on it.
Security of data: There are user logins required before accessing a database and
various access specifiers. These allow only authorized users to access the database.
Data integrity: This is ensured in databases by using various constraints for data.
Data integrity in databases makes sure that the data is accurate and consistent in a
database.
Accuracy: A database is accurate as it has all sorts of build in constraints, checks
etc. This means that the information available in a database is guaranteed to be
correct in most cases.
Database Management
System
Database management system is a software which is used
to manage the database.
For example: MySQL, Oracle, etc are a very popular
commercial database which is used in different applications.
DBMS provides an interface to perform various operations
like database creation, storing data in it, updating data,
creating a table in the database and a lot more.
It provides protection and security to the database. In the
case of multiple users, it also maintains data consistency.
DBMS allows users the following
tasks:
Data Definition: It is used for creation, modification and removal of
definition that defines the organization of data in the database.
Data Updation: It is used for the insertion, modification and deletion of
the actual data in the database.
Data Retrieval: It is used to retrieve the data from the database which
can be used by applications for various purpose.
User Administration: It is used for registering and monitoring users,
maintain data integrity(set of rules that are used to maintain the
information’s quality), enforcing data security, dealing with concurrency
control(a method used to manage simultaneous operations on the
database letting them interfere with each other), monitoring performance
and recovering information corrupted by unexpected failure.
The Database Approach
TheDatabase Approach is used for storing and maintaining
the data where the data is defined once and stored in a
single location and accessed by multiple users from this
location.
Various Characteristics of Database Approach
1. Self-Describing Nature of a
Database System
In the traditional file management system, data definition was not a part of the
application, but in the database approach, the data is defined by the users and this
defined data describes itself.
What is this metadata? Metadata means data about data, like the constraints in the
database, the structure of the database, the columns of the database, etc.
2. Insulation between Programs and
Data, and Data Abstraction
The DBMS or Database Management System provides the conceptual view of the data that is
easily readable to the user and hides many details of the data such as how the data is stored
or the constraints used on the data.
This conceptual view is known as the data model.
Hence the data model hides the implementation and storage details of the data thus creating
insulation between the program and the data.
For example following details of the STUDENTS database will be shown to the user,
ROLL_NO, NAME, DEPARTMENT
and the following details will not be shown as these are unnecessary for the user,
ROLL_NO is INT,
NAME is VARCHAR,
DEPARTMENT is VARCHAR
3. Support of Multiple Views
of the Data
In the Database Approach, a single database is
implemented and multiple users access this
database.
For example for the STUDENTS database, the
Head of the Department of CSE will only access
the students having CSE as their department,
the dean can access the student details of
every student in the STUDENTS database.
4. Sharing of Knowledge and
Multi-user Transaction Processing
A transaction is a process that is accessing one or
more databases by reading, writing, or deleting the
data records.
Multi-userTransaction Processing as the name implies
that the database must allow multiple users to
process their respective transactions.
It should also ensure that the transactions are
processed concurrently so that multiple users can't
change a record at the same instant.
Actors on the Scene
1. Database Administrators (DBA)
2. Database Designers
3. System Analysts
4. Application Programmers / Back-End
Developers
5. Naive Users / Parametric Users
6. Sophisticated Users
7. Casual Users / Temporary Users
Database Administrators (DBA)
Database Administrators (DBA) are the most important type of database users in DBMS.
Database Administrator is an individual or a team of users who define the database
schema and takes charge of controlling various levels of the database within the organization.
They work alongside developers in order to discuss and design the overall structure of the
database including layouts, functionalities, workflow, etc.
Database Administrators (DBAs) can grant or revoke authorization permission to all other
users at any point of time.
They have to update the database timely in terms of technology, functionality, and
workflow in order to meet future requirements and in making the database ready for future
scope.
Database Administrators (Database admins) are also responsible to keep a check on data
integrity, data consistency, data redundancy, hardware and software installation requirements,
and routine maintenance of the databases.
They are also responsible for handling data loss, which can be caused due to any error or even
due to system failures.
Database Administrators (DBAs) monitor the backup & recovery of the database records and
provide technical support as well. If the technical team raises any concern, DBAs have to resolve
it.
Database Designers?
Database Designers are the users in DBMS who design
and create the structure of the
database including triggers, indexes, schemas, entity
relationships, tables, constraints, etc.
Database Designers are the type of database users in
DBMS who are responsible for implementing the overall
design of the database.
Theydecide which form of data needs to be stored, what
kind of relations exist among different entities of the
database, what will be the type of attributes etc.
Naive Users / Parametric Users
Naive users also known as Parametric End users, don't have any
knowledge of DBMS but still frequently use the database applications
to get the desired results. (With the help of the interface provided by
the DBMS applications)
Naive users mostly use the database to fill in or retrieve the
information.
Naive users don't need to be aware of the presence of the database
system as they can interact with the database with the help of menu-
driven application interface.
For example: Railway ticket booking users in general are
naive/parametric end users as they don't have much knowledge about
DBMS and directly use railway booking application to book their
tickets.
System Analyst
System Analysts are the type of database users in DBMS
who analyze the requirements of Naive / Parametric End
users.
It is their responsibility to check whether all the requirements of
end users are satisfied or not.
Analyzing feasibility, economic and technical aspects are
some of the major responsibilities for a system analyst in DBMS.
They usually check and gather all the necessary information
related to the database, and if needed, they can change
or update the final layout of the database as per requirements.
System Analysts always make sure that the final product should
meet all the requirements.
Application Programmers / Back-End
Developers
Application Programmers also known as Back-End Developers,
are computer professional users who are responsible for developing
the application programs or the user interface so that other users
can use these applications to interact with the database.
Application Programmers have deep knowledge of DBMS & databases
and know everything in detail. They interact with the database
using DML (Data Manipulation Language) queries to store data
inside the database and when needed, they can also fetch the data
from it.
When needed, Application Programmers also specify the
modifications needed in the database structure for an application.
They are efficient enough in designing or developing their database
in any language they know.
Sophisticated Users
Sophisticated users are the type of database users in DBMS who
know DBMS (DDL & DML commands) and are familiar with the
database.
Sophisticated users can be business analysts, engineers, scientists,
system analysts, etc.
Sophisticated users can develop or access their database applications
according to the requirements, without actually writing the program code
for it.
These users are also known as SQL programmers as they can
interact with the database directly using SQL queries using query
processors.
Using SQL queries, they can fetch the data from the database. They can
also delete, update or insert new data into the database.
Casual Users / Temporary Users
Tuples : Each row in the table is called tuple. A row contains all
the information about any instance of the object. In the above
example, each row has all the information about any specific
individual like the first row has information about John.
Attribute or field: Attributes are the property which defines the
table or relation. The values of the attribute should be from the
same domain. In the above example, we have different attributes
of the employee like Salary, Mobile_no, etc.
Advantages of Relational Model
Simple: This model is more simple as compared to the network and hierarchical
model.
Scalable: This model can be easily scaled as we can add as many rows and columns
we want.
Structural Independence: We can make changes in database structure without
changing the way to access the data. When we can make changes to the database
structure without affecting the capability to DBMS to access the data we can say that
structural independence has been achieved.
Disadvantages of Relational Model
Hardware Overheads: For hiding the complexities and making things easier for the
user this model requires more powerful hardware computers and data storage
devices.
Bad Design: As the relational model is very easy to design and use. So the users
don't need to know how the data is stored in order to access it. This ease of design
can lead to the development of a poor database which would slow down if the
database grows.
But all these disadvantages are minor as compared to the advantages of the
relational model. These problems can be avoided with the help of proper
implementation and organisation.
Object-Oriented Data Model
The real-world problems are more closely represented through the
object-oriented data model.
In this model, both the data and relationship are present in a single
structure known as an object.
We can store audio, video, images, etc in the database which was not
possible in the relational model(although you can store audio and
video in relational database, it is adviced not to store in the relational
database).
In this model, two are more objects are connected through links. We
use this link to relate one object to other objects. This can be
understood by the example given below.
In the above example, we have two objects Employee and
Department. All the data and relationships of each object are
contained as a single unit. The attributes like Name, Job_title of the
employee and the methods which will be performed by that object
are stored as a single object. The two objects are connected
through a common attribute i.e the Department_id and the
communication between these two will be done with the help of this
common id.
Object-Relational Model
As the name suggests it is a combination of both the relational model and the object-
oriented model. This model was built to fill the gap between object-oriented model
and the relational model. We can have many advanced features like we can make
complex data types according to our requirements using the existing data types. The
problem with this model is that this can get complex and difficult to handle. So,
proper understanding of this model is required.
Semi-Structured Model
Semi-structured model is an evolved form of the relational model. We cannot
differentiate between data and schema in this model.
Example: Web-Based data sources which we can't differentiate between the schema
and data of the website. In this model, some entities may have missing attributes
while others may have an extra attribute. This model gives flexibility in storing the
data. It also gives flexibility to the attributes.
Example: If we are storing any value in any attribute then that value can be either
atomic value or a collection of values.
Associative Data Model
Associative Data Model is a model in which the data is divided into two
parts. Everything which has independent existence is called as
an entity and the relationship among these entities are
called association . The data divided into two parts are called items and
links.
Item : Items contain the name and the identifier(some numeric value).
Links: Links contain the identifier, source, verb and subject.
Example : Let us say we have a statement "The world cup is being
hosted by London from 30 May 2020". In this data two links need to be
stored:
The world cup is being hosted by London. The source here is 'the
world cup', the verb 'is being' and the target is 'London'.
...from 30 May 2020. The source here is the previous link, the verb is
'from' and the target is '30 May 2020'.
Context Data Model