Unit - 1 Part 2
Unit - 1 Part 2
The concern for efficiently leads to the design of complex data structure for the representation
of data in the database. However since database systems are often used by non computer
professionals, this complexity must be hidden from database system users. This is done by
defining levels of abstract as which the database may be viewed, there are logical view or
external, conceptual view and internal view or physical view. The three levels of the architecture
are three different views of the data.
The three level database architecture allows a clear separation of the information meaning
(conceptual view) from the external data representation and from the physical data structure
layout. A database system that is able to separate the three different views of data is likely to be
flexible and adaptable.
The external level is at the highest level of database abstraction where only those portions of
the database of concern to a user or application program are included. Any number of user
views (some of which may be identical) may exist for a given global or conceptual view.
This view is often a restricted view of the database and the same database may provide a
number of different views for different classes of users.
For example, a department head may only be interested in the departmental finances and
student enrolments but not the library information. The librarian would not be expected to have
any interest in the information about academic staff. The payroll office would have no interest in
student enrolments.
The conceptual view is the information model of the enterprise and contains the view of the
whole enterprise without any concern for the physical implementation. One conceptual view
represents the entire database.
The conceptual view is the overall community view of the database and it includes all the
information that is going to be represented in the database. The conceptual view is defined by
the conceptual schema which includes definitions of each of the various types of data.
The internal view does not deal with the physical devices directly. Instead it views a physical
device as a collection of physical pages and allocates space in terms of logical pages.
End -Users
External External External
Level View View
External/conceptual Mapping
Conceptual Level
Conceptual Schema
External/conceptual Mapping
Internal Level
Internal Schema
Stored Database
Two mappings are required in a database system with three different views as shown in figure.
A mapping between the external and conceptual level gives the correspondence among the
records and the relationships of the external and conceptual levels.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Similarly, there is a mapping from a conceptual record to an internal one. An internal record is a
record at the internal level, not necessarily a stored record on a physical storage device. The
internal record of figure 3 may be split up into two or more physical records. The physical
database is the data that is stored on secondary storage devices. It is made up of records with
certain data structures and organized in files. Consequently, there is an additional mapping from
the internal record to one or more stored records on secondary storage devices.
In late 1960 IBM Developed the Information Management System (IMS) database management
system. IMS formed the basis for an alternative data representation frame work called the
hierarchical data model.
In 1970 Edgar Codd at IBM’s san Jose Research Laboratory, proposed a new data
representation framework called the relational data model. Several DBMS product developed on
relation model and make revolutionary change in DBMS application.
In 1980, the relational model consolidated its position as the dominant DBMS paradigm, and
database systems continued to gain widespread use. The SQL query language for relational
databases, developed as part of IBM’s system R project, is now the standard query language.
SQL-92 was adopted by American National Standard Institute (ANSI) and International
Standard Organization (ISO).
The 1980s also saw much research on parallel and distributed databases as well as initial work
on object oriented databases.
Early 1990s, the SQL language was designed primarily for decision support applications , which
are query intensive, yet the mainstay of databases in the 1980s was transaction processing
applications, which are update intensive. Decision support and query re-emerged as a major
application area for databases.
Late 1990s, the major event was the explosive growth of the World Wide Web. Databases were
deployed much more extensively than ever before. Database system now had to support very
high transaction processing rate, as well as very high reliability and 24 X 7 availability. Database
systems also had to support web interfaces to data.
FILE
DATABASE
DATABASE MANAGEMENT SYSTEM
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
File is a two dimensional table summarizing the multiple instances of a set of field of an entity.
Database is a collection of interrelated data files, while database management system is a
computer program that allows storing, organizing and accessing a collection of interrelated
data.DBMS are categorized according ti their data structure or type of data.
The primary goal of DBMS is to provide a way to store and retrieve database information that is
both convenient and efficient. Database systems are designed to manage large bodies of
information. Management of data includes both defining structures for storage of information and
providing manipulation of information.
Reduction of redundancies
Centralized control of data by the DBA avoids unnecessary duplication of data and effectively
reduces the total amount of data storage required. It also eliminated the extra processing
necessary to trace the required data in a large data. It also eliminates the inconsistencies that
tend to be present in redundant data files.
Sharing data
A database allows the sharing of data under its control by any number of application program or
users.
Consistency of data
The reduced data redundancy will minimizes the presence of the same data in different file
which will lead to consistency of data.
In a database approach, the database is designed based on bottom up approach which ensures
that the end users have all the reports. As and when some changes in reports requirements
occur, corresponding revision of the database can be done with minor changes in the database
Since different file of the database are designed at a time, there will be better enforcement of
standard in terms of defining field names, field width, field type etc.
Different application are developed under the co-ordination of the database administrator as a
result, there will be an integrated effort among the development groups in terms of file design
and program design. This will reduce the task of program maintenance to a great extent.
Data Integrity
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Data integrity means that the data contained in the database is both accurate and consistent.
Centralized control can also ensure that adequate checks are incorporated in the DBMS to
provided data integrity. Data values being entered for storage could be checked to ensure that
they fall within a specified range and are of the correct format. Another integrity check that
should be incorporated in the database is to ensure that if there is a reference to certain object,
then that object must exist.
RDBMS may be a DBMS in which data is stored in the form of tables and the relationship among
the data is also stored in the form of tables.
RDBMS is a program that lets you create, update, and administer a relational database. Most
commercial RDBMS's use the Structured Query Language (SQL) to access the database.Today
most popular RDBMS packages are Oracle, Microsoft SQL Server, Sybase SQL Server, and IBM’s
DB2.
Characteristics of RDBMS
1. The relational data management model eliminated all parent child relationships and instead
represented all data in the database as simple Row/Column tables of data values.
3. The Rows of table are referred to as Tuples and the columns are referred to as attributes.
4. Each table is an independent entity and there is no physical relationship between tables.
5. Relational model of data management is based on set theory. Built in query language is
designed in the RDBMS, so that it can manipulate set of data. The user interface used with
relational models is non procedural because only what need to be done is specified and not how
it has to be done.
Easy to use
The representation of any information as tables consisting of rows and columns is quite natural
and therefore even first time users find it attractive.
Easy to access
An RDBMS is easily accessible. Commands can be execute in the Structured Query Language
(SQL) to manipulate data. SQL is the international Standards Organization (ISO) standard
language for interacting with a RDBMS
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Data Independence
An RDBMS provides full data independence. The organization of the data is independent of the
applications that use it. User do not need to specify the access routes to tables or know how
data is physically arranged in a database.
Flexibility
Different tables from which information has to be linked and extracted can be easily manipulated
to give information in the form in which it is desired.
Security
Security control and permissions can also be implemented more easily by moving sensitive
attributes in a given table into a separated relation with its new permissions. If access rights
permits, a particular attribute could be joined back with others to enable full information retrieval.
The use of query by means of a language based on relational algebra and relational calculus is
easy in the relational database approach. For data organized in other structure the query
language either becomes complex or extremely limited in its capabilities.
Precision
The usage of relational algebra and relational calculus in the manipulation of the relations
between the tables make sure that there is no confusion, which may otherwise arise in
establishing the relationship in complicated network type database.
DBMS RDBMS
The concept of relationship is not present In RBMS based on concept of establish relationship
DBMS. between two object i.e two tables.
DBMS treats Data as Files internally. RDBMS treats data as Tables internally.
DBMS does not support Distributed Databases. Most of RDBMS supports Distributed Databases.
DBMS requires low Software and Hardware RDBMS requires High software and hardware
Requirements. requirements.
DBMS does not support Client / Server Most of the RDBMS supports Client / Server
Architecture. Architecture.
DBMS may supports less than 7 to 8 rules of RDBMS usually supports more than 7 or 8 rules of
Dr. E.F. Codd. Dr. E.F. Codd.
DBMS does not support Distributed Databases. Most of RDBMS supports Distributed Databases.
DBMS supports Single User only. RDBMS supports multiple users.
DBMS does not impose any constraints or RDBMS impose constraints on data as well as
security with regard to data manipulation. impose security of data at three levels
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
1. Logging at O/S level.
2. Command level (RDBMS level)
3. Object level.
3. Data Models
Database Management system organizes the data in forms of various data models.Data Model
are the way in which records are represented in the database. Models are considered as
infrastructure of data organization or in other words Data Model describes how the data is
represented to user. It is a plan for building a databse. it display how the records are actually
related with each other. It focus on required data element and relationship among them. There
are three basic data models.
The systematic development of database started with this model. It is one of the oldest
models.Infomation Management System (IMS) was one of the first hierarchical databases.
North American Rockwell Company and IBM developed it jointly in 1960s
Tree structures occur naturally in many data organizations because some entities have an
intrinsic hierarchical order. For example, In an organization The Director is at the topmost
position .managers are reporting to director and so lie one level down in the hierarchy,after
manager assistant comes . The following figure depicts, the three entity types Director,
Manager, Assistant make up the three different levels of hierarchical structure.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
An Organization chart
A hierarchical database collects all the instances of a specific record together as a record type.
These record types are the equivalent of tables in the relational model, and with the individual
records being the equivalent of rows. Records are connected with each other through links.
These are a 1:N mapping between record types. This is done by using trees, like set theory
used in the relational model, "borrowed" from maths.
1. Each hierarchical tree can have only one root record type and this record type does not
have a parent record type.
2. The root can have any number of child record types and each of which can itself be a root of
a hierarchical sub tree.
3. Each child record type can have only one parent record type; thus a M:N relationship cannot
be directly expressed between two record types.
5. A child record occurrence must have a parent record occurrence; deleting a parent record
occurrence requires deleting its entire children record occurrence.
Conceptual simplicity
As the information is represented in form of tree structure, it is easy to view, understand, retrival
of data. This helps the database designer to obtain conceptual clarity of relationship.
Database security
Data independence
If changes are made in design of database, DBMS take care of cascading it throughout the system.
There is no need to make change in system.
Complexity:
To implement the database using hierarchical model, programmer needs to have detailed
knowledge of how the data is stored physically. Only then he will be able to retrieve the data, as
he has to traverse entire tree for the same.
Data Redundancy:
Anomalies:
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
While inserting, deleting and updating using this model certain anomalies will aries.You can not
insert a new record without depending on other records. Deleting one record will delete all the
records which are depend on that record. Updation of one record requires to make changes in
many places.
Network model:
To overcome the problem faced by hierarchical data model, The Network Model was developed.
The Network model modified the hierarchical data model by allowing parent-child relationship.
In 1971, the Conference on Data Systems Languages (CODASYL) formally defined the network
model. IDMS was the first Network database management system developed.
Structure of network model
The basic data modeling construct in the network model is the set construct. A set consists of
an owner record type, a set name, and a member record type. A member record type can have
that role in more than one set, hence the multiparent concept is supported. An owner record
type can also be a member or owner in another set.
The data model is a simple network, and link and intersection record types exist, as well as sets
between them. Thus, the complete network of relationships is represented by several pair wise
sets; in each set some (one) record type is owner and one or more record types are members.
Usually, a set defines a 1:M relationship, although 1:1 is permitted.
Figure shows two record types (DEPARTMENT and EMPLOYEE) and the set type DEPT-
EMP,with DEPARTMENT as the owner record type and EMPLOYEE as the member record
type.
Department
Dept_Emp
Dept_Emp
Employee
Conceptual simple
This data model is also conceptually very easy to depict and design.
Anomalies
Anomalies of hierarchical model are remove in this model. You can insert a new record without
depending on other records. Deleting one record will not delete all the records which are
depend on that record.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Disadvantage of Network database models:
Complexity:
In network data model data are stored using pointer. In network model to design a graph many
pointers are required. Thus the entire database becomes very complex.
Same like hierarchical model, database designer needs to be aware of physical organization of
data. Only then he will be able to retrieve the data, as he has to traverse through graph for the
same.
Relational model
Database management systems have developed from hierarchical models to network and
relational models.(RDBMS) A database based on the relational model developed by Dr.E.F.
Codd.In 1970, Dr. E.F.Codd wrote a paper to represent the data and relationship. According to
him data must be related to each other using values and not using pointers. A relational
database allows the definition of data structures, storage and retrieval operations and integrity
constraints. In such a database the data and relations between them are organized in tables. A
table is a collection of records and each record in a table contains the same fields.
1. Structures
2. Operations
3. Integrity rules
Structures consist of a collection of objects or relations that store data. An example of relation is
a table. You can store information in a table and use the table to retrieve and modify data.
Operations are used to manipulate data and structures in a database. When using operations
You must adhere to a predefined set of integrity rules.
Integrity rules are laws that govern the operations allowed on data in a database. This ensures
data accuracy and consistency.
Easy to design:
To implement relational model programmer need not to aware of how tables are stored
internally.
Efficient:
Database design, maintenance, administration and usage are much easier in relational model
than other model.
Query capabilities
In the most databases following relational model the user has to specify only what and how to
retrieve the data. All the remaining work is performed by database itself and it is hidden from
user.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Disadvantage of Relational model
Relational model frees database designer, programmer and end user from their tedious efforts
required to store,retrive and design relationships between data.Same is cause for its need for
substantial hardware and software overhead.
1. Client-Server Architecture
Multiprocessing uses more than one processor for a set of related jobs. Distributed processing
reduces the load on a single processor by allowing different processors to concentrate on a
subset of related tasks, thus improving the performance and capabilities of the system as a
whole.
An Oracle database system can easily take advantage of distributed processing by using its
client/server architecture. Client-Server Architecture is an Architecture of a computer network in
which many clients (remote processors) request and receive service from a centralized server
(host computer). In this architecture, the database system is divided into three parts: a front-end
or a client, a back-end or a server and Network.
The Client:
The client is the front-end database application, accessed by a user through the keyboard,
display, and pointing device, such as a mouse. The client has no data access responsibilities.
Client computers provide an interface to allow a computer user to request services, processes,
and presents data managed by the server. The client workstation can be optimized for its job.
For example, it might not need large disk capacity, or it might benefit from graphic capabilities.
Often, the client runs on a different computer than the database server, generally on a PC.
Many clients can simultaneously run against one server.
The Server:
The server runs Oracle software and handles the functions required for concurrent, shared data
access. The server receives and processes the SQL and PL/SQL statements that originate from
client applications. The computer that manages the server can be optimized for its duties. For
example, it can have large disk capacity and fast processors. Ideally, a server provides a
standardized transparent interface to clients so that clients need not be aware of the specifics of
the system (i.e., the hardware and software) that is providing the service.
For example In hospital data processing, a client computer can be running an application
program for entering patient information while the server computer is running another program
that manages the database in which the information is permanently stored. Many clients can
access the server's information simultaneously, and, at the same time, a client computer can
perform other tasks, such as sending e-mail. Because both client and server computers are
considered intelligent devices, the client-server model is completely different from the old
“mainframe” model, which utilized a centralized mainframe computer that performed all the
tasks for its associated “dumb” terminals.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
Client-server Architecture:
The Network:
The client portions and server portion can run by different computers connected through a
network.
It divides application processes among multiple machines i.e.Non-critical data and functions are
processed on the client portion and critical functions are process on server.
Client server Architecture Optimizes Client Workstations for data input and presentation (e.g.,
graphics and mouse support)
It Optimizes the Server for data processing and storage (e.g., large amount of memory and disk
space)
Scales Horizontally – Multiple servers, each server having capabilities and processing power,
can be added to distribute processing load.
Reduces Data Replication - Data stored on the servers instead of each client, reducing the
amount of data replication for the application.
2. Multi-Tier Architecture:
The Client / Server architecture has some limitations. One solution to the problem is
implementation of multitier – architecture. The term multitier implies that there are various
software tiers, each with own responsibility for certain task.
In a multitier architecture environment, an application server provides data for clients and serves
as an interface between clients and database servers. This architecture is particularly important
because of the prevalence of Internet use.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
A multitier architecture has the following components:
Clients:
client or initiator process that starts an operation. The client can be a Web browser or other end-
user process. In a multitier architecture, the client connects to the database server through one
or more application servers.
Application Servers:
An application server provides access to the data for the client. An application server is process
that provides access to data for the client and executes part of the query processing, that
reduce the load of the database server. It can serve as an interface among clients and Several
database servers, including an extra supply of security.
The application server assumes the identity of the client when it is performing operations on the
database server for that client. The application server's privileges are restricted to prevent it
from performing unneeded and unwanted operations during a client operation.
Database Servers:
A database server provides the data requested by an application server on behalf of a client.
The database server does all of the remaining query processing.
A database server that serves as repository for most data used in the operation.
Each computer that manages a database in the distributed database is called a node. The
database to which a user is directly connected is called the local database. Any additional
databases accessed by this user are called remote databases. When a local database
accesses a remote database for information, the local database is a client of the remote server.
This is an example of client/server architecture.
An instance is currently running on the computer that is executing Oracle (often called the host
or database server).
A computer running an application (a local machine or client workstation) runs the application in
a user process. The client application attempts to establish a connection to the server using the
proper Net8 driver.
SSCCS RDBMS UNIT - 1 DBMS AND RDBMS CONCEPTS ARPIT PAREKH
The server is running the proper Net8 driver. The server detects the connection request from
the application and creates a (dedicated) server process on behalf of the user process.
The user executes a SQL statement and commits the transaction. For example, the user
changes a name in a row of a table.
The server process receives the statement and checks the shared pool for any shared SQL
area that contains an identical SQL statement. If a shared SQL area is found, the server
process checks the user's access privileges to the requested data and the previously existing
shared SQL area is used to process the statement; if not, a new shared SQL area is allocated
for the statement so that it can be parsed and processed.
The server process retrieves any necessary data values from the actual data-file (table) or those
stored in the system global area.
The server process modifies data in the system global area. The DBWn process writes modified
blocks permanently to disk when doing so is efficient. Because the transaction committed, the
LGWR process immediately records the transaction in the online redo log file.
If the transaction is successful, the server process sends a message across the network to the
application. If it is not successful, an appropriate error message is transmitted.
Throughout this entire procedure, the other background processes run, watching for conditions
that require intervention. In addition, the database server manages other users' transactions
and prevents contention between transactions that request the same data.