Unit - 8 Database and Database Management System
Unit - 8 Database and Database Management System
Student
S.N. Student ID No: Name Address
1 101 Rohit Kathmandu
2 102 Rashmi Pokhara
Database Management System can be categorized on the basis of several criteria, as database
model, number of users, number of sites etc.
1. Based on Database Model: We have already discussed various models on this basis. They are:
Hierarchical Model, Network Model, Relational Model, Object Model etc. Hierarchical and
Network Models are also called legacy (logical) data model.
2. Based on Number of Users: Database are divided into two categories on the basis of number
of users. They are Single User Database model which is designed to use by only one user.
However, Multi-User Database Model supports multiple users.
3. Based on Number of sites: They are Centralized Database System in which data is stored in
single location. Whereas, data is stored at many locations in Distributed Database System
4. Based on the Purpose: General Purpose Database Systems are used for general purpose like:
accounting works, Library function, administrative works. But, Special Purpose Database
Systems used for particular nature of works, like scientific and research study etc.
Classification of Database Management Systems
Based on Number of Sites
(Centralized and Distributed Database)
Database Models
• Database Models
The database models or simply stated data model describes the structure of a database . It is a
collection of conceptual tools for describing data, relationship etc. It defines how the data are
stored and accessed . The four most common database models are: Hierarchical Data Model,
Network Data Model, Entity Relationship (E-R) Model, Relational Data Model and Object
Oriented Model .
• Hierarchical Data Model
In this model, records are logically organized into a hierarchy of relationship . A Hierarchically
structured data is arranged in an inverted tree pattern . All records in the hierarchy are called
nodes . Each node is related to the others in a parent-child relationship . Each parent record may
have one or more child records . The top level record in the hierarchy is called the root record .
Searching is fast in this model . However, this model is not suitable to structure the data of many –
to – relationship .
• Network Data Model
Network data model is modified version of the hierarchical data . In network data model each
node may have several parents . A network data model views all records in sets. The network data
model has a higher level of flexibility than hierarchical model . It is easier to restructure the
information stored in this structure, since the path of relationship enables to store member record
in an arbitrary manner . However, operation and maintenance of this model become complicated .
Database Models
In the above diagram Student and College are entities. The diamond shaped “Study In”
represents their relationship. It can be understood as “Students study in a college” .
Whereas, Stu-Id, Stu-Name, Stu- Addr are called attributes (fields) of Student entity.
Similarly, Col_Id and Col-Name are attributed (fields) of college. Attributes (fields) provide
detail information about entities.
Database Model
Sample E-R Diagrams
Database Model
• Relational Data Model
In a Relational data model, data are arranged in a tabular form, which is easy for a user to
understand . Each table represents a relation and each row represents a record .
It highly flexible to program and retrieve data . It can be efficiently used with a computer
which has limited memory and processing capability . Its processing speed is comparatively
low; no processing can be done without establishing data relationship .
A relational database consists of a collection of tables, each of which is assigned a unique
name . A row in a table represents a relationship among a set of values. Name of table
represents the entity and column represents fields (attributes) . Row represents record
(tuple) and relationship among fields.
Database Model
• Relational Database Model
Student Teacher
Marks
Database Model
• Object Oriented Data Model: The basic concept behind this kind of data model is same
as object oriented programming . An object is similar to an entity . It consists of small
amount of data put together (Encapsulated) which is needed to perform an operation.
Database Model
Database Model
Sample of Object-Oriented Data Model
Database System Architecture
1. Centralized Architecture (Terminal to host processing)
With terminal-to-host processing
which is also called Centralized
Architecture, the applications and
database reside on the host computer.
The user interact with the applications
with “dumb” terminals (i.e. the
device has no processing capability
of its own) .
Database System Architecture
iii. Client/server architecture and
ii. File server Architecture
processing
Database System Architecture
2. File server processing: With file server processing, the applications and database reside
on the host computer, called file server . The database management system runs on the
users PC . When the user needs data from the file server, the file server sends to the
user the entire file with the data requested. The data is downloaded from file server for
analysis and manipulation. Similarly, data is uploaded by the user to the file server also .
3. Client/server architecture and processing: Client/server architecture links two or more
computers in an arrangement in which some machine (servers) perform computing
functions for end-users (clients) . The client requests applications, data, or processing
from the server, which acts on these requests by ‘serving’ the desired commodity .
Organizations can make systems faster and save money, primarily by gaining the
efficiency .
Database Users
Database users are those who interact with the database in order to query and
update the database and generate reports. On the basis of way interacting with
DBMS database users can be classified into the following categories:
1. Naïve User: They who query and update the database by invoking some
already written programs. For example, the owner of the book store can
update the list of books with new book arrival in the store.
2. Sophisticated Users: They are business analyst, scientists. They have
knowledge of query language. They can retrieve information from database
with the help of query language
3. Specialized User: They who have knowledge to write specialized database
programs such as knowledge base systems and experts systems
4. Application Programmers: They develop(write) database application programs
to facilitate easy data access for the database users
Database Administrator
Database Administrator (DBA): DBA is a person who has central control over both data and
application programs. The responsibilities of DBA may vary upon the job description and
corporate/ organization policies. Some of the responsibilities are:
• Schema Definition and modification: DBA creates the database schema using Data
Definition Language (DDL). He also modifies the schema as per changing needs of the
organization
• Security Enforcement and Administration: DBA establishes security and monitor it. It
involves adding and revoking users, auditing and checking security problems
• Performance tuning: He always involves to enhance the performance (whether the system
is becoming slower) of the system by checking indexes etc.
• Database Design: Works with the system development team during database design to
minimizes many problems of the system
• Data backup and maintenance: One of the most important responsibilities of DBA is to
backup the data on regular basis (daily, weekly, monthly, yearly etc) for the safety of the
data.
Cloud Databases
• Cloud computing
• Cloud computing is a technology that uses the internet for storing and managing data
on remote servers and then access data via the internet. This type of system allows
users to work on the remote. Cloud computing customers do not own the physical
infrastructure; they rent the usage from a third-party provider. Example: Google
Drive, one drive, drop box are cloud based storage system. In Nepal: Data Hub etc
• Cloud Databases
• Cloud Databases are typically built using the infrastructure of a cloud provider (such
as Google Cloud, Amazon Simple DB etc. ) . Cloud databases enables businesses to
create as easily scalable database with less in-house hardware and maintenance
requirements, and to only pay for the storage and traffic they use.
Cloud Databases
Characteristic of Cloud:
• On-demand- Self Service: Storing and accessing data in cloud, all controls are
provided to user. User can use it whenever and wherever they need
• Resource pooling: Multiple users can share the same space and resources.
• Security: Data security is high in cloud
• Less investment: All services are available through internet. Less investment in
hardware
Cloud Databases