Relational database model




Relational database model definition:

Relational database model is a database model where between database entities may exist all kind of database relations.

Relational database model example:

In the relation database model does not need to exist (as is in the hierarchical database model or network database model) a main, parent database which is a “tree root” of the database.

Let’s take a example “Shop database” :




Shop database contains 5 database entities:

  • Branches (this database entity contains data about shop branches in various localizations)
  • Sellers (this database entity contains data about sales staff)
  • Customers (this database entity contains data about shop customers)
  • Products (this database entity contains data about products that the shop offers)
  • Transactions (this database entity contains data about which product has been purchased by customers from Customers database and seller that sold specific product for specific customer)




Relational database model

In the above example there is no one database which is a parent for other databases. As we can see Customer and Products databases are connected one to many relation with Transactions database so they are direct parents for Transaction database but they do not have their own parents. Branches database is a direct parent for Sellers and not direct parent for Transactions database (by Sellers database) but it is not parent (direct or via other database entity) for Customers and Products.

Relational database model

If we want to check who from sellers sold the Fridge and who from customers  purchased them we should look for Transaction database and investigate to whom form cutomer and sellrs is assigned fridge IDs form Products database (as we can see it is P2 value).  In the above example P2 value is assigned to follwing ID_SELLER: S12, S14. It means that sellers who sold the fridge are Kate Anderson and Natalie Scott. Customers that bought the fridge has ID_CUSTOMER value equal to: EC14 and EC12. Now we can investigate in the Customers database who from customers have such IDs. As we see they are Tim Taylor and John Dudley.

Copyright © 2015-2016 • All Rights Reserved • database-definition.com