A Data Model Documents and Organizes Data, How It Is Stored and Accessed, and The Relationships Among Different Types of Data
A Data Model Documents and Organizes Data, How It Is Stored and Accessed, and The Relationships Among Different Types of Data
Specially designed software applications that interact with the user, other applications, and the
database itself to capture and analyze data.
A data model documents and organizes data, how it is stored and accessed, and the
relationships among different types of data.
H
1
2
3
4
The DBMS architecture is divided into three levels or views: The External level/view
The conceptual level/view The internal level/view Main purpose of DBMS is to
provide the user with the abstract view of the data base. This means that system
does not provide all the detail of the data, rather it hide the details of how data is
stored and maintained
5
Objectives of three level architecture are:
1.The DBA can change the structure of database . i.e without changing the application
program e.g external schema.
2.Each user can access the data according to his/her requirements.
3.Users are independent of the storage complexities like indexing constraints etc of the
database.
4.The conceptual structure of the database has no effect due to the change of the physical
storage devices.
The external level is one closed to the users. That is the one concerned with the way in
which the data is viewed by individual users. At the external level the DBMS presents each
user with a shared or single view or schema of the data. there are many views of the data
6
at this level , and each view is a representation of part of the complete database. A view
allows a user access to their portion of the database ,and shields the rest of the database
from them. Each external view is defined by means of an external schema, which consists
basically of definitions of each of the various types of external record found in that external
view.
In external level, the different views may have different representations of the same
data. For example one user may view date in the form as day,month,year while another
may view as year ,month ,day.
Conceptual level is the representation of entire contents of database. If the external level is
concerned with individual user views, the conceptual level may be thought of as defining a
community user view. In other words ,there will be many external views, each consisting of
a more or less abstract representation of some portion of the database and there will be a
single “Conceptual view”, consisting of a similarly abstract representation of the database in
its entirety.
The conceptual view is defined by the various schema which includes definition of each of
the various types of data or the various types of conceptual record. The conceptual schema
hides the details of physical structure and concentrates on describing entities, data type ,
relationships, user operations and constraints. The view is normally more stable than the
other two views.
The ultimate objective of the conceptual schema is to describe the complete enterprise-not
just its data but also how that data is used, how it flows from point to point within the
enterprise, what it is used for at each point, what controls are to be applied at each point
and so on.
In most existing system the “Conceptual schema “ is little more than a simple union of all
individual external schemas, with the addition of certain security and integrity rules.
Hence conceptual level is concerned with the following activities:
1.All entities, there attributes and their relationship.
2.Constraint on the data.
3.Security and integrity rules.
4.Semantic information about the data.
5.Validation checks to retain data consistency and integrity.
The internal level is the closest to physical storage, that is the one concerned with the way
in which the data is actually stored.
the following aspects are considered at this level:
1.Storage space allocation for data.
7
2.Record description for storage with stored sizes for data items.
3.Access path e.g. specification of primary and secondary keys, index and pointers.
4.Data compression and encryption techniques.
5.Optimization of the internal structures.
The internal view is described by means of the internal schema, which not only defines the
various stored record types but also specifies the indexes are in and so on.
Example
1.Each user is able to access the same data but have a different customized view of the
8
data as per their own needs.
2.A user can change his/her view and this change does not affect other user views
3.There user’s interaction with the database is independent of physical data storage
organization.
4.The database administrator (DBA) is able to change the database storage structure
without affecting the user’s view.
5.The database administrator (DBA) is able to change the conceptual structure of the
database without affecting all users.
6.The database administrator (DBA) can change existing storage devices with the new
storage devices without affecting others user’s.
conclusion
with the three level architecture the Data Independence is possible in DBMS.
Advantages of DBMS
The database management system has promising potential advantages, which are
explained below:
1. Controlling Redundancy: In file system, each application has its own private files,
which cannot be shared between multiple applications. 1:his can often lead to
considerable redundancy in the stored data, which results in wastage of storage space.
By having centralized database most of this can be avoided. It is not possible that all
redundancy should be eliminated. Sometimes there are sound business and technical
reasons for· maintaining multiple copies of the same data. In a database system,
however this redundancy can be controlled.
For example: In case of college database, there may be the number of applications like
General Office, Library, Account Office, Hostel etc. Each of these applications may
maintain the following information into own private file applications:
9
It is clear from the above file systems, that there is some common data of the student
which has to be mentioned in each application, like Rollno, Name, Class, Phone_No~
Address etc. This will cause the problem of redundancy which results in wastage of
storage space and difficult to maintain, but in case of centralized database, data can be
shared by number of applications and the whole college can maintain its computerized
data with the following database:
It is clear in the above database that Rollno, Name, Class, Father_Name, Address,
10
particular student and by joining of Library and General Office relations on the basis of
column Rollno he/she can easily retrieve this information.
Thus, we can say that centralized system of DBMS reduces the redundancy of data to
great extent but cannot eliminate the redundancy because RollNo is still repeated in all
the relations.
2. Integrity can be enforced: Integrity of data means that data in database is always
accurate, such that incorrect information cannot be stored in database. In order to
maintain the integrity of data, some integrity constraints are enforced on the database.
A DBMS should provide capabilities for defining and enforcing the constraints.
For Example: Let us consider the case of college database and suppose that college
having only BTech, MTech, MSc, BCA, BBA and BCOM classes. But if a \.,ser enters the
class MCA, then this incorrect information must not be stored in database and must be
prompted that this is an invalid data entry. In order to enforce this, the integrity
constraint must be applied to the class attribute of the student entity. But, in case of file
system tins constraint must be enforced on all the application separately (because all
applications have a class field).
In case of DBMS, this integrity constraint is applied only once on the class field of the
General Office (because class field appears only once in the whole database), and all
other applications will get the class information about the student from the General
Office table so the integrity constraint is applied to the whole database. So, we can
conclude that integrity constraint can be easily enforced in centralized DBMS system as
compared to file system.
3. Inconsistency can be avoided : When the same data is duplicated and changes
are made at one site, which is not propagated to the other site, it gives rise to
inconsistency and the two entries regarding the same data will not agree. At such times
the data is said to be inconsistent. So, if the redundancy is removed chances of having
inconsistent data is also removed.
Let us again, consider the college system and suppose that in case of General_Office file
it is indicated that Roll_Number 5 lives in Amritsar but in library file it is indicated that
Roll_Number 5 lives in Jalandhar. Then, this is a state at which tIle two entries of the
same object do not agree with each other (that is one is updated and other is not). At
such time the database is said to be inconsistent.
11
An inconsistent database is capable of supplying incorrect or conflicting information. So
there should be no inconsistency in database. It can be clearly shown that inconsistency
can be avoided in centralized system very well as compared to file system ..
Let us consider again, the example of college system and suppose that RollNo 5 is
.shifted from Amritsar to Jalandhar, then address information of Roll Number 5 must
be updated, whenever Roll number and address occurs in the system. In case of file
system, the information must be updated separately in each application, but if we make
updation only at three places and forget to make updation at fourth application, then the
whole system show the inconsistent results about Roll Number 5.
In case of DBMS, Roll number and address occurs together only single time in
General_Office table. So, it needs single updation and then an other application retrieve
the address information from General_Office which is updated so, all application will
get the current and latest information by providing single update operation and this
single update operation is propagated to the whole database or all other application
automatically, this property is called as Propagation of Update.
We can say the redundancy of data greatly affect the consistency of data. If redundancy
is less, it is easy to implement consistency of data. Thus, DBMS system can avoid
inconsistency to great extent.
4. Data can be shared: As explained earlier, the data about Name, Class, Father
__name etc. of General_Office is shared by multiple applications in centralized DBMS
as compared to file system so now applications can be developed to operate against the
same stored data. The applications may be developed without having to create any new
stored files.
12
permitted only to retrieve data, whereas other are allowed both to retrieve and to
update. Hence, the type of access operation retrieval or update must also be controlled.
Typically, users or user groups are given account numbers protected by passwords,
which they can use to gain access to the database. A DBMS should provide a security
and authorization subsystem, which the DBA uses to create accounts and to specify
account restrictions. The DBMS should then enforce these restrictions automatically.
For example: A representation can be chosen for the data in storage that gives fast
access for the most important application at the cost of poor performance in some other
application. But, the file system favors the individual requirements than the enterprise
requirements
8. Providing Backup and Recovery: A DBMS must provide facilities for recovering
from hardware or software failures. The backup and recovery subsystem of the DBMS is
responsible for recovery. For example, if the computer system fails in the middle of a
complex update program, the recovery subsystem is responsible for making sure that
the .database is restored to the state it was in before the program started executing.
10. Data Model can be developed : The centralized system is able to represent the
complex data and interfile relationships, which results better data modeling properties.
The data madding properties of relational model is based on Entity and their
Relationship, which is discussed in detail in chapter 4 of the book.
13
Improved data access.
The DBMS makes it possible to produce quick answers to ad hoc queries. From a database perspective,
a query is a specific request issued to the DBMS for data manipulation—for example, to read or update
the data. Simply put, a query is a question, and an ad hoc query is a spur-of-the-moment question. The
DBMS sends back an answer (called the query result set) to the application. For example, end users,
when dealing with large amounts of sales data, might want quick answers to questions (ad hoc queries)
such as:
- What was the dollar volume of sales by product during the past six months?
- What is the sales bonus figure for each of our salespeople during the past three months?
• It increases opportunity for person or groups outside the organization to gain access to
information about the firms operation.
• It increases opportunity for fully training person within the organization to misuse the
data resources intentionally.
• The data approach is a costly due to higher H/W and S/W requirements.
• Database systems are complex (due to data independence), difficult, and time-
consuming to design.
• It is not maintain for all organizations .It is only efficient for particularly large
organizations.
14
15