Understanding Database Types: Hierarchical, Network, and Relational

Database Types
There are three major models of databases: hierarchical, network, and relational.

Hierarchical Database

A hierarchical database uses a tree structure for the logical representation of data. Files are organized into hierarchies, with each corresponding to one of the entities of the database. Hierarchical trees are represented upside down, with the root at the top and the leaves at the bottom.

Characteristics of Hierarchical Databases:

  • File segments are arranged in a hierarchical tree.
  • Segments are linked by one or more relationships.
  • Each node consists of one or more fields.
  • Each occurrence of a parent record can have different numbers of occurrences of child records.
  • When you delete a parent record, all child records should also be deleted (data integrity).
  • Each child record must have a single parent, except for the root record.

Network Database

The network model attempts to overcome the shortcomings of the hierarchical approach, allowing many-to-many relationships through a network or graph structure. A network data structure is very similar to a hierarchical structure; in fact, it is just a superset of it. As in the hierarchical structure, each node may have several children, but unlike the latter, it can also have several parents.

Characteristics of Network Databases:

  • One set consists of two types of records that have a many-to-many relationship.
  • To represent this type of relationship, both types of records are interconnected by a record called a connective record.
  • Sets have the following characteristics:
    • The parent is named the owner record, while the child record is called a member.
    • One set consists of a single owner record and one or more member records.
    • One set occurrence is a collection of records, one of which is the owner and the others are members.
    • All owner records of occurrences of the same type of set should be of the same type of record.
    • The type of owner record of a set must be different from the types of member records.
    • Only one member record can appear once in the occurrences of sets of the same type.
    • A member record can be associated with more than one owner, meaning it can belong simultaneously to two or more different sets.
    • This situation can be represented by a multilevel hierarchy.

Relational Database

Relational databases are the most well-known and widely used due to their simple operation and accessibility to all users. In a relational database, the aim is for the user to see the database as a logical structure of relations (tables), which is simple and uniform.

Characteristics of Relational Databases:

  • They generally contain multiple tables.
  • A table contains only a fixed number of fields.
  • The names of the table fields are different.
  • Each table row is unique.
  • The order of the records and fields is not certain.
  • For each field, there is a set of possible values.

In relational databases, rows represent records (collections of data about separate items), and columns represent fields (particular attributes of a record). When conducting searches, a relational database matches the information in a field in one table with information in a field in another table, leading to a third table that combines requested data from both tables.

Basic Operations:

The permitted operations in these databases are primarily updates, including insertion, deletion, and modification, as well as queries. The basis of all operations is in relational algebra, which is used for all relational languages like SQL. The treatment of the databases must satisfy integrity rules to ensure that the model accurately represents reality, avoiding inconsistencies.

Benefits of a Relational Database:

  • Compatibility and standardization.
  • Reliability.
  • Guarantee of data independence.
  • Presence of numerous trading systems to choose from and subsequent technical support.
  • Guaranteed connectivity with standard programming languages.
  • A relational database is a stable platform compatible with its capabilities and limitations in expressive power.

Entity-Relationship Model (ER)

The Entity-Relationship Model (ER) is a representation model used for the representation of relational databases. It was proposed by Chen in the years 1976-1977. The ER model describes data as entities, relationships (links), and attributes, allowing for the graphical representation of the conceptual schema of a database through ER diagrams.

Important Features:

  • Each table contains only one record type.
  • Records have no specific order from top to bottom.
  • The fields do not have a specific order from left to right.
  • Each field has a value and is represented only one way.
  • The logical connections within a relationship are represented by fields considered primary keys and secondary keys.

Normalization of a Database

In simple terms, the process of normalization is based on describing the information using tables. These tables are structured to comply with certain formats called normal forms. The higher the normal form, the stricter the criteria that are met, making the table easier to manage.

Normal Forms:

  • First Normal Form: No multiple fields. All rows should have the same number of columns.
  • Second Normal Form: All non-key fields must depend entirely on the whole key.
  • Third Normal Form: No transitive dependencies. A field must depend on the key and not on another field.
  • Fourth Normal Form: A row must not contain two or more multi-valued fields (those that can contain more than one value simultaneously) on an entity.
  • Fifth Normal Form: A table can store the key attributes dependent only on marriage.

Informatics Engineering
End of Database