Question
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.
******* IMPORTANT: I am looking for helo with the SQL inputs for this assignment. I know how to create the ERD, but I have no idea how to create the tables within SQL for this assingment. Again, Emphasis on help with the SQL/Creating the database for this assignment. *********
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started