UNIT 2 DATA MODELS
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.
|
|
|
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.