RELATIONAL MODEL Examples

A construction company has many branches spread all over the country. The company has two types of constructions to offer : Housing and Commercial, A housing company provides low income housing, medium style housing and high-end housing schemes, while on the commercial side it offers Multiplexes and shopping zones. The customers of the company may be individuals or corporate clients.
 Draw the E – R diagram for the company showing generalization or specialization hierarchies and aggregations, if any. Also create 3NF tables of your design.

Find the largest account balance
Strategy:
4Find those balances that are not the largest.
Rename account relation as d so that we can compare each account balance with all others.
4Use set difference to find those account balances that were not found in the earlier step. 
The query is:

     

Relations derived from E-R diagram