Uploaded by Bo7MD

1. Database and Database Users

advertisement
Database and Database Users
- Data: known facts that can be recorded.
- Database: collection of related data.
- Mini-world: some part of the real world.
- Database Management System (DBMS): software
designed to assist in maintaining and utilizing large
collection of data.
- Database System: database + DBMS.
- Some DB Integrity Constraints:
 Data type (Domain Constrain)  DOB
(DD/MM/YYYY).
 Uniqueness (Key Constrain)  ID, Fingerprint, IP
Address.
 Both are constraints on one object/table.
 Referential Integrity Constraint
- A DBMS facilitates the process of:
1. Defining a database: specifying data
types, structures, and constraints.
2. Constructing the database: storing data .
3. Manipulating the database: querying, updating.
Do we really need a DBMS?
- Problems with flat files:
1. Hard to access data.
2. Requires special expensive programs to answer
queries.
3. Time consuming
4. Data inconsistency: accessing data simultaneously
by many users.
5. Data redundancy: data stored twice or more.
Characteristics of Database Approach
1. Self-describing nature of a database system:
Contains not only the data, but also complete
description of the data structure and constrains.
- Catalog: stores the definition and structure of
the data used by DBMS software or database
users.
- Meta-data: the information stored in the
catalog.
2. Insulation between program and data:
Previously, changes to files required changes to all
programs accessing these files.
In DBMS, we have program-data independency,
changes are reflected only in catalog and no
programs need to be modified.
3. Support of Multiple Views of the Data:
Different users require different views of the
database.
View: subset of the data or virtual data derived from
database file but not physically stored
Depending on user's interests, different views of the
database maybe created
4. Sharing of Data and Multiuser Transaction
Processing:
Allowing multiple users to access the data requires
Concurrency control: software to ensure controlling
updates from multiple users such that the result is
correct.
- This supports online transaction processing
(OLTP)
Advantages of DBMS:





Data Independence
Efficient data access
Data integrity via integrity constraints
Concurrent access and crash recovery
Data administration and controlling redundancy
- DBMSs are expensive due to 1) Hardware, software,
and training. 2) Overhead for providing security,
concurrency control, recovery, and integrity functions.
- DBMSs are not desirable when:
 Database and applications are simple, well defined,
and not expected to change.
 Multiple-user access to data is not required.
 Many real-time requirements that may not be met
because of DBMS overhead.
Download