Professional Documents
Culture Documents
Assigned: March 6
Instructor: McGinity
Due: March 11
For each of the below scenarios, create an ERD and DB design outline, as indicated in class.
This assignment has 3 steps:
1) Use the LucidChart ERD Template 3 to make your entity-relationship diagram;
2) Share your ERD with me (mcginity@scarletmail) via LucidChart;
3) Use the LucidChart Google Doc addon to insert your ER Diagrams into this file.
*Please be sure to also include your outlines as text in this document.
CREATE TABLE
CREATE TABLE
);
CREATE TABLE OwnsShares( ssn int CONSTRAINT fk_indv REFERENCES Individual(ssn),
tax_id int CONSTRAINT fk_comp REFERENCES Company(tax_id)
num_shares DOUBLE,
PRIMARY KEY (ssn, tax_id)
);
CREATE TABLE COwnsShares( owner_tax_id int CONSTRAINT fk_compA REFERENCES Company(tax_id),
tax_id int CONSTRAINT fk_compB REFERENCES Company(tax_id)
num_shares DOUBLE,
PRIMARY KEY (owner_tax_id, tax_id)
);
You have signed on as a member of Sustainability Taskforce, which sponsors ecologically-oriented community
projects of various kinds (such as building and distributing composters or constructing energy-efficient low-income
housing). You have volunteered to start building a relational database to replace the hodgepodge of spreadsheets
currently being used to track membership and projects. Assume you have access to zip code table, and plan to
include it in the database.
First, you want to keep track of all the taskforce's members. For each member, you want to store the following
information: first name, middle name, last name, date of birth, address information (street address, city, state, and
zip code), phone number, email address, and date of joining the organization. Furthermore, most members have a
mentor, who is another member of the taskforce.
For each project, you want to store a name, worksite address (street address, city, state, and zip code), description,
date started, and date ended (blank if the project is still ongoing). Furthermore, you want the database to remember
which members are involved in each project: a project can involve as few as one member and in some cases as
many as 25.
Each project has at least one designated project leader; usually there is just one leader per project, but for some
larger projects there may be more. You need to track the leaders for each project. Additionally, you want to feature
the project leaders (less than %5 of all members) on the website with a photo and short bio. The bio will be about
one paragraph, requiring the Access Memo data type, and the photo will be an Attachment data type.
Design a database to hold all this information. Use the LucidChart ERD Template 3 to make an entity-relationship
diagram, share your ERD with me (mcginity@scarletmail), and insert your ERD into this file using the addon.
CREATE TABLE
CREATE TABLE