Different types of Database Users
Database users are categorized based up on their
interaction with the database. These are seven types of
database users in DBMS.
1. Database Administrator (DBA) : Database
Administrator (DBA) is a person/team who
defines the schema and also controls the 3 levels
of database. The DBA will then create a new
account id and password for the user if he/she
need to access the database.
DBA is also responsible for providing security to
the database and he allows only the authorized
users to access/modify the data base.
DBA is responsible for the problems such as
security breaches and poor system response
time.
DBA also monitors the recovery and
backup and provide technical support.
The DBA has a DBA account in the DBMS
which called a system or superuser
account.
DBA repairs damage caused due to
hardware and/or software failures.
DBA is the one having privileges to
perform DCL (Data Control Language)
operations such as GRANT and REVOKE,
to allow/restrict a particular user from
accessing the database.
Schema :
Schema is the overall description of the database. The basic
structure of how the data will be stored in the database is
called schema.
Schema is of three types: Logical Schema, Physical Schema
and view Schema.
1. Logical Schema – It describes the database designed
at logical level.
2. Physical Schema – It describes the database
designed at physical level.
3. View Schema – It defines the design of the database
at the view level.
Example –
Let’s say a table teacher in our database name school, the
teacher table require the name, dob, doj in their table so we
design a structure as :
Teacher table
name: String
doj: date
dob: date
2. Naive / Parametric End Users : Parametric
End Users are the unsophisticated who don’t
have any DBMS knowledge but they frequently
use the database applications in their daily life to
get the desired results. For examples, Railway’s
ticket booking users are naive users. Clerks in
any bank is a naive user because they don’t
have any DBMS knowledge but they still use the
database and perform their given task.
3. System Analyst :
System Analyst is a user who analyses the
requirements of parametric end users. They
check whether all the requirements of end users
are satisfied.
4. Sophisticated Users : Sophisticated users can
be engineers, scientists, business analyst, who
are familiar with the database. They can develop
their own database applications according to
their requirement. They don’t write the program
code but they interact the database by writing
SQL queries directly through the query
processor.
5. Database Designers : Data Base Designers are
the users who design the structure of database
which includes tables, indexes, views, triggers,
stored procedures and constraints which are
usually enforced before the database is created
or populated with data. He/she controls what
data must be stored and how the data items to
be related. It is responsibility of Database
Designers to understand the requirements of
different user groups and then create a design
which satisfies the need of all the user groups.
6. Application Programmers : Application
Programmers also referred as System Analysts
or simply Software Engineers, are the back-end
programmers who writes the code for the
application programs. They are the computer
professionals. These programs could be written
in Programming languages such as Visual Basic,
Developer, C, FORTRAN, COBOL etc. Application
programmers design, debug, test, and maintain
set of programs called “canned transactions” for
the Naive (parametric) users in order to interact
with database.
7. Casual Users / Temporary Users : Casual
Users are the users who occasionally use/access
the database but each time when they access
the database they require the new information,
for example, Middle or higher level manager.
Types of Database Languages
1. Data Definition Language (DDL)
o DDL stands for Data Definition Language. It is
used to define database structure or pattern.
o It is used to create schema, tables, indexes,
constraints, etc. in the database.
o Using the DDL statements, you can create the
skeleton of the database.
o Data definition language is used to store the
information of metadata like the number of tables
and schemas, their names, indexes, columns in
each table, constraints, etc.
Here are some tasks that come under DDL:
o Create: It is used to create objects in the
database.
o Alter: It is used to alter the structure of the
database.
o Drop: It is used to delete objects from the
database.
o Truncate: It is used to remove all records from
a table.
These commands are used to update the database
schema that's why they come under Data definition
language.
2. Data Manipulation Language (DML)
DML stands for Data Manipulation Language. It is used
for accessing and manipulating data in a database. It
handles user requests.
Here are some tasks that come under DML:
o Insert: It is used to insert data into a table.
o Update: It is used to update existing data within a
table.
o Delete: It is used to delete all records from a
table.
3. Data Control Language (DCL)
o DCL stands for Data Control Language. It is used
to retrieve the stored or saved data.
o The DCL execution is transactional. It also has
rollback parameters.
(But in Oracle database, the execution of data
control language does not have the feature of
rolling back.)
Here are some tasks that come under DCL:
o Grant: It is used to give user access privileges to a
database.
o Revoke: It is used to take back permissions from
the user.
There are the following operations which have the
authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE
and SELECT.
4. Transaction Control Language (TCL)
TCL is used to run the changes made by the
DML statement. TCL can be grouped into a
logical transaction.
Here are some tasks that come under TCL:
o Commit: It is used to save the transaction on the
database.
o Rollback: It is used to restore the database to
original since the last Commit.
What are the characteristics of DBMS software?
1. Real-world entity
Data management systems have been designed keeping in
mind the needs of business organizations. They help
businesses manage large amounts of data efficiently. These
systems store huge volumes of data and provide easy ways to
search through them. Some examples of such applications are
Microsoft Access, Oracle, MySQL, etc.
2. Relational databases
Relational databases were first introduced in the 1970s. In this
type of database, each record contains fields called attributes.
Each attribute represents one piece of information about a
particular object.
For example:
If you want to keep track of your personal details then you will
need three different attributes namely name, address, phone
number. All of these attributes together form a single row in a
table. This means that every time we add new information into
our database, we must insert multiple rows into the same
table.
If we do not follow this rule then we may end up having
duplicate entries in our database. So relational databases
allow us to organize data using relations between objects.
3. Structured query language
Structured Query Language was developed in the 1980s. It
provides a way to write queries against a database. Queries
written in SQL are known as structured queries because they
use predefined structures to define relationships among
entities.
An example would be:
SELECT * FROM employees WHERE department 'IT'. Here,
the word ‘*’ stands for all columns from the employee table.
We can also specify only certain columns while selecting other
ones.
Another important feature of SQL is its ability to combine two
statements into one statement.
4. Isolation of data and application
A database system is not the same thing as its data. A
database works and organizes, whereas data is said to be
passive. Metadata, which is data about data, is stored by the
database management system.
Also, in a traditional file management system, the structure of
data files is defined in the application programs so the user
had to change everything. But in DBMS, the structure of data
files is not stored in the program but it is stored in the system
catalogue. Internal improvement of data efficiency or any
changes in the data doesn't have an effect on application
software with the help of this- that is, it offers insulation
between Data and Program.
5. ACID properties
DBMS adheres to the concepts
of Atomicity, Consistency, Isolation, and Durability, or ACID
Properties. These concepts are applied to transactions, which
operate and play around with data in a database. In multi-
transactional environments, ACID properties help the database
stay healthy in case of failure.
Any changes that occur in any particular
transaction will not be seen by other
transactions until the change is not
committed in the memory.
Example: If two operations are concurrently
running on two different accounts, then the
value of both accounts should not get
affected. The value should remain
persistent.
6. Multiuser and concurrent access
Data can be accessed and manipulated in parallel with the
help of the DBMS. Users are unaware of the restrictions on
transactions when handling the same data item.
DBMS offers multiple views for various clients. A client who is
in the Sales division will have an alternate perspective on the
database than an individual working in the Production office.
This component empowers the clients to have a concentrated
perspective on the database as indicated by their
prerequisites.
7. Object oriented programming
Object oriented programming is another technique used to
design programs. Objects contain properties and methods.
Properties represent variables or constants which hold values.
Methods are procedures that operate on those properties. The
main advantage of OOP over procedural programming is that it
allows developers to create reusable components by
encapsulating their functionality within classes. Classes are
collections of related code and data elements. Developers can
reuse existing classes instead of writing similar pieces of code
again and again.
8. Transactional processing
Transactions are an essential part of any application.
Transactions ensure consistency across multiple users
accessing the system at the same time. When transactions fail
due to errors, the entire transaction should roll back so that no
changes made during the failed operation remain permanent.
Transaction processing ensures that when there is a problem,
everything remains consistent.
9. Data mining
Data mining refers to techniques used to analyse vast
quantities of unstructured data. There are many types of data
mining algorithms like classification, clustering, association
rules, regression analysis, decision trees, neural networks,
genetic algorithms, etc.
Classification involves grouping records based on some
common characteristics.
Clustering groups records with similar features under one
category.
Association rules look for patterns in sets of items and
suggest possible combinations of items that occur
frequently together.
Decision tree classifies records according to various
factors.
The neural network uses artificial intelligence to learn how
to classify records.
The genetic algorithm helps find optimal solutions to
problems.
10. Distributed database systems
Distributed databases store information across several
computers connected through a computer network. This type of
architecture makes it easy to add more servers without having
to rebuild the whole software infrastructure. A distributed
database has three parts: client applications, server
applications, and shared storage. Client applications access
the shared storage using standard protocols such as TCP/IP.
Server applications provide services to clients. Shared storage
provides persistent storage space where all the data resides.
In addition, each node stores metadata about other nodes in
the cluster.
11. Less redundancy and consistency
The DBMS follows the rules of normalization, which splits a
relation when there is more than one attribute with the same
value. Normalization is a method of reducing data redundancy.
Every relation in a database is consistent, that's the state of
consistency. Attempts to leave databases in different states
can be detected with methods and techniques. A database
management system can give greater consistency than earlier
forms of data storage.
12. Data security and integrity
DBMS gives security to the information put away in this is on
the grounds that all clients have different rights to access the
database. A portion of the client can get to the entire
information in the database while others can get to a small
segment of the database.
For instance, a fluid mechanics instructor can only access
those documents that are identified with his subject, however,
the HOD of the division can get to records of all subjects that
are identified with their department.
One of the main attributes of a database management system
(DBMS)-integrity guarantees the quality and dependability of
the database framework. It protects from unapproved access to
the database and makes it safer. It allows only consistent and
exact information into the database.
Data Abstraction in DBMS
Overview
Data abstraction is the method of hiding the
unimportant details that are present in the database
from the end users to make the accessing of data easy
and secure.
Scope
In this article on Data Abstraction, we will look at the
following points:
What data abstraction is and how it is related to
our daily lives.
The different layers of data abstraction in DBMS.
Introduction
Data abstraction is present in our daily lives. Let us
take a small example. Say, someone, asks you to
switch on the fans in a room. All you will need to do is
simply walk to the switchboard and turn on the
switch for the fan, that’s it! Do you need to know
where the electricity is coming from, how the poles of
the switch are connected, or exactly what the internal
working of a fan is? The answer to all this is NO! That
is what data abstraction is, all these background
details are hidden from you inside the switchboard!
All the databases have complex data structures which
are, in fact, of no use to an end user. Thus, these
internal irrelevant details are hidden from the user,
making the accessing of data simple and increasing
the security of the data as well. This is what Data
Abstraction is.
Levels of Data Abstraction in DBMS
The data abstraction in DBMS is implemented
in 3 layers:
Physical or Internal Level
Logical or Conceptual Level
View or External Level
The following diagram will give you a clear view of
how the implementation is done.
Starting from the very bottom, we have the physical
or internal layer, then we have the middle layer,
the logical or conceptual layer, and finally, we have
the view or external layer.
Let us discuss each of these three layers in detail.
Physical Level or Internal Level
This is the layer of data abstraction where the raw
data is physically stored as files. This layer contains all
the complex data structures and the data accessing
methods defined. The physical layer is the lowest
level of data abstraction in a DBMS. It is the database
administrator who decides how the data is to be
stored in these physical hard drives.
Example:
When we access data we may get a single data or a
table of data. Moreover, by the term "relational
database" we visualize a table of rows and columns.
But at a physical level, these tables are stored in hard
drives which are located at a very secure data centre.
Logical Level or Conceptual Level
After taking the raw data from the physical or internal
level, the structure of the data is defined at the logical
or conceptual level. This is like a blueprint of the raw
data. This layer does not have any information about
how the end user will view the data.
Example:
We have data of a few products like product id,
product name, and manufacturing date, and we have
another set of data of customers containing customer
id, customer name, and customer address. Now, we
need to frame this data in proper tables of products
and customers. After that, we can even frame a join to
show which product has been ordered by which
customer.
View Level or External Level
This is what an end-user gets to see. He/she does not
get the entire database, but depending on the queries
made from the front-end the user gets to see the data.
It may be a single data from the entire database or a
collection of data in tabular format. Multiple views of
the same data are available to the user, the
representation can be a table, a graph, or a pie chart.
View Level is the highest level of data abstraction in
DBMS.
Example:
Concerning the example in the logical level section,
let us say a customer wants to view the order history,
he gets to see only the orders he had made in the
past. Now, let us say a shop owner needs to see the
products that are on the order list. He gets to see a
table containing all the info about the products and
the customers to whom they need to be delivered.
Conclusion
Data abstraction in DBMS means hiding
unnecessary background details from the end
user to make the accessing of data easy and
secure.
In DBMS, there are 3 levels of data abstraction:
o Physical Level or Internal Level: This is the
layer where the raw data is stored in file
format on physical hard drives.
o Logical Level or Conceptual Level: In this
layer, the raw data is taken from the physical
layer and organized in a proper structure, like
in tabular format.
o View Level or External Level: At this level,
the end users get the data depending on the
queries. The same data can be viewed in
multiple ways, like tables, graphs, or pie
charts.
Physical and Logical Data
Independence
1. Physical Data Independence :
Physical Data Independence is defined as
the ability to make changes in the structure
of the lowest level of the Database
Management System (DBMS) without
affecting the higher-level schemas. Hence,
modification in the Physical level should not
result in any changes in the Logical or View
levels.
Note –
There are 3 levels in the schema
architecture of DBMS: Physical level, Logical
level, and View level (arranged from the
lowest to highest level).
Example –
Changes in the lowest level (physical level)
are: creating a new file, storing the new files
in the system, creating a new index, etc.
Instances of why we may want to do any
sort of Data modification at the physical
level- We may want to alter or change the
data at the physical level. This is because
we may want to add or remove files and
indexes to enhance the performance of the
database system and make it faster.
Hence, in this way, Physical Data
Independence enables us to do
Performance Tuning. Ideally, when we
change the physical level, we would not
want to alter the logical and view level.
Logical Data Independence
Logical Data Independence is defined as the
ability to make changes in the structure of
the middle level of the Database
Management System (DBMS) without
affecting the highest-level schema or
application programs. Hence, modification in
the logical level should not result in any
changes in the view levels or application
programs.
Example –
Changes in the middle level (logical level)
are: adding new attributes to a relation,
deleting existing attributes of the relation,
etc. Ideally, we would not want to change
any application or programs that do not
require to use of the modified attribute.
Difference between Physical and
Logical Data Independence :
Physical Data Logical Data
Independence Independence
It mainly concerned
It mainly concern about about the structure or
how the data is stored the changing data
into the system. definition.
It is difficult to retrieve
because the data is
mainly dependent on the
It is easy to retrieve. logical structure of data.
As compared to the
As compared to the physical independence it
logical independence it is is not easy to achieve
easy to achieve physical logical data
data independence. independence.
Any change at the
physical level, does not The change in the logical
require to change at the level requires a change at
application level. the application level.
The modifications made The modifications made
Physical Data Logical Data
Independence Independence
at the logical level is
at the internal level may significant whenever the
or may not be needed to logical structure of the
improve the performance database is to be
of the structure. changed.
It is concerned with the It is concerned with the
internal schema. conceptual schema.
Example: Change in
compression techniques Example: Add/Modify or
and storage devices etc. Delete a new attribute.
Data Models in DBMS
Introduction to Types of Data Model
For the creation of any database, the data
model is considered a logical structure for
creating a database. The data model
includes entities, attributes, constraints,
relationships, etc. The data models are used
to represent the data and how it is stored in
the database, how data is accessible and
updated in the database management
system. There are four types of data
models: Hierarchical model, Network
model, Entity-relationship model, Relational
model. These models have further
categories which are used according to a
different use case.
Different Types of Data Models
There are 4 different types of data models:
1. Hierarchical Model
In this type of data model, the data is
organized into a tree-like structure that has
a single root and the data is linked to the
root. In this model, the main hierarchy
begins from the root and it expands like a
tree that has child nodes and further
expands in the same manner. In this model
the child node has one single parent node
but one parent can have multiple child
nodes. As the data is stored like tree
structure in this data model when data is
retrieved the whole tree is traversed from
the root node. The hierarchical data model
contains a one-to-many relationship
between various types of data. The data is
stored in the form of a record and is
connected through links.
For Example- there is an organization that
has a requirement to store the information
of its employees. The table contains the
following attributes: employee name,
employee code, department name, and last
name. And the organization provides a
computer for each employee. So there is a
requirement for storing information on a
computer which is stored in a separate
table. The computer table store employee
code, serial number, and type. According to
the hierarchical data model, the employee
table can be considered as a parent table
and a computer table can be considered as
a child node.
2. Network model
The network model is a type of database
model which is designed based on a flexible
approach for representing objects and the
relationship exist among objects. The
schema is very important in the network
data model which can be represented in the
form of a graph where a relationship is
represented using edges and the nodes are
used to represent objects. The basic
difference between the hierarchical model
and network model is that data is
represented in the form of hierarchy in a
hierarchical data model whereas in network
model the data is represented in the form of
a graph. One of the advantages of a network
model is that the basic connections are also
represented in this data model. There are
different types of relationship can exist in
this data model like one to one, many to
many, etc. The data access becomes simple
to compare to other data model like the
hierarchical model. The parent node and
child node are always connected as there is
always a relationship exist among parent-
child node. And the data is not dependent
on the other node. One of the key
drawbacks of this model is that this system
is not adaptive toward changes. It means
when there is a requirement of some
modification of system it requires to change
the whole system which takes a lot of effort.
And to maintain data is difficult to part in
this model as every record is connected via
some pointers which makes it difficult to
maintain and make the system complex.
3. E-R model
The ER model is used to describe the
database structure using the entity-
relationship diagram. The E-R model is just
like the blueprint of a database which is
used to implement the database. In the
entity set, the relationship exists which can
be shown using the ER diagram. The entity
set consists of a similar type of entities that
consist of attributes.
The components of the ER model are
relationship set and entity set and
attributes. The entity is the component of
data which is represented as a rectangle in
the ER diagram. For example, there are two
entities course and student and there exist
one to many relationships as there can be
more than one student who can select
course.
What is ER Diagram?
ER Diagram stands for Entity Relationship Diagram,
also known as ERD is a diagram that displays the
relationship of entity sets stored in a database. In
other words, ER diagrams help to explain the logical
structure of databases. ER diagrams are created
based on three basic concepts: entities, attributes
and relationships.
ER Diagrams contain different symbols that use
rectangles to represent entities, ovals to define
attributes and diamond shapes to represent
relationships.
Following are the main components and its symbols in ER Diagrams:
Rectangles: This Entity Relationship Diagram symbol represents entity
types
Ellipses : Symbol represent attributes
Diamonds: This symbol represents relationship types
Lines: It links attributes to entity types and entity types with other
relationship types
Primary key: attributes are underlined
Double Ellipses: Represent multi-valued attributes
ER Diagram Symbols
Components of the ER Diagram
This model is based on three basic concepts:
Entities
Attributes
Relationships
WHAT IS ENTITY?
A real-world thing either living or non-living that is
easily recognizable and nonrecognizable. It is
anything in the enterprise that is to be represented in
our database. It may be a physical thing or simply a
fact about the enterprise or an event that happens in
the real world.
An entity can be place, person, object, event or a
concept, which stores data in the database. The
characteristics of entities are must have an attribute,
and a unique key. Every entity is made up of some
‘attributes’ which represent that entity.
Examples of entities:
Person: Employee, Student, Patient
Place: Store, Building
Object: Machine, product, and Car
Event: Sale, Registration, Renewal
Concept: Account, Course
Relationship
Relationship is nothing but an association among two or more entities. E.g.,
Tom works in the Chemistry department.
Entities take part in relationships. We can often identify relationships with verbs
or verb phrases.
For example:
You are attending this lecture
I am giving the lecture
Just loke entities, we can classify relationships according to relationship-
types:
A student attends a lecture
A lecturer is giving a lecture.
Weak Entities
A weak entity is a type of entity which doesn’t have its key attribute. It can be
identified uniquely by considering the primary key of another entity. For that,
weak entity sets need to have participation.
In above ER Diagram examples, “Trans No” is a discriminator within a group of
transactions in an ATM.
Let’s learn more about a weak entity by comparing it with a Strong Entity
Strong Entity Set Weak Entity Set
It does not have enough attributes
Strong entity set always has a primary key.
to build a primary key.
It is represented by a double
It is represented by a rectangle symbol.
rectangle symbol.
It contains a Partial Key which is
It contains a Primary key represented by the underline
represented by a dashed underline
symbol.
symbol.
The member of a strong entity set is called as The member of a weak entity set
dominant entity set. called as a subordinate entity set.
In a weak entity set, it is a
Primary Key is one of its attributes which helps to
combination of primary key and
identify its member.
partial key of the strong entity set.
The relationship between one strong
In the ER diagram the relationship between two strong
and a weak entity set shown by using
entity set shown by using a diamond symbol.
the double diamond symbol.
Attributes
It is a single-valued property of either an entity-type or a relationship-type.
For example, a lecture might have attributes: time, date, duration, place, etc.
An attribute in ER Diagram examples, is represented by an Ellipse
Types of Attributes Description
Simple attributes can’t be divided any further. For example,
Simple attribute
a student’s contact number. It is also called an atomic value.
It is possible to break down composite attribute. For example,
Composite attribute a student’s full name may be further divided into first name,
second name, and last name.
This type of attribute does not include in the physical database.
However, their values are derived from other attributes present
Derived attribute
in the database. For example, age should not be stored directly.
Instead, it should be derived from the DOB of that employee.
Multivalued attribute Multivalued attributes can have more than one values.
For example, a student can have more than one mobile number,
email address, etc.
4. Relational model
In this data model, the data tables are used
to collect a group of elements into the
relations. In this model, the relationships
and data are represented using interrelated
tables. And in the table, there are multiple
rows and multiple columns in which column
represents the attribute of the entity and
the rows are used to represent records. In
this data model there exist different primary
key which issued to distinguish each record
in the table. And for retrieving the data
elements the SQL (Structured Query
Language) is used. For using the relational
data model the primary key issued as the
fundamental tool. And for each entry in the
data set, it needs to be unique. The data
table should not contain any type of
inconsistency as it can create a problem at
the time of data retrieval. The other problem
with the relational data model is data
duplicacy, incomplete data and
inappropriate links used to connect data.
Conclusion
For representing the database there is a
different type of data models which are used
for representing database structure. Each
data model has its advantage and
disadvantage and the use of a data model is
dependent on the use cases.