DBMS Week
DBMS Week
Lecture # 3-4-5
Instructor
Amna Zulfiqar
Lecture # 3-4 Agenda:
• Introduction to Database Environment
o Components of Database Environment
o Types of Database Users/Roles
• History of Database Systems
• When Not to Use a DBMS?
• DBMS Functions
• Database Design and Modelling
• Types of Database Management Systems
• Examples & Mappings of Database Models
2
Introduction to Database Environment
3
Components of Database Environment
1. Hardware
2. Software
3. Data
4. Procedures
5. People/User Groups
4
Components of Database Environment (cont.)
1. Hardware
• The DBMS and the applications require hardware to run. The hardware can range
from a single personal computer to a single mainframe or a network of computers.
• The particular hardware depends on the organization’s requirements and the DBMS
used.
• Some DBMSs run only on particular hardware or operating systems, while others
run on a wide variety of hardware and operating systems.
• A DBMS requires a minimum amount of main memory and disk space to run, but
this minimum configuration may not necessarily give acceptable performance.
5
Components of Database Environment (cont.)
2. Software
• The software component comprises the DBMS software itself and the application
programs, together with the operating system, including network software if the
DBMS is being used over a network.
• The target DBMS may have its own fourth-generation tools that allow rapid
development of applications through the provision of nonprocedural query
languages, reports generators, forms generators, graphics generators, and
application generators.
• In Figure (slide # 4) , we observe that the data acts as a bridge between the
machine components and the human components.
• The database contains both the operational data and the metadata, the “data about
data.”
4. Procedures
• Procedures refer to the instructions and rules that govern the design and use of the
database.
7
Components of Database Environment (cont.)
4. Procedures (cont.)
• The users of the system and the staff who manage the database require
documented procedures on how to use or run the system.
5. People
• The final component is the people involved with the system. 8
Types of Database Users/Roles
• Database users are the persons who interact with the database and take the
benefits of database.
• Users are differentiated by the way they expect to interact with the system.
The database and the DBMS are corporate resources that must be managed like any
other resource. Data and database administration are the roles generally associated
with the management and control of a DBMS and its data.
• The Data Administrator (DA) is responsible for the management of the data
resource, including database planning; development and maintenance of
standards, policies and procedures; and conceptual/logical database design.
• The DA consults with and advises senior managers, ensuring that the
of database development will ultimately support corporate objectives.
direction 9
Types of Database Users/Roles (cont.)
• The Database Administrator (DBA) is responsible for the physical realization of
the database, including physical database design and implementation,
security and integrity control, maintenance of the operational system, and
ensuring satisfactory performance of the applications for users.
• The role of the DBA is more technically oriented than the role of the DA,
requiring detailed knowledge of the target DBMS and the system environment.
2. Database Designers
• Database Designers are the users who design the structure of database which
includes tables, indexes, views, constraints, triggers, stored procedures.
He/she controls what data must be stored and how the data items to be
related.
10
Types of Database Users/Roles (cont.)
3. Application Programmers/Developers
• Once the database has been implemented, the application programs that
provide the required functionality for the end-users must be implemented.
• Each program contains statements that request the DBMS to perform some
operation on the database, which includes retrieving data, inserting,
updating, and deleting data.
11
Types of Database Users/Roles (cont.)
4. End Users
The end-users are the “clients” of the database, which has been designed and
implemented and is being maintained to serve their information needs. End-users can
be classified according to the way they use the system:
• Naïve users
o They are typically unaware of the DBMS. They access the database through
specially written application programs that attempt to make the
operations as simple as possible.
o For example, the checkout assistant at the local supermarket uses a bar code
reader to find out the price of the item. However, there is an
application program present that reads the bar code, looks up the price
of the item in the database, reduces the database field containing
stock,
the and displays
number of suchthe price
items in on the till. 12
Types of Database Users/Roles (cont.)
4. End Users (cont.)
• Sophisticated users
o At the other end of the spectrum, the sophisticated end-user is familiar with
the structure of the database and the facilities offered by the DBMS.
o Some sophisticated end-users may even write application programs for their
own use.
13
History of Database Systems
1. 1950s and early 1960s:
• Data processing using magnetic tapes for storage
• Tapes provided only sequential access
• Punched cards for input
5. Early 2000s:
• XML and XQuery standards
• Automated database administration
6. Later 2000s:
• Web databases (semi-structured data, XML, complex data types)
• Cloud computing
• Giant data storage systems (Google BigTable, Yahoo PNuts, Amazon Web
Services,…)
• Advanced databases (mainly non-relational (e.g., graph-based, text based) but
also advanced relational)
16
History of Database Systems (cont.)
17
When Not to Use a DBMS?
In spite of the advantage of using a DBMS, there is some situation in which a DBMS
may involve unnecessary overhead costs that would not be incurred in traditional file
processing. The overhead cost of using a DBMS is due to the following:
Additional problems may arise if the database designers and DBA don’t properly
design the database or if the database systems application is not implemented
properly.
Hence it may be more desirable to use regular files under the following
circumstances.
4. We can use a regular file system when we know that a simple database is not
going to change.
5. Severe, real-time requirements for some programs that may not be met
3. No multiple user access to data.
because 18
When Not to Use a DBMS? (cont.)
Certain industries and application have elected not to use general purpose DBMSs.
For example:
1. Many computer-aided design tools (CAD) used by students of the mechanical and
civil department have proprietary file and data management software that is
geared for the internal manipulation of drawing and 3D objects.
19
An Example: Online Bookseller
20
Reading Assignment
21
Functions of a DBMS
• We look at the types of function and service that we would expect a DBMS to
provide.
• The DBMS should hide the internal physical implementation details (such as
file organization and storage structures) from the user.
2. A user-accessible catalogue
• A DBMS must furnish a catalogue in which descriptions of data items are
stored and which is accessible to users.
3. Transaction support
• A DBMS must furnish a mechanism that will ensure either that all the
updates corresponding to a given transaction are made or that none
of them is made.
• Concurrent access is relatively easy if all users are only reading data, as
there is no way that they can interfere with one another.
24
Functions of a DBMS (cont.)
5. Recovery services
• A DBMS must furnish a mechanism for recovering the database in the event
that the database is damaged in any way.
• This failure may be the result of a system crash, media failure, a hardware
or software error causing the DBMS to stop, or it may be the result of the
user detecting an error during the transaction and aborting the transaction
before it completes.
• In all these cases, the DBMS must provide a mechanism to restore the
database to a consistent state.
25
Functions of a DBMS (cont.)
6. Authorization services
• A DBMS must furnish a mechanism to ensure that only authorized users can
access the database.
• Although the DCM is not part of the DBMS, it is necessary for the DBMS to
be capable of being integrated with a variety of DCMs if the system is to be
commercially viable.
• This does not imply that the database has to be distributed across the
network, but rather that users should be able to access a
centralized database from remote locations.
27
Functions of a DBMS (cont.)
8. Integrity Services
• A DBMS must furnish a means to ensure that both the data in the database
and changes to the data follow certain rules.
28
Database Design and Modelling
• Data modelling is the first step in the process of database design. This step is
sometimes considered to be a high-level and abstract design phase, also referred
to as conceptual design. The aim of this phase is to describe:
• The constraints on data (e.g., student number has exactly eight digits; a
subject has four or six units of credit only)
• In the second step, the data items, the relationships and the constraints are all
expressed using the concepts provided by the high-level data model.
• Since these concepts do not include the implementation details, the result of the
data modelling process is a (semi) formal representation of the database
29
Database Design and Modelling (cont.)
• This result is quite easy to understand so it is used as reference to make sure that
all the user’s requirements are met.
• The third step is database design. During this step, we might have two sub-steps:
o One called database logical design, which defines a database in a data model
of a specific DBMS.
o Another called database physical design, which defines the internal database
storage structure, file organization or indexing techniques.
• In the database design phases, data are represented using a certain data model.
• The data model is a collection of concepts or notations for describing data, data
relationships, data semantics and data constraints. Most data models also include
30
Types of Database Management Systems
• Database management systems can be classified based on several criteria, such as
the data model, user numbers and database distribution, all described below.
i. Relational database
• A relational database management system (RDBMS) is a system where data is
organized in two-dimensional tables using rows and columns.
• The most popular data model in use today is the relational data model. It is
based on SQL.
• Every table in a database has a key field which uniquely identifies each
record. 31
Types of Database Management Systems (cont.)
i. Relational database (cont.)
• Relational database management system software is available for personal
computers, workstation and large mainframe systems.
• Well-known DBMSs like Oracle, MS SQL Server, DB2 and MySQL support
this
model.
• In the below table, Std_ID, Name and city are called as attributes and their
values. Std_ID is a primary key attribute which uniquely identifies each record
in the student table.
Std_ID Name City
35
Types of Database Management Systems (cont.)
Hierarchical database
Types of Database Management Systems (cont.)
iv. Network database
Examples & Mappings of Database Models
44
Examples & Mappings of Database Models (cont.)
45
Examples & Mappings of Database Models (cont.)
46
Examples & Mappings of Database Models (cont.)
47
Examples & Mappings of Database Models (cont.)
48
Examples & Mappings of Database Models (cont.)
49
Examples & Mappings of Database Models (cont.)
• The following diagram represents a network data model that shows that the Stores
entity has relationship with multiple child entities and the Transactions entity has
relationships with multiple parent entities. In other words, a network database
model allows one parent to have multiple child record sets and each record set can
be linked to multiple nodes (parents) and children.
50
Examples & Mappings of Database Models (cont.)
51
Examples & Mappings of Database Models (cont.)
OO
52
Examples & Mappings of Database Models (cont.)
OO
53