In: Computer Science
Database:
Question 11
Using the ERD from problem 10, create the relational schema.(Create an appropriate collection of attributes for each of the entities. Make sure you use the appropriate naming conventions to name the attributes.)
ANSWER;
Relation data model -
Relation Data Model was an advance model that took over the Hierarchical Model and Network Model as these data models were very complex, and did not provids structural indepenmdence or data independence .
The Relation Data Model allows the data in the databases to be manipulated using relation calculus/relation algebra.
The data is represented in a table that is set of n- tuples.
A table is a matrix which is the collection of rows and colums.
Each intersection forms a cell wich contains a record.
The columns contain entries of same type and have a predefined set of allowed values called domain.
The tables are linked to each other by using keys and constraints to form relationships as represented in the real world.
Relation data model for united Broke Artists (UBA)
Taking the case of united Broke Artists (UBA),
there can be following tables in the model;
1. PAINTING-
The PAINTING table can have the following fields. The fields are also known as attributes. The fields are P _NAME , P_ EXHIBITION, P_PRICE, P _DT_CREQATED, G_ID and PT_ID
2. PAINTER_
The PAINTER table can have the following fields . The fields are PT_LNAME, PT_FNAME, P_NAME, PT_ADDRESS, PT_PH_NUMBER , P_ID and PT_ID.
3. GALLERY_
The GALLERY table can have the following fields are G_NAME, G_ADDRESS, G_DATE, G_ARTIST, and G_ID.
Relationship;
Between PAINTING and PAINTER table , there is a 1;M relationship. This is because each painting is created by a single painter but a painter can create many paintings.
Between PAINTING and GALLERY table, there is a 1;M relationship. This is because each painting is can be exhibited in only a single gallery but a gallery can have many paintings on exhibitions.
The relational model is shown below;