UNIT 2 DATA MODELS

Site: Newgate University Minna - Elearning Platform
Course: Data Management
Book: UNIT 2 DATA MODELS
Printed by: Guest user
Date: Saturday, 18 April 2026, 4:28 PM

Description

 


1. Object-Based Logical Models

Object-based logical models describe data at the conceptual and view levels. They provide fairly flexible structuring capabilities and facilitate the explicit specification of data constraints.

 There are several categories of object-based logical models. They are:

 

• Entity-relationship model, Object-oriented model, Binary model, Semantic data model, Infological model, Functional data model, etc. However, for the purpose of this course we shall be considering the Entity-relationship and Object-oriented models.

 

1. The E-R Model

 The entity-relationship model is based on a perception of the world as consisting of a collection of basic objects (entities) and relationships among these objects.

 In order to grasp the full notion of this model, we would describe some of the key terms highlighted above. An entity is a distinguishable object that exists. Each entity has associated with it a set of attributes describing it. E.g. number and balance for an account entity. On the other hand a relationship is an association among several entities. For example, a cust_acct relationship associates a customer with each account he or she has. Thus, the set of all entities or relationships of the same type is called the entity set or relationship set.

 Another essential element of the E-R diagram is the mapping cardinalities, which express the number of entities to which another entity can be associated with via a relationship set. We will see later how well this model works to describe real world situations.

 The overall logical structure of a database can be expressed graphically by an E-R diagram as depicted in Figure 1.2 below:

 

 

Fig. 1.2:   An E-R Diagram

 •              rectangles: represent entity sets.

•              ellipses: represent attributes.

•              diamonds: represent relationships among entity sets.

•              lines: link attributes to entity sets and entity sets to relationships.

 

2. The Object-Oriented Model

The object-oriented model is based on a collection of objects, like the E- R model. Classically, an object contains values stored in instance variables within the object. Unlike the record-oriented models, these values are themselves objects.

 An object contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain the same types of values and the same methods are grouped into classes. A class may be viewed as a type definition for objects. The only way in which one object can access the data of another object is by invoking the method of that other object. This is called sending a message to the object. Internal parts of the object, the instance variables and method code, are not visible externally.

 We can apply the aforementioned theory representing a bank account by means of an object. The object contains instance variables number and balance. The object contains a method pay-interest which adds interest to the balance. Under most data models, changing the interest rate entails changing code in application programs.

 In the object-oriented model, this only entails a change within the pay- interest method. On the other hand, for entities in the E-R model, each object has its own unique identity, independent of the values it contains. Thus, two objects containing the same values are distinct. Furthermore, distinction is created and maintained in physical level by assigning distinct object identifiers.

2. Record-based Logical Models

Record-based logical models are models which describe data at the conceptual and view levels. Unlike object-oriented models, they are used to specify overall logical structure of the database, and provide a higher-level description of the implementation.

They are called record-based logical models because the database is structured in fixed-format records of several types. Each record type defines a fixed number of fields, or attributes. Each field is usually of a fixed length (this simplifies the implementation). Record-based models do not include a mechanism for direct representation of code in the database. Separate languages associated with the model are used to express database queries and updates.

 The three most widely accepted models are the relational, network, and hierarchical. We will now briefly consider these models in the units that follow.

 1. The Relational Model

In the relational model, data and relationships are represented by a collection of tables. Each table has a number of columns with unique names, e.g. customer, account. Figure 1.3 shows a sample relational database.

 

 

NAME

STREET

CITY

NUMBER

Bisi

Agbowo

Ibadan

NUM090

Hassan

Ahmadu Bello

Lagos

NUM056

Onome

Atama

Benin

NUM074

Uduak

Rowlings

Calabar

NUM081

Zainab

Sule

Katsina

NUM064

 

NAME

BALANCE

NUM090

3000

NUM056

10000

NUM074

14000

NUM081

20000

NUM064

18000

Fig. 1.3:   A Sample Relational Database

2. The Network Model 

In the network model, data are represented by collections of records. Relationships among data are represented by links. A network model is typically arranged as an arbitrary graph. Figure 1.4 shows a sample network database

 

 

Fig. 1.4:   A Sample Network Database 

3.The Hierarchical Model

The hierarchical model is similar to the network model. However, in this model organisation of the records is as a collection of trees, rather than arbitrary graphs. 

The relational model does not use pointers or links, but relates records by the values they contain. This allows a formal mathematical foundation to be defined. 


3. Physical Data Models

Physical data models are used to describe data at the lowest level. There are very few physical data models, e.g. Unifying model, Frame memory. It would suffice to mention these two since these models are outside the scope of our studies.