DATABASE SYSTEMS
1. Introduction to
Database Management
3
OVERVIEW
• Database concepts
• Features of Database Management Systems
• Database Systems
• Database Models
• Architectures of Database Management Systems
• Centralized and Distributed Database System
• Client-server Database Architecture in DBMS
• Users
4
Database concepts
• Database: a collection of persistent data that can be shared in interrelated
• Database is a collection of related data and data is a collection of facts and figures that
can be processed to produce information.
• Organizing these data for ease of retrieval and maintenance is paramount.
• Some important properties of databases:
• Persistent: means that data reside on stable storage; Storing and maintaining data are
costly, only data likely to be relevant to decisions should stored.
• Shared: a database can have multiple uses and users. A database provides a common
memory for multiple functions in an organization. Many users can use a database at
the same time.
• Interelated: data stored as separate units can be connected to provide a whole picture.
Databases contain both entities and relationships among entities.
5
Database concepts
• A simplified University Database
Registration Faculty assignment
Entities:
students, faculty, courses,
offerings, enrollments
Relationships:
Grade recording
faculty teach offerings, Course scheduling
students enroll in offerings,
offerings made of courses,...
6
Database concepts
• A simplified Hospital Database
Treatment Symptom monitoring
Entities:
patient, providers,
treatments, diagnoses,
symptoms
Relationships:
patients have symptoms,
Diagnosis Patient care
providers prescribe
treatments,
providers make diagnoses,…
7
Database concepts
• A simplified Water Utility Database
Billing Payment processing
Entities:
customers, meters, bills,
payments, meter readings
Relationships:
Meter reading
bills sent to customers, Service start/stop
customers make payments,
customers use meters
8
Database concepts
• Practise: Give your example of a database.
9
Database Management Systems
• Database Management Systems (DBMS): a collection of software that
supports creation, maintenance and use of databases.
• DBMSs provided efficient storage and retrieval of data.
• DBMSs have evolved to provide a broad range of features for data acquisition,
storage, dissemination, mainternance, retrieval, and formatting.
• The DBMS grants end-users the freedom and convenience to store logical or
physical data. Consequently, users don't have to be concerned about the
structural changes nor the physical location of data. Application Programming
Interface (API), for instance, doesn’t bother the developer to make manual
changes. Instead, it automatically makes modifications in the database.
• Due to marketplace demands and product innovation, DBMSs continue to
evolve
10
Database Management Systems
• Database software:
• Microsoft Access
• Microsoft SQL Server
• Sybase SQL Server
• My SQL
• Amazon RDS (Relational Database Service)
• Oracle RDBMS
• RazorSQL
• SQLite
• IBM DB2
• Informix
• ……
11
Database Management Systems
• Characteristics
• Traditionally, data was organized in file formats. DBMS was a new concept then, and all
the research was done to make it overcome the deficiencies in traditional style of data
management. A modern DBMS has the following characteristics:
• Real-world entity − A modern DBMS is more realistic and uses real-world entities to
design its architecture. It uses the behavior and attributes too. For example, a
school database may use students as an entity and their age as an attribute
• Relation-based tables − DBMS allows entities and relations among them to form
tables. A user can understand the architecture of a database just by looking at the
table names.
• Isolation of data and application − A database system is entirely different than its
data. A database is an active entity, whereas data is said to be passive, on which the
database works and organizes. DBMS also stores metadata, which is data about
data, to ease its own process.
12
Database Management Systems
• Less redundancy − DBMS follows the rules of normalization, which splits a relation
when any of its attributes is having redundancy in values. Normalization is a
mathematically rich and scientific process that reduces data redundancy
• Consistency − Consistency is a state where every relation in a database remains
consistent. There exist methods and techniques, which can detect attempt of
leaving database in inconsistent state. A DBMS can provide greater consistency as
compared to earlier forms of data storing applications like file-processing systems.
• Query Language − DBMS is equipped with query language, which makes it more
efficient to retrieve and manipulate data. A user can apply as many and as different
filtering options as required to retrieve a set of data. Traditionally it was not
possible where file-processing system was used.
13
Database Management Systems
• ACID Properties − DBMS follows the concepts of Atomicity, Consistency, Isolation,
and Durability (normally shortened as ACID). These concepts are applied on
transactions, which manipulate data in a database. ACID properties help the
database stay healthy in multi-transactional environments and in case of failure.
• Multiuser and Concurrent Access − DBMS supports multi-user environment and
allows them to access and manipulate data in parallel. Though there are
restrictions on transactions when users attempt to handle the same data item, but
users are always unaware of them.
14
Database Management Systems
• Multiple views − DBMS offers multiple views for different users. A user who is in the
Sales department will have a different view of database than a person working in
the Production department. This feature enables the users to have a concentrate
view of the database according to their requirements.
• Security − Features like multiple views offer security to some extent where users
are unable to access data of other users and departments. DBMS offers methods to
impose constraints while entering data into the database and retrieving the same
at a later stage. DBMS offers many different levels of security features, which
enables multiple users to have different views with different features. For example,
a user in the Sales department cannot see the data that belongs to the Purchase
department. Additionally, it can also be managed how much data of the Sales
department should be displayed to the user. Since a DBMS is not saved on the disk
as traditional file systems, it is very hard for miscreants to break the code
15
Database Systems
• DBS = DB + DBMS
16
Database models
• Data models define how the logical structure of a database is modeled. Data
Models are fundamental entities to introduce abstraction in a DBMS. Data
models define how data is connected to each other and how they are
processed and stored inside the system.
17
Database models
• There are many kinds of data models. Some of the most common ones
include:
• Hierarchical database model
• Network model
• Relational model
• Object-oriented database model
• Entity-relationship model
• The object-relational model, which combines the two that make up its name
• ….
18
Architectures of Database Management Systems
• To provide insight about the internal organization of DBMS, this section
describes two architectures or organizing frameworks. The first architecture
describes an organization of database definitions to reduce the cost of
software maintenance. The second architecture describes an organization of
data and software to support remote access. These architectures promote a
conceptual understanding rather than indicate how an actual DBMS is
organized.
19
Architectures of Database Management Systems
• Database Schema and Database Instance
• Database Schema: Structure of data (metadata). Physically stored
in "Data dictionary" (database description)
• Database Instance: The collection of data stored in the database at
a particular moment.
20
Architectures of Database Management Systems
• Three Schema Architecture (3-tier Architecture/ three-level Architecture)
Is an official standard of the American
National Standard Institute (ANSI).
Three levels of database description:
Internal schema or Physical schema
Conceptual schema or Logical schema
External level or The View/User level
Each group of users can have a separate external view of
Database tailored to the group’s specific needs.
The conceptual and internal schema represent the entire
db.
The conceptual schema defines the entities and
relationships (represents the logical meaning of the db).
The internal schema defines files, collections of data on a
storage device (represents the storage view of the db).
21
Architectures of Database Management Systems
• A database system normally contains a lot of data in addition to users’ data.
For example, it stores data about data, known as metadata, to locate and
retrieve data easily. It is rather difficult to modify or update a set of metadata
once it is stored in the database. But as a DBMS expands, it needs to change
over time to satisfy the requirements of the users. If the entire data is
dependent, it would become a tedious and highly complex job.
• Data Independence: a database should have an identity separate from the
applications (computer programs, forms, and reports) that use it. The
separate identity allows the database definition to be changed without
affecting related applications.
• The concept of data independence led to the proposal of the three level
architecture.
22
Architectures of Database Management Systems
• Logical Data Independence
• Logical data independence is the ability to modify the logical schema without causing
application programs to be rewritten. Modifications at the logical level are necessary whenever
the logical structure of the database is altered. Logical Data independence means if we modify
the structure of the database (e.g. add some new columns or remove some columns from
table) then the user view and programs should not change.
• Physical Data Independence
• Modifications at the physical level are occasionally necessary to improve performance. Physical
data independence is the power to change the physical level without affecting the conceptual
or external view of the data.
• For example, in case we want to change or upgrade the storage system itself − suppose we
want to replace hard-disks with SSD − it should not have any impact on the logical data or
schemas.
• Logical data independence is more difficult to achieve than physical data independence, since
application programs are heavily dependent on the logical structure of the data that they access
23
Centralized and Distributed Database System
• Centralized database system: The centralized database system consist of a single
processor together with it associated data storage devices and other peripherals. It is
physically confined to a single location. The data can be accessed from the multiple sites
with the use of a computer network while the database is maintained at the central site.
• A Distributed database is an integrated collection of databases that is physically
distributed across sites in a computer network.
24
Client-server Database Architecture in DBMS
• Client-server Database Architecture: an arrangement of components (clients
and servers) and data among computers connected by a network.
• A client is a program that submits requests to a server. A server processes
requests on behalf of a client. Client is generally personal computer or
workstations whereas server is large workstations, mini range computer
system or a mainframe computer system.
• To improve performance and availability of data, the client-server architecture
supports many ways to distribute software and data in a computer network.
• Software and data on the same computer (centralized db, centralized processing)
• Server software and database are located on a remote computer (centralized db,
distributed processing).
• The server software and the database are located on multiple remote computers.
25
Client-server Database Architecture in DBMS
• Typical client-server arrangements of database and software.
26
Client-server Database Architecture in DBMS
27
Users
• A typical DBMS has users with different rights and permissions who use it for
different purposes. Some users retrieve data and some back it up. The users
of a DBMS can be broadly categorized as follows:
28
Users
• Administrators − Administrators maintain the DBMS and are responsible for
administrating the database. They are responsible to look after its usage and
by whom it should be used. They create access profiles for users and apply
limitations to maintain isolation and force security. Administrators also look
after DBMS resources like system license, required tools, and other software
and hardware related maintenance.
• Designers − Designers are the group of people who actually work on the
designing part of the database. They keep a close watch on what data should
be kept and in what format. They identify and design the whole set of
entities, relations, constraints, and views.
• End Users − End users are those who actually reap the benefits of having a
DBMS. End users can range from simple viewers who pay attention to the logs
or market rates to sophisticated users such as business analysts.
29
THANK YOU !
30