2.6 VIEW OF DATA
A major purpose of a database system is to provide the user with an abstract view of data i.e. not all details are supplied to the user when it comes to storage and maintenance of data.
2.6.1 Data Abstraction
Abstraction means removing a detail out of a description. It is noticed that most database users are not computer trained, that is why the designers hide the complexity of database from users through several level of abstraction so as to simplify the user’s interaction with the systems.
The levels are: -
Physical level
Logical level
View level
Figure 2.1 3-levels of data abstractions
Physical Level: - This is the lowest level of abstraction and describes how data are stored e.g. hashing, binary trees and index.
Logical Level: - The next higher level of abstraction describes what data are stored and what relationship exists among those data.
Database administrators use the logical level to decide on what information is to be kept in the database and use Simple logical structures.
View Level: - This is the highest level of abstraction that describes only a part of the database since the database users at times do need the entire database (information), they only need to access a portion of the database.
The level only exists to simplify users’ interaction.
2.6.2 Data models
Data models are a collection of conceptual tools for designing data relationship, data semantics and data constraints. They include: -
1. Entity – relationship models
2. Relational models
3. Other data models:
Object oriented data model
Object relational data model
Network data model
Hierarchical data model
1. Entity relationship model: This is based on the real worlds’ perception and consists of objects called entities and the relationship among those objectives. Entities are things that have attributes or properties to which values may be assigned e.g. attributes like first name, middle name and last name may be describe a name entity, persons bank accounts can all be considered as entities.
There are also some attributes that uniquely identify one person from the other because it is possible to have two students with same name or address that is why a unique registration number is assigned to each student as an identifier for such student
.
Relationship is an association among several entities e.g. a student department relationship associates a student with his/her department. A relationship set is the set of all relationship of the same type and an entity set is the set of all entities of the same type.
The E-R diagram can be used to represent the logical structure of a database. It has the following components:
1. Rectangle represents entity set
2. Ellipses represent attributes
3. Diamonds represents relationship among entity sets
4. Lines links attributes to entity set and relationship set.
e
Figure 2.2 A simple E – R diagram
2. Relational data models
Is the most widespread adopted data model due to its simplicity. The relational data model makes use of tables to represents data and relationship among those data. Each table has its own unique name and has a large number of columns also with unique names.
This models is the widely spread data model and majority of current database are based on it. Relational data model are at lower level of abstraction than E-R model that is why database designs are often carried out in the E-R model and translated to relational model, even though it is possible to design database in relational model but may have some problems e.g. duplicated information.
3. Other data models
The object oriented data model is another data model which is seen as an extension to E-R model and is based on a collection of objects. These objects can be nested so that they contain other objects and also contain bodies of codes known as methods. The only way one object can access the data of another object is by calling the method of that other object.
The object relational data method combines features of the object oriented data model and relational data model. In network model, data are represented by collection of records and relationships among data are represented by links. The hierarchical database is similar to network model and records are organized in a tree-like form rather than graphs as in the case of network model.
Share with your friends: |