Data Models

advertisement
5. Data Models
Underlying structure of the database is called as data models.
 It is a collection of conceptual tools for describing data, data relationships, data
semantics, and consistency constraints.
 It is a way to describe the design of the database at physical, logical and view level.
Different types of data models are:
Entity relationship model
Relational model
Hierarchical model
Network model
Object Based model
Object Relational model
Semi Structured Data model
Entity relationship model
It is based on a collection of real world things or objects called entities and the
relationship among these objects.
The Entity relationship model is widely used in database design.
Relational Model
The relational model uses a collection of tables to represent both data and the
relationship among those data.
Each table has multiple columns and each column has a unique name.
Software such as Oracle, Microsoft SQL Server and Sybase are based on the
relational model.
E.g. Record Based model. It is based on fixed format records
of several types.
Hierarchical Model
 Hierarchical database organize data in to a tree data structure such that each record type
has only one owner
 Hierarchical structures were widely used in the first main frame database management
systems.
 Links are possible vertically but not horizontally or diagonally.
Advantages :

High speed of access to large datasets. Ease of updates.

Simplicity: the design of a hierarchical database is simple.

Data security: Hierarchical model was the first database model that offered the data
security that is provided and enforced by the DBMS.

Efficiency: The hierarchical database model is a very efficient one when the
database contains a large number of transactions, using data whose relationships are
fixed.
Disadvantages
Implementation complexity
Database management problems
Lack of structural independence
Network Model
 The model is based on directed
graph theory.
 The network model replaces the hierarchical tree with a graph thus allowing
more general connections among the nodes.
 The main difference of the network model from the hierarchical model is its ability to
handle many- to-many (n: n) relationship or in other words, it allows a record to have
more than one parent.
 Example is, an employee working for two departments.
Sample network model
Advantages:
Conceptual simplicity
Capability to handle more relationship
types:
Data independence:
Disadvantages:
Detailed structural knowledge is required.
Lack of structural independence.
Object-Based Data model
 The object- oriented model is an extension of E-R model.
 The object- oriented model is based on a collection of objects.
 An object contains values stored in instance variables within the object.
 An object also contains bodies of code that operate in the object these bodies of
code are called methods.
 Objects that contain the same types of values and methods are grouped together into
classes.
Advantages:
Applications require less code
Applications use more natural data model.
Code is easier to maintain.
It provides higher performance management of objects and complex
interrelationships between objects.
Object-oriented features improve productivity.Data access is easy.
Object Relational Model
 Object-relational data model combines the feature of modern object-oriented
programming languages with relational database features.
 Some of the object-relational systems available in the market are IBM DB2
universal
server,Oracle Corporation‘s oracle 8, Microsoft Corporations SQL server 7 and so on.
Semi Structured Data Model
 This data model allows the individual data items of same type to have different sets of
attributes.
 Other data model allows a particular type of data item to have same set of attributes.
 Extensible Markup Language (XML) is used to represent structured data
Download