Study Guides (400,000)
US (230,000)
UC-Irvine (3,000)

COMPSCI 122A Study Guide - Quiz Guide: Decimal Mark, Foreign Key, HatchbackExam

Computer Science
Course Code
Kenneth Shea
Study Guide

This preview shows half of the first page. to view the full 3 pages of the document.
CS 122A: Introduction to Data Management – Spring 2020
Homework 2: E/R and Relational Translation (100 points)
Due Date:
Friday, Apr 17 (11:00 PM)
All HW assignments should contain your student ID and your name and must be submitted online (e.g.,
12345678_John_Doe.pdf) via the HW2 in Gradescope. See the table below for the HW 2 submission opportunities. Note
that after 11 PM on Saturday the 18th no further HW 2 submissions will be accepted. (We will be releasing the solution
at that time.) Please strive to get all your work in on time! If possible, try to save the one dropped assignment for the
end of the term when you are most likely to want/need it.
Date / Time
Grade Implications
Friday, Apr 17 (11:00 PM)
Full credit will be available
Saturday, Apr 18 (11:00 PM)
10 points will be deducted
E-R based Relational Schema Design [100 pts]
You have successfully designed an E-R diagram for ShopALot. Now, to set up a real database, you must design a
relational schema to represent the objects described in the E-R diagram that you created. Specifically, you will need to
design an appropriate collection of tables and create a SQL DDL statement for each table. To make sure your design is
a good one, you have given your E-R diagram to an external database consulting firm, DBInstructor, Inc., to have their
experts check the correctness of your design. DBInstructor will provide your final E-R diagram soon. Since time is of the
essence, though, you should start designing the required relational schema now based on your original E-R diagram.
Your final design must be based on the E-R schema that DBInstructor provides, however. That schema will appear after
Saturday’s 11:00 PM HW 1 “drop dead” deadline has passed. (You can also get MySQL installed and running in the
As you work on your design, if you see opportunities to avoid creating excess relations that stem from relationships, do
indeed avoid them so as to make the schema simpler. Clearly list all of your relations and their attributes (including their
types), primary keys, foreign keys (including the referenced target relations), and not null constraints by writing a SQL
DDL statement for each table. The resulting design should capture the information and constraints of the E-R diagram as
faithfully as possible. For types, use one of the following types for each column:
You're Reading a Preview

Unlock to view full version