Database Systems Concepts 1
Database Systems Concepts 1
Abstract
This module introduces the fundamental concepts of database systems
http://creativecommons.org/licenses/by/3.0/
http://cnx.org/content/m28156/1.1/
Figure 1:
Data Redundancy: Since les and applications are created by dierent programmer of various departments over long period of time, it might lead to several problems:
Inconsistency in data format
The same information may be kept in several dierent place (les).
Data inconsistency which means various copies of the same data are conicting ; waste storage
space and duplication of eort
Data Isolation
It is dicult for new application to retrieve the appropriate data which might be stored in various
les.
Integrity problems
Data values must satisfy certain consistency contraints which are specied in the application
programs.
It is dicult to add change the programs to enforce new constraint
Security problems
There are constraint regarding accessing privileges
Application is added to the system in the ad-hoc manner so it is dicult to enforce those constraints
Concurrent access anomalies
http://cnx.org/content/m28156/1.1/
Data may be accessed by many applications that have not been coordinated previously so it is
not easy to provide a stategy to support multiple users to update data simutaneously
These diculties have prompted the development of a new approach in managing large amount of organizational information database approach. In the following section, we shall see the concepts that have been
introduced to get over the problems mentioned.
2 Database Approach
Database and database technology play an important role in most of social areas where computer are used,
including business, education, medicine etc. To understand the fundamental of database system, we start
from introducing the basic concepts in this area.
It is a representation of some aspect of the real world; or perhaps, a collection of data elements (facts)
representing realworld information.
Database is logical coherent and internally consistent.
Database is designed, built, and populated with data for a specic purpose.
Database Management System (DBMS) is a collection of programs that enable users to create, maintain
database and control all the access to the database. The primary goal of the DBMS is to provide an
environment that is both convenient and ecient for user to retrive and store information.
Application program accesses the data stored in the database by sending requests to the DBMS.
http://cnx.org/content/m28156/1.1/
Figure 2:
With the database approach, we can have the traditional banking system as shown in the following
picture.
http://cnx.org/content/m28156/1.1/
Figure 3:
http://cnx.org/content/m28156/1.1/
In the Database approach, ideally each data item is stored in only one place in the database
However, in some case redundancy is still exists to improving system performance, but such
redundancy is controlled and kept to minimum
2. Data Sharing
The integration of the whole data in an organization leads to the ability to produce more information from a given amount of data
3. Enforcing Integrity Constraints
DBMSs should provide capabilities to dene and enforce certain constraints such as data type,
data uniqueness.
4. Restricting Unauthorised Access
Not all users of the system have the same accessing privileges.
DBMSs should provide a security subsystem to create and control the user accounts.
5. Data Independence
The system data descriptions are separated from the application programs.
Changes to the data structure is handled by the DBMS and not embedded in the program.
6. Transaction Processing
The DBMS must include concurrency control subsystem to ensure that several users trying to
update the same data do so in a controlled manner so that the result of the updates is correct.
7. Providing multiple views of data
A view may be a subset of the database. Various users may have dierent views of the database
itself.
Users may not need to be aware of how and where the data they refer to is stored
8. Providing backup and recovery facilities
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 stage it was in before the program
started executing.
http://cnx.org/content/m28156/1.1/
MANAGERS (ENAME)
CUSTOMERS(CNAME,CADDR,BALANCE)
Table 1
The Network model represents data as record types and also represents a limited type of one to
many relationship, called set type. The gure below shows a schema in network model notation
http://cnx.org/content/m28156/1.1/
Figure 4:
The Hierarchical model represent data as hierarchical tree structures. Each hierarchy represents
a number of related records. Here is the schema in hierarchical model notation.
Figure 5:
Physical Data models: Provide concepts that describe how data is actually stored in the computer.
http://cnx.org/content/m28156/1.1/
Figure 6:
As we can see from above picture, there are three levels of schemas in the database architecture
External level:
In this highest level, there exists a number of views which of is dened a part of the actual database.
Each view is provided for a user or a group of users so that it helps in simplied the interaction between
the user and system.
Conceptual level: Conceptual Schema in this level describes the logical structure of the whole database.
The entire database is described using simple logical concepts such as objects, their properties or
relationships. Thus the complexity of the implementation detail of the data with be hided from the
users.
http://cnx.org/content/m28156/1.1/
10
Internal level: Internal Schema in this level describes how the data are actually stored, how to access
the data.
Logical data independence is the ability to make change in the conceptual schema without causing a
modify in the user views or application program.
Physical data independence is the ability to make change in the internal schema without causing a
modify in the conceptual schema or application program.
Physical data independence seem to be easier to achieve since the way the data is organized in the memory
aect only the performance of the system. Meanwhile, the application program depends much on the logical
structure of the data that they are access.
It is not procedural language, rather a language for describing the types of entities and relationships
among them in terms of a particular data model.
Data Manipulation Language (DML): This is used to manipulate the database, which typically include
retrieval, insertion, deletion, and modication of the data.
Nave users who use the existing appication programs to perform their daily tasks
Sophiticated users are who use their own way to access to the database. This mean they donot use
the application program provided in the system. In stead, they might dene their own application or
describe their need directly in a query languages.
Specialized users maintain the personal database by using ready make program packages that provide
easy-to-use menu.
11
Based on data model: The most popular data model in today commercial DBMSs is relational data
model. Almost wellknown DBMSs like Oracle, MS SQL Server, DB2, MySQL are support this model.
Other traditional models can be named hierarchical data model , network data model. In the recent
year, we are getting familiar with object-oriented data model but this model has not had widespread
use. Some examples of Object-oriented DBMSs are O2, ObjectStore or Jasmine.
Based on number users we can have single user database system which support one user at a time or
multiuser syste,s which support multiple users concurrently
Based on the ways database is distributed we have centralized or distributed database system
Centralized database system : Data in this kind of system is stored at a single site.
Distributed database sytem: Actual database and DBMS software are distributed in various sites
connected by a computer network.
* Homogeneous distributed Database Systems
Use the same DBMS software at multiple sites
Data exchange between various sites can be handle easily
* Heterogeneous distributed Database Systems
Dierent sites might use dierents DBMS softwares
There is a software to support data exchange between sites
Figure 7:
http://cnx.org/content/m28156/1.1/
Figure 8:
http://cnx.org/content/m28156/1.1/
12