Software Requirements  «Prev  Next»
Lesson 3 Database models
ObjectiveDescribe the four basic database models.

Database Models

In the landscape of database technologies, various models have been developed to structure, manage, and retrieve data effectively. The primary database models that have played significant roles throughout the history of computing include
  1. hierarchical databases,
  2. relational databases,
  3. network databases, and
  4. object databases.

Each model embodies a distinct architecture and set of principles for how data is related and manipulated: A data model consists of the rules or methods for structuring the relationship among data elements.

1) Hierarchical Database

This is a highly-structured model, which facilitates data storage and retrieval by classes. A class is a grouping based on a common characteristic. Each class relates vertically to other classes, similar in layout to an organization chart (president, VPs, managers, and so on). This structure is best used in stable data environments, like accounting or inventory record keeping, and is most often the structure of choice within large mainframe computing systems. The hierarchical structure is low on flexibility but gives better speed of access and has been in use since the 1950s. The hierarchical database model organizes data in a tree-like structure where each record has a single parent, resembling a family tree. Each level of this tree is a "child" of the one above it, and a "parent" to the ones below, allowing data to be structured in parent-child relationships. This model is adept at representing data with a clear and straightforward hierarchy, ensuring efficient data retrieval when the path is known. However, it lacks the flexibility to model many-to-many relationships and can lead to redundancy if not carefully managed.
 Hierarchical Database
1) Hierarchical Database


2) Relational Database

This type of database places related data into columnized tables. Each attribute is a single column (such as Firstname, Lastname, Phone, and so on). Tables are related to another table by using a single similar column attribute, such as social security number. The relational database structure is ideal for dynamic examination and re-association of data, common to a decision maker's environment. A request example might be, "Give me the Lastname of all employees whose phone number begins with 426." The relational model is most often found on PCs and servers, and typically has slower speed of access but provides maximum flexibility in terms of the types of queries you can submit.
The relational database model, pioneered by E.F. Codd, revolutionized database design with its use of tables, or relations, to store data. Each table, which can be thought of as analogous to a spreadsheet, contains rows (records) and columns (fields). These tables are linked by shared data attributes, known as keys. The relational model provides a high degree of flexibility and simplicity in data management, enabling complex queries that involve multiple tables. It is founded on rigorous mathematical theory and relies on Structured Query Language (SQL) for data manipulation and definition.
Relational Databases: Tables with relationships defined by common fields to create a view.
2) Relational Databases: Tables with relationships defined by common fields to create a view.


3) Network Databases

The network model attempts to join the strengths of the hierarchical model with those of the relational model. In a nutshell, it attempts to make a hierarchical structure appear like a relational one to the user, to facilitate the dynamic information gathering needs of decision makers. Like any hybrid, multipurpose tool, it lands somewhere in the middle of the more pure forms in terms of its benefits. It's neither as fast as a hierarchical, nor as flexible as a relational.
Network Database Model: The network database model extends the hierarchical model by allowing each record to have multiple parents. This accommodates more complex relationships by permitting many-to-many linkages between data records. The model is visualized as a graph where entities (records) are nodes and relationships (links) are edges. It is particularly useful when dealing with large and interconnected datasets where relationships are not strictly hierarchical. Despite its flexibility, the complexity of the network model can make it more challenging to design and maintain.
Network Database
3) Network Databases


4) Object Database

Object databases are a latest evolution to data storage and retrieval systems. Built on the Java language, data is associated to related entities for on-the-fly association with other entities. As this technology evolves, its offers the promise of rapid database development and maximum flexibility. Unfortunately, the cross-association that is required to link objects of data make this model potentially slower than both hierarchical and relational. The object database model takes a different approach by integrating object-oriented programming with database technology. Data is stored as objects, the same way an object-oriented programming language (like Java or C++) would define objects. This means that both data and its associated procedures (methods) are encapsulated as a single entity. Object databases can manage complex data and relationships without needing to fit them into a table structure, making them suitable for applications requiring high performance with complex data, such as multimedia, engineering, and scientific databases.
Object Databases - Discrete objects using messages to communicate. Objects contain database information plus program code.
4) Object Databases - Discrete objects using messages to communicate. Objects contain database information plus program code.

In summary, each database model is designed to address specific data storage, retrieval, and management needs. The hierarchical model is fast but rigid, the relational model is flexible and widely used, the network model handles complex relationships, and the object model aligns with the paradigms of object-oriented programming. The selection of a database model for a given application depends on the nature of the application's data and the associated relationships, as well as performance considerations and the database management requirements.
In the next lesson, you will learn how a database communicates with a Web site.