Why Use a DBMS?
Data independence and efficient access.
Reduced application development time.
Data integrity and security.
Uniform data administration.
Concurrent access, recovery from crashes.
Purpose of DBMS
Data model
1. Data redundancy and inconsistency
Same information may be duplicated in several places.
All copies may not be updated properly.
2. Difficulty in new program to carry out each new task
3. Data isolation —
Data in different formats.
Difficult to write new application programs.
files and formats
Security problems
Every user of the system should be able to access only the data they are permitted to see.
E.g. payroll people only handle employee records, and cannot see customer accounts;
tellers only access account data and cannot see payroll data.
Difficult to enforce this with application programs.
Integrity problems.
Data may be required to satisfy constraints.
E.g. no account balance below $25.00.
Again, difficult to enforce or to change constraints with the file-processing approach.
Hierarchical Model
The hierarchical data model organizes data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments. Data in a series of records, which have a set of field values attached to it. It 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. To create links between these record types, the hierarchical model uses Parent Child Relationships. 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. For example, an organization might store information about an employee, such as name, employee number, department, salary.