31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
2) Write relational schema and integrity constraints for your relations. Provide the relevant SQL DDL statements to implement your ERD.
|
|
a) Pay careful attention to your choice of datatypes and consistency.
|
|
b) Consider referential integrity and nullable/not nullable attributes.
|
|
c) Make comment on the Normalisation level of your schemas.
|
|
d) Providing relational algebra statements is a bonus.
|
|
|
|
Assessment:
|
|
2. SQL DDL (30%)
|
|
You will provide a PDF Þle that contains your
|
|
Relational Schemas (RS),
|
|
Integrity Constraints (IC),
|
|
i.e.:
|
|
```
|
|
Mec_Repair(MID:integer, Name:string, Brand:string),
|
|
ICs: MID (Primary key), Brand (Foreign key referencing Car)
|
|
Normalisation reports: i.e. 3NF
|
|
DDL statements:
|
|
Car(Brand:string, weight:integer),
|
|
ICs: Brand (Primary key)
|
|
Normalisation reports: i.e. 3NF
|
|
DDL statements:
|
|
```
|
|
Normalisation reports for each RSs and
|
|
the DDL statements written in SQL.
|
|
|
|
You will receive full mark if your RS and ICs matches with your ERD. Otherwise, you we will reduce your mark based on the followings:
|
|
a) Typo for SQL code -2pts.
|
|
b) Reporting wrong Normalisation level -5pts.
|
|
c) IC mismatch from ERD to ICs or from ICs to DDL -10 pts.
|
|
d) Providing Relational Algebra statements (Bonus 10 pts)
|