0% found this document useful (0 votes)
71 views

DBMS - Chapter 1

DBMS is a collection of programs that manages database structure and controls access to stored data. A DBMS presents a single integrated view of data and receives/translates user and application requests to fulfill complex operations. Key components of a database include data, relationships, constraints, and schema. Metadata/data dictionaries store information about the database structure. Common database types include centralized, distributed, relational, NoSQL, cloud, object-oriented, hierarchical, and network databases. The DBMS serves as an intermediary between users and the database, hiding complexity and providing unified access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

DBMS - Chapter 1

DBMS is a collection of programs that manages database structure and controls access to stored data. A DBMS presents a single integrated view of data and receives/translates user and application requests to fulfill complex operations. Key components of a database include data, relationships, constraints, and schema. Metadata/data dictionaries store information about the database structure. Common database types include centralized, distributed, relational, NoSQL, cloud, object-oriented, hierarchical, and network databases. The DBMS serves as an intermediary between users and the database, hiding complexity and providing unified access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

DBMS

Ch-1

Harapriya Mohanta
Introduction:
• A database management system (DBMS) is a collection of programs
that manages the database structure and controls access to the data
stored in the database.

• Database is collection of interrelated data. A database consists of


the following four components:
• (i) Data item (ii) Relationships
• (ii) Constraints (iv) Schema
Data:
• Any raw facts and figures
• have some implicit meaning.
• generally in unorganised form.
• Ex: any number, text, image, video segment
Metadata/ Data Dictionary:
• data about the data is called metadata
• Data dictionary are mini database management systems that manages metadata.
• It is a repository of information about a database that documents data elements of a database. The data
dictionary is an integral part of the database management systems and stores metadata or information
about the database, attribute names and definitions for each table in the database.
• Data dictionary is usually a part of the system catalog that is generated for each database. A useful data
dictionary system usually stores and manages the following types of information :
• Descriptions of the schema of the database.
• Detailed information on physical database design, such as storage structures, access paths and file and
record sizes.
• Description of the database users, their responsibilities and access rights.
• High-level descriptions of the database transactions & applications and of the relationships of
users to translations.
• The relationship between database transactions and the data items referenced by them. This is useful in
determining which transactions are affected when certain data definitions are changed.
Types of Database:
1) Centralized Database
2) Distributed Database
3) Relational Database
4) NoSQL Database
5) Cloud Database
6) Object-oriented Databases
7) Hierarchical Databases
8) Network Databases
1) Centralized Database
• It is the type of database that stores data at a centralized database
system.
• It comforts the users to access the stored data from different
locations through several applications.
• These applications contain the authentication process to let users
access data securely.
• An example of a Centralized database can be Central Library that
carries a central database of each library in a college/university.
Advantages of Centralized Database
• It has decreased the risk of data management, i.e., manipulation of data will
not affect the core data.
• Data consistency is maintained as it manages data in a central repository.
• It provides better data quality, which enables organizations to establish data
standards.
• It is less costly because fewer vendors are required to handle the data sets.
Disadvantages of Centralized Database
• The size of the centralized database is large, which increases the response
time for fetching the data.
• It is not easy to update such an extensive database system.
• If any server failure occurs, entire data will be lost, which could be a huge loss.
2) Distributed Database
• Unlike a centralized database system, in distributed systems, data is
distributed among different database systems of an organization.
These database systems are connected via communication links. Such
links help the end-users to access the data easily.
• Examples of the Distributed database are Apache Cassandra, HBase,
Ignite, etc.
• Advantages of Distributed Database
• Modular development is possible in a distributed database, i.e., the
system can be expanded by including new computers and connecting
them to the distributed system.
• One server failure will not affect the entire data set.
3) Relational Database
• This database is based on the relational data model, which stores
data in the form of rows(tuple) and columns(attributes), and together
forms a table(relation).
• A relational database uses SQL for storing, manipulating, as well as
maintaining the data. E.F. Codd invented the database in 1970. Each
table in the database carries a key that makes the data unique from
others.
• Examples of Relational databases are MySQL, Microsoft SQL Server,
Oracle, etc.
Properties of Relational Database
• Properties of a relational model known as ACID properties, where:
• A - Atomicity: This ensures the data operation will complete either with success or
with failure. It follows the 'all or nothing' strategy. For example, a transaction will
either be committed or will abort.
• C - Consistency: If we perform any operation over the data, its value before and after
the operation should be preserved. For example, the account balance before and
after the transaction should be correct, i.e., it should remain conserved.
• I - Isolation: There can be concurrent users for accessing data at the same time from
the database. Thus, isolation between the data should remain isolated. For example,
when multiple transactions occur at the same time, one transaction effects should
not be visible to the other transactions in the database.
• D - Durability: It ensures that once it completes the operation and commits the data,
data changes should remain permanent.
4) NoSQL Database
• Non-SQL/Not Only SQL is a type of database that is used for storing a
wide range of data sets.
• It is not a relational database as it stores data not only in tabular form
but in several different ways. It came into existence when the demand
for building modern applications increased. Thus, NoSQL presented a
wide variety of database technologies in response to the demands
Hierarchical Databases :
• Just as in any hierarchy, this
database follows the progression
of data being categorized in
ranks or levels, wherein data is
categorized based on a common
point of linkage. As a result, two
entities of data will be lower in
rank and the commonality
would assume a higher rank.
Network Databases
• It is the database that typically
follows the network data model.
Here, the representation of data
is in the form of nodes
connected via links between
them. Unlike the hierarchical
database, it allows each record
to have multiple children and
parent nodes to form a
generalized graph structure.
Cloud Database
• A type of database where data is stored in a virtual environment
and executes over the cloud computing platform. It provides users
with various cloud computing services (SaaS, PaaS, IaaS, etc.) for
accessing the database. There are numerous cloud platforms, but
the best options are:
• Amazon Web Services(AWS)
• Microsoft Azure
• Kamatera
• PhonixNAP
• ScienceSoft
• Google Cloud SQL, etc.
Object-oriented Databases
• he type of database that uses the object-based data model approach
for storing data in the database system. The data is represented and
stored as objects which are similar to the objects used in the object-
oriented programming language.
Role of the DBMS
• The DBMS serves as the intermediary between the user and the
database. The database structure itself is stored as a collection of
files, and the only way to access the data in those files is through the
DBMS.
• DBMS presents the end user (or application program) with a single,
integrated view of the data in the database.
• DBMS receives all application requests and translates them into the
complex operations required to fulfill those requests.
• DBMS hides much of the database’s internal complexity from the
application programs and users
Applications of Database System
These are following applications of the database.
• Banking
• Airlines
• University
• Railways
• Finance
• Sales
• Telecommunications
• Pay Roll System
• Manufacturing
• Human Resources
Database Vs. File Systems
• A file is a sequence of records.
• All records in a file are of the same record type.
• File-processing system is supported by a conventional operating
system. The system stores permanent records in various files, and it
needs different application program to extract records from the
appropriate files and add record to appropriate files.
Advantage of File Processing System
• Although the file-processing system is now largely obsolete, following
are the advantages of file processing system.
• It provides a useful historical perspective on. how to handle data.
• The characteristics of a file-based system helps in an overall
understanding of design complexity of database system.
• Understanding the problems and knowledge of limitation inherent in
the file based system helps avoid these same problems when
designing database systems and thereby resulting in smooth
transition.
Disadvantages of File Processing Systems
1. Excessive programming Effort : A new application program often required an
entirely new set of file definition. Even though an existing file may contain some
of the data needed, the application often required a number of other data
items. As a result, the programmer had to recode the definitions of needed data
items from the existing file as well as definitions of all new data items. Thus in
file-oriented systems, there was a heavy interdependence between programs
and data.
2. Data Inconsistency: Data Redundancy also leads to data inconsistency, since
either the data
formats may be inconsistent or data values may no longer agree or both.
3. Limited data sharing : There is limited data sharing opportunities with the
traditional file oriented system. Each application has its own private file and
users have little opportunity to share data outside their own applications. To
obtain data from several incompatible files in separate systems will require a
major programming effort.
4. Poor data control : A file-oriented system being decentralised in nature,
there was no centralised control at the data element (field) level. It could be
very common for the data field to have
multiple names defined by the various departments of an organisation and
depending on the file it was in. This could lead to different meaning of a data
filed in different context, and conversely, same meaning for different fields. This
leads to a poor data control, resulting in a big confusion.
5. Inadequate data manipulation capabilities: Since file-oriented
system do not provide strong connections between data in different
files and therefore its data manipulation capability is very limited.
6. Data Redundancy (or duplication) : Application are developed
independently in file processing systems leading to unplanned
duplicate files. Duplication is wasteful as it requires additional
storage space and changes in one file must be made manually in all
files. This also results in loss of data integrity . It is also possible that the
same data item may have different names in different files,
or the same name may be used for different data items in different
files.
7. Atomicity problems: Atomicity means either all operations of the
transactions are reflected propertIy in the database or none are, i.e., if
everything works correctly without any errors, then everything gets
committed to the database. If anyone part of the transaction fails, the
entire transaction gets rolled back. The funds transfer must be atomic -
it must happen in its entire or not at all. It is difficult to ensure
atomicity in a conventional file processing system.
8. Security problems : The problm of security in file processing is
unauthrorized person can retrieve, modify, delete, or insert data in file
system. But this is not possible in DBMS.
9. Integrity problems : The data values stored in the database must
satisfy certain types of
consistency constraints. Developers enforce these constraints in the
system by adding appropriate code in the various application program.
When new constraints are added, it is difficult to change the program
to enforce them. The problem is compounded when constraints
involves several data items for different files.
10. Program Data Dependance : File descriptions (physical structure,
storage of the data files and records) are defined within each
application program that accesses a given file.
11. Data isolation : Becuuse data are scattered in various files, and files
may be in different formats, writing new application program to
retrieve the appropriate data is difficult.
12. Difficulty in accessing data : The conventional file processing
environments do not allow needed data to be retrieved in a convenient
and efficient manner like DBMS. Better data retrieval system must be
developed for general use.
13. Concurrent access anomalies : In order to improve the overall
performance of the system and obtain a faster respone time, many
system allow multiple users to update the data simultaneously.
In such an environment, interaction of concurrent updates may result
in inconsistent data.
Advantages of DBMS
1. Controlling the data redundancy: The data redundancy, storing the
same data multiple times leads to several problems.
First, storage space is wasted when the same data is stored repeatedly.
Second, files that represent the same data may become inconsistent.
This may happen because
an update is applied to some of the files but not to others.
Most DBMS provide a facilities for controlling the data redundancy
using normalization and keys concepts.
2. Restricting unauthorized access: When multiple users access a
database therefore some users will not be authorized to access (!.ll
informations in the database.
A DBMS should provide a security and authorization subsystem, which
the Data Base Administor
(DBA) specify the restrictions. The DBMS should then enforce these
restrictions automatically. For example, the Banking data are often
considered confidential, and hence only authorized persons are
allowed to access such data.
3. Providing backup and Recovery : A DBMS must provide facilities for
recovering from hardware or software. The backup and recovery
subsystem of DBMS is responsible for recovery.
For example, if the computer system fails in the middle of a complex
update program, the recovery subsystem is responsible and makes sure
that the database is restored to the state it was in before the program
started executing. Alternatively, the recovery subsystem ensures that
the program is resumed from the point at which it was interrupted so
that its full effect is recorded in the database.
4. Providing Multiple user Interfaces : Because many types of users with
varying levels of technical knowledge use a databae, a DBMS should provide a
variety of user interfaces. These include query languages for casual users.
Programming language interfaces for application programmers, forms and
command codes for parameteric users and graphical user interfaces for stand
alone users.
5. Inforcing Integrity constraints : Data integrity means that the data contained
in the database is both accurate and consistent. Integrity means constraints,
which are consistency rules that the database system should not violate.
Most database applications have certain integrity constraints that must hold for
the data. A DBMS should provide capabilities for defming and enforcing these
constraints. The simplest type of integrity constraint specifying a data type for
each data item.
6. Efficient data access: DBMS utilizes a variety of sophisticated techniques to store and
retrieve
data efficiently. This feature is specially important if the data is stored on external storage
devices.
7. Improved the data sharing: Since, database system is a centralised repository of data
belonging to the entire organization, it can be shared by all authorized users. Existing
application program can share the data in the database. Furthermore, new application
programs can be developed on the existing data in the database to share the same data
and add only that data that is not currently stored. Therefore, more users and applications
can share more of the data.
8. Improved security: Database security is the protection of database from unauthorized
users. The database administrator (DBA) ensures that proper access procedure is followed,
including proper authentication schemes for access to the DBMS and additional checks
before permitting access to sensitive data. A DBA can define user names and passwords to
identify people authorized to use the database.
9. Improved data consistency: If the redundancy is removed or
controlled, chances of having inconsistence data is also removed and
controlled. In database system, such inconsistencies are avoided
to some extent by making them know to DBMS. DBMS ensures that any
change made to either of the two entries in the database is
automatically applied to the other one as well. This process is known as
propagating updates
DATA ABSTRACTION/DBMS Architecture
Data Abstraction : It means retrieving only required amount of information of the
system and hiding the background details.
There are three level of data abstraction.
(1) Physical / InternalLevel : It is the lowest level. The physical level of data abstraction
describes how the data are actually stored.
(2) Logical / Conceptual Level : The logical level of the data abstraction describes "what"
data are stored in the database and what relationships exist among those data.
Thus logical level describes the entire database.
• Database administrators, who must decide what information to keep in the database, use
the logical level of abstraction.
(3) View / External level: The view level of data abstraction describes only part of the
entire database.
The view level of abstraction simplify their interaction with the system. The system may
provide many views for the same database.
Data Independence
• Technique By which one can change the data at one level without
effecting the data at another level.
• Two types:
1. Physical Data Independence
2. Logical Data Independence
Database Users:
• Any person who uses a database and avails benefits from the database is known as database user
in DBMS.
• Database users in DBMS can access the database and retrieve the data from the database using
applications and interfaces provided by the Database Management System (DBMS).
• Database users in DBMS can be categorized based on their interaction with the databases.
According to the tasks performed by the database users on the databases, we can categorize
them into seven categories as follows:
• Database Administrators (DBA)
• Database Designers
• System Analysts
• Application Programmers / Back-End Developers
• Naive Users / Parametric Users
• Sophisticated Users
• Casual Users / Temporary Users
DBA:
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.

• Functions of DBA:
• Database Administrators (DBAs) have full control of the database and they are sometimes known
as the super-users of the database. They work alongside developers in order to discuss and design
the overall structure of the database including layouts, functionalities, workflow, etc.
• can grant or revoke authorization permission to all other users at any point of time.
• DBA is also responsible for providing security to the database.
• 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.
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.
• System Analyst :
• System Analyst is a user who analyzes the requirements of parametric
end users. They check whether all the requirements of end users are
satisfied.
• 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.
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.
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.
• 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.
• Specialized users : Specialized users are sophisticated users who
write specialized database application that does not fit into the
traditional data-processing framework. Among these applications are
computer aided-design systems, knowledge-base and expert systems
etc.

You might also like