DBMS1
DBMS1
UNIT- 1
Database Architecture
Data: is a collection of facts, figures having no particular meaning. Data can be represented in
the forms of text , numbers, video, audio, image etc.
Data representation:
Data can be represented in the form of
Number
Text
Audio
Image
Video
Primary data: Data collected by the investigator himself/ herself for a specific purpose.
Secondary data: Data collected by someone other than the user, which is already available.
Ex: Marks: 89; first letter : a; msg: hello this becomes information.
What is Knowledge?
DATA/INFORMATION PROCESSING:
The process of converting the data (raw facts) into meaningful information is called
asdata/information processing.
Ex: File: Telephone book Record: Three fields: Name, address, PhoneNo
Database: is an organized collection of data for one or more purposes. The data are typically
organized to model relevant aspects of reality.
File Systems:
Manual filing system: It is a well planned traditional submission method either by hand , type
writer (No storage devices and computers) etc
Traditional File System: File processing was an early attempt to computerize the manual filing
system. It is a method for storing and organizing computer files in a a storage device such as
hard disk/ CD Rom and involve maintaining the physical location of the files and the data to
make it easy to find and access it..
Characteristics
Advantages:
Simpler to use
Less expensive
Fits the needs small businesses and home users
Good for database solutions for hand held devices such as palm pilot
Disadvantages:In the above example 3 components there are doctor, patient and ward files.
They will maintain their own files to store their information.
Database System:
The Database is a shared collection of logically related data, designed to meet the
information needs of an organization. It is computer based record keeping system whose
over all purpose is to record and maintain the information. The database is a single, large
repository of data which can be used simultaneously by many departments and users.
A database represents some aspect of the real world, sometimes called as miniworld or
university of Discourse.
A database is logically coherent collection of data with some inherent meaning.
A database is designed, built and populated for a specific purpose.
As shown in the above figure the DBMS is centralized system which provides a common
interface between the data and end users.
Advantages:
1. Minimum data redundancy:
In this approach we will maintain the database for storing different (unique) details
of different users. Hence data present in one file need not be duplicated in other. It will reduces
the repentance of data.
2. Data Consistency:
5. Data Integrity:
In this approach data integrity (grouping of data and relations among them) is
more compared to TFS.
6. Maintenance is easy due to centralized database system.
The database and the DBMS software together is a Database system. It is a computer based
system to record and maintain information. It consists of the following:
Users/Programmers
Application programs/Queries
DBMS catalog(Metadata)
A DBMS also provides facilities for controlling data access, enforcing data integrity ,managing
concurrency control, recovering the database failures and restoring it from back up files as well
as maintaining database security.
Functions of DBMS:
Advantages of DBMS
Disadvantages
Applications of DBMS
Effective processing complex data with set of references for expression of relations
between them.
Building of internet shops and distributed information systems.
Building of virtual company office and virtual kiosks.
Storage and reproduction of graphic images video and audio.
Creation of websites allotted to unlimited opportunities.
DBMS Users
Users may be divided into 2 types. They are
Actors on the scene
Workers behind the scene
1. Actors on the Scene: those who actually use and control the content of DBMS
A).DBA: The person who is responsible for controlling and coordinating the system is called
DBA.
B). Database designers: one who is responsible for identifying the data to be stored in the
database and choosing appropriate structures to represent the same.
C). System analysts and application programmers: These are software engineers who
determine the requirements of end users to decide the type of transactions and to build
applications, test and document the same.
D). End users: These are the people who actually access the database. They are categorized into
i. casual users: These types of users can have little bit knowledge about the operations.
These people occasionally access the data base. These users are also bothered about only
output but not the designing part.
ii. Naive or parametric users: These types of users cannot have the alteration ideas but
they focus to get the output of existing application to satisfy customer needs. These
people frequently access the data base.
iii. Sophisticated end users: These users interact with the system using query based
language. These people having knowledge about database design.Ex: scientists,
engineers, system Analyst etc
iv. stand alone users: This type of users who are specialized to access personal
databases and also small applications.
2.Workers behind the scene: Those who enable the database to be developed and the DBMS
software to be designed and implemented.
A). Database system designers and implementers: one who is responsible fo complete system
design and DBMS Modules and interfaces as a software package.
B).Tool developers: one who design and implement the tools and software packages that
facilitate database system design.
C). Operators and maintenance personnel: one who is responsible for actual running and
maintenance of hardware and software of Database System.
The person who is responsible for controlling and coordinating the system is called DBA.
Data Model
Data model is a set of data structure and conceptual tools used to describe the structure of
a database.
Data model can also be defined as an integrated collection of concepts for describing and
manipulating data, relationships between data and constraints on the data in an
organization.
Data Model comprises of three components:
Terminologies:
Meta data:
It is data about data; it includes data of the data types and size etc.
Meta data stores in a file that is repository or data dictionary/Catalog.
Ex: student
Domain:
A set of unique values in a particular column is referred as domain.
Ex: in the above relation SID column is the domain rest of the columns have duplicate values.
Cardinality of Relation:
“Number of rows presented in that particular relation is referred as cardinality of
relation”.
Ex: cardinality of above relation is 3.
Degree of Relation:
“Number of columns presented in that particular relation is referred as degree of
relation”.
Ex: degree of above relation is 5.
ADVANTAGES:
DISADVANTAGES:
In this we hide the implementation complexity and data storage details from the users.
Using this model we cannot implement reference concept.
It is poorly designed database system means every user can implement the model.
B C D
G H
E F
In this model data will be represent in the form of inverted tree like structure.
This structure allows representing information using parent-child relationship.
Each parent can have many children. But each child has only one parent. Hence, this
relationship is called as one to many relationships
This model is used to describe the data and maintain the logical and view level
At the top of the hierarchy, there is one entity, which is called the root.
ADVANTAGES:
DISADVANTAGES:
ADVANTAGES:
Data must be tree like structure because of we are using the pointers.
Data manipulation can be done easily.
It is possible to represent many to many relationship
DISADVANTAGES:
The physical data model describes data need for a single project or application though it
maybe integrated with other physical data models based on project scope.
Data Model contains relationships between tables that which addresses cardinality and
nullability of the relationships.
Developed for a specific version of a DBMS, location, data storage or technology to be
used in the project.
Columns should have exact datatypes, lengths assigned and default values.
Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are
defined.
Instance:
Department of CS (BCA) Page 17
Seshadripuram College Database Management Systems (DSC-4)
Database State: The data in database at a particular moment in a time is called database state.
Empty state: database defined with no data in it
Initial state: the database is first loaded with initial data
Valid state: which satisfies the structure and constraints specified in the schema
DBMS Architecture
There are 2 different ways to look at the architecture of DBMS they are
1. Logical Architecture
2. Physical Architecture.
Internal level:
It is the lowest level of data abstraction that deals with the physical representation
of the database on the computer and thus, is also known as physical level.
It describes how the data is physically stored and organized on the storage medium.
In this level users can create only empty structure of the database.
Conceptual level:
This level of abstraction deals with the logical structure of the entire database and
thus, is also known as logical level.
It describes what data is stored in the database, the relationships among the data and
complete view of the user’s requirements without any concern for the physical
implementation.
That is, it hides the complexity of physical storage structures. The conceptual view is
the overall view of the database and it includes all types of operations like insertion,
deletion and modifications.
External level:
It is the highest level of abstraction that deals with the user’s view of the database
and thus, is also known as view level.
In general, most of the users and application programs do not require the entire data
stored in the database.
It permits users to access data in a way that is customized according to their needs, so
that the same data can be seen by different users in different ways, at the same time.
The process of transforming the requests and results between various levels of DBMS
architecture is known as mapping.
Internal mapping:
The mapping between internal and conceptual level and it gives the
correspondence between structure and stored data.
External mapping:
The mapping between external and conceptual level and it defines the
correspondence between particular records and fields.
“It is the ability to change the schema at one level of the database system without having
to change the schema at the other levels. “
It is the ability to change the conceptual schema without affecting the external
schemas or application programs.
Physical data independence:
It is the ability to change the internal schema without affecting the conceptual or
external schema. An internal schema may be changed due to several reasons such as for creating
additional access structure, changing the storage structure, etc.
DBMS LANGUAGES
These commands are used to insert data into table, delete data from the table and
also update the content in the table.
o Insert
o Delete
o Update
o Select
Data Control language (DCL)
These commands are used to control the database.
o Grant
o Revoke
o Commit
o rollback
Distributed DBMS
A distributed database is a single logical database that is spread physically across
computers in multiple locations that are connected by a communication network
An application program operating on a DDB may access data stored at more than
one machine.
A set of cooperating databases each residing at different sites is like a virtual object
each with their own DBMS.
The client/server architecture was developed to deal with computer environment in which a large
number of PCs, workstation, file server…
A client is the requesting machine and the server is the supplying machine. Both are
connected through network is referred as client Server Architecture.
This is called two-tier architectures because the software components are distributed over two
systems: client and server
o In this establish a connection between client and server that is ODBC (open database
connectivity) once this connection is formed then the client will communicate with the
server.
o Query requests are sent from the client to the server and server processors then it sends
results to the client.
Advantages:
1. Clients are not powerful.
2. Reduces the data traffic on the network.
3. Improve data integrity.
Three-tier architecture
The emergence of the Web changed the roles of client and server, leading to the three-tier
architecture
The intermediate layer or middle layer is sometimes called the application server or Web
server Three-tier Architecture Can Enhance Security:
1. Database server only accessible via middle tier
2. Clients cannot directly access database server
Advantages:
1. Technological flexibility.
2. Long term cost reduction.
3. Reduced risk.
4. Improve customer services.
DBMS Interfaces
Interfaces are the programs, which convert system language to user understandable
language; hence, it is as same as the translator is.
The user friendly interfaces provided by DBMS are
1. Menu-Based Interfaces:
These interfaces present the user with lists of options, called menus that lead
the user through the formulation of a request. By using these menus users form a request
through query processing.
2. Forms-Based Interfaces :
A forms-based interface displays a form to each user. Users can fill out all of the form
entries to insert new data, or they fill out only certain entries, in which case the DBMS will
retrieve matching data for the remaining entries.
5. Interfaces for the DBA: Most database systems contain privileged commands that can be used
only by the DBA's staff. These include commands for creating accounts, setting system
parameters, granting account authorization, changing a schema, and reorganizing the storage
structures of a database.
Classification of DBMS
DBMS can be classified into different categories on the basis of several criteria such as
1. Data models:
In this which type of data model can be used to design or define the data base.
Relational
Hierarchical
Network
Object oriented
Object relational
2. Number of users support:
In this how many numbers of users and it supports which type of operating system
like
Single user
Multi user.
3. Number of sites:
Here users are used to store data in a single site or distributed site.
Centralized
Distributed
Homogeneous(same DBMS software at multiple sites)
OLTP(Online Transaction processing)
4. Cost: based on initial setup maintenance of database system
Low end system ( under $3000)
High end system. (over $100000)
5. Purpose: based on usage
General purpose
Special purpose