ch1_database-system-concepts
ch1_database-system-concepts
Polytechnic, Chandwad
Chapter 1 Marks 12
Database System Concept
Data is distinct pieces of information, usually formatted in a special way. Data can exist in a
variety of forms -- as numbers or text on pieces of paper, as bits and bytes stored in
electronic memory, or as facts stored in a person's mind.
Strictly speaking, data is the plural of datum, a single piece of information. In practice,
however, people use data as both the singular and plural form of the word.
(2) The term data is often used to distinguish binary machine-readable information from
textual human-readable information. For example, some applications make a distinction
between data files (files that contain binary data) and text files (files that contain ASCII
data).
(3) In database management systems, data files are the files that store the database
information, whereas other files, such as index files and data dictionaries, store
administrative information, known as metadata.
3. Data isolation.
Because data are scattered in various files, and files may be in different formats, writing
new application programs to retrieve the appropriate data is difficult.
4. Integrity problems.
The data values stored in the database must satisfy certain types of consistency
constraints. For example, the balance of certain types of bank accounts may never fall below a
5. Atomicity problems.
A computer system, like any other mechanical or electrical device, is subject to failure.
In many applications, it is crucial that, if a failure occurs, the data be restored to the consistent
state that existed prior to the failure. Consider a program to transfer Rs 50 from account A to
account B. If a system failure occurs during the execution of the program, it is possible that the
Rs 50 was removed from account A but was not credited to account B, resulting in an
inconsistent database state. Clearly, it is essential to database consistency that either both the
credit and debit occur, or that neither occur. That is, the funds transfer must be atomic-it must
happen in its entirety or not at all. It is difficult to ensure atomicity in a conventional
file-processing system.
7. Security problems.
Not every user of the database system should be able to access all the data. For
example, in a banking system, payroll personnel need to see only that part of the database
that has information about the various bank employees. They do not need access to
information about customer accounts. But, since application programs are added to the
file-processing system in an ad hoc manner, enforcing such security constraints is difficult.
1. Independence of Data and Program: This is a prime advantage of a database. Both the
database and the user program can be altered independently of each other thus saving time
and money which would be required to retain consistency.
2. Data Share Ability and Non- redundancy of Data: The ideal situation is to enable
applications to share an integrated database containing all the data needed by the
applications and thus eliminate as much as possible the need to store data redundantly.
3. Integrity: With many different users sharing various portions of the database, it is
impossible for each user to be responsible for the consistency of the values in the database
and for maintaining the relationships of the user data items to all other data item, some of
which may be unknown or even prohibited for the user to access.
4. Centralized Control: With central control of the database, the DBA can ensure that
standards are followed in the representation of data.
5. Security: Having control over the database the DBA can ensure that access to the database
is through proper channels and can define the access rights of any user to any data items or
defined subset of the database. The security system must prevent corruption of the existing
data either accidentally or maliciously.
6. Performance and Efficiency : In view of the size of databases and of demanding database
accessing requirements, good performance and efficiency are major requirements, Knowing
the overall requirements of the organization, as opposed to the requirements of any individual
user, the DBA can structure the database system to provide an overall service that is 'best for
the enterprise'.
• Airlines: For reservations and schedule information. Airlines were among the first to use
databases in a geographically distributed manner.
•Credit card transactions: For purchases on credit cards and generation of monthly
statements.
•Telecommunication: For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks.
•Finance: For storing information about holdings, sales, and purchases of financial instruments
such as stocks and bonds; also for storing real- time market data to enable on-line trading by
customers and automated trading by the firm.
•Manufacturing: For management of the supply chain and for tracking production of items in
factories, inventories of items in warehouses and stores, and orders for items.
•Human resources: For information about employees, salaries, payroll taxes, benefits, and for
generation of paychecks.
1. Physical level. The lowest level of abstraction describes how the data are actually
stored. The physical level describes complex low-level data structures in detail.
2. Logical level. The next- higher level of abstraction describes what data are stored in the
database, and what relationships exist among those data. The logical level thus
describes the entire database in terms of a small number of relatively simple structures.
Although implementation of the simple structures at the logical level may involve
complex physical- level structures, the user of the logical level does not need to be
3. View level. The highest level of abstraction describes only part of the entire database.
Even though the logical level uses simpler structures, complexity remains because of the
variety of information stored in a large database. Many users of the database system do
not need all this information; instead, they need to access only a part of the database.
The view level of abstraction exists to simplify their interaction with the system. The
system may provide many views for the same database.
Figure 1.1 shows the relationship among the three levels of abstraction.
1. Authorization and integrity manager, which tests for the satisfaction of integrity constraints
and checks the authority of users to access data.
2. Transaction manager, which ensures that the database remains in a consistent (correct)
state despite system failures, and that concurrent transaction executions proceed without
conflicting.
3. File manager, which manages the allocation of space on disk storage and the data
structures used to represent information stored on disk.
4. Buffer manager, which is responsible for fetching data from disk storage into main memory,
and deciding what data to cache in memory.
In addition, several data structures are required as part of the physical system
implementation:
1. Data files, which store the database itself.
2. Data dictionary, which stores metadata about the structure of the database. The data
dictionary is used heavily. Therefore, great emphasis should be placed on developing a good
design and efficient implementation of the dictionary.
3. Indices which provide fast access to data items that hold particular values.
4. Statistical data, which store statistical information about the data in the database. This
information is used by the query processor to select efficient ways to execute a query.
Following figure 1.2 shows these components and the connections among them.
A-207 750
3. Null Attributes:-
A null value is used when an entity does not have a value for an attribute. A null value is
an unknown value which may be either missing or not know.
eg street attribute may have null value.
4. Derived Attributes:-
The value for this type of attribute can be derived from the values of other related
attribute or entity.
Relation Ship:-It is an association among several entity
Relation Ship Set:-It is a set of relations of the same types.
Entity-Relation (E-R) diagram:-The overall logical structure a d/b can be express graphically by
E-R diagram which is built by following components.
1. Rectangle:-which represent entity set.
2. Ellipse:-which represent attributes.
3. Diamonds:-which represent relationship among entity set.
4. Lines:- which link attributes to entity set and entity set to relationship set.
5. Dashed ellipse:-which represent derived attribute.
6. Double ellipse :- which represent multi-valued attribute.
7. Double lines:-which represent total participation of entity in a relationship set.
8. Double rectangle :- which represent weak entity set.