Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine you work for the public housing agency of a city, and you have been charged with keeping track of who is living in the

Imagine you work for the public housing agency of a city, and you have been charged with keeping track of who is living in the agency's developments over time. To help you in this task, you have decided to use a relational database for your record keeping. Your task is to design a database that allows you to capture the facts described below:

The city has multiple public housing developments. You want to record their names, locations, the year they opened, number of units, and their height in stories.

For each unit in the development, you want to keep track of the number of bedrooms, the number of bathrooms, whether the unit has a kitchen and/or living room, and the square footage.

The database should keep track of the households living in the units. For each member of a household, you want to record their name, date of birth, sex, and indicate whether or not they are they are the head of the household (more than one person can share that distinction).

You also want to keep track of when a household moved into and out of a particular unit. You want to be able to follow households as they move from one unit to another or from one development to another. Think about how you will find the unit that the household is currently occupying (i.e., what query would you write to find the current unit of each household).

Draw an ERD in Visio or Lucid Chart using Crows Foot Methodology for this database. Print this ERD and be sure it is large enough for me to read. Save this ERD as a pdf file.

Write the SQL statements needed to create each of your tables. Be sure to establish primary key and foreign key constraints. At least two of your tables MUST use auto-generated primary keys.

Invent data for three developments; two units in each development; and three families, one with 2 members, one with 3 members, and one with 4 members. Include records for each household making one move to another unit. Write the insert statements needed to put this data in your tables.

Write SQL statements to list all the data in each table.

** While I am not completely sure about the ERD part, I am less sure about the SQL part. In other words, I am very confused on SQL in general and how to create tables from the ERD **

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

help asp

Answered: 1 week ago

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago

Question

Use of assessments to determine trainees learning styles.

Answered: 1 week ago