Professional Documents
Culture Documents
Our first task is to create an erd using crow foot notation for the cooking recipe website. The figure
below is the erd our database.
Task 2
Next task is to create a data dictionary for each attribute in the table including data type, size and also
include the primary and foreign key constraints. The attached excel file has the data dictionary for each
field for each table.
Task 3
Task 3 is to create the tables in the postgresql. The image below show the basic format of creating tables
in postgresql.
To do this task, pgadmin4 tool is used. The attached text file contains the script of whole erd.
Task 4
The next task is to test some queries that are as follow:
i. Find the starter recipe that can be served to 4 people. the query has inner join between
three table recipe that are to be selected, course that having the information about the
starter and the recipecourse table that links course and recipe table. The query and output
are shown in the figure below.
ii. Find the recipe that has chicken as a starter. There are also an inner join between three
tables include recipe, ingredient table and the recipeingredient that links them.
iii. Find the vegan recipe. There is a simple query for this.
Where recp_category=’vegon’;