0

Pset7 (Fiftyville) DB has 10 tables. It would be much easier to work with them if the entity–relationship model (ER diagram) is presented. Pset description doesn’t have it.

1 Answer 1

0

Here is the ER diagram for the Pset7 (Fiftyville) database: enter image description here

If you want to play with it yourself, here’s the code you may use on dbdiagrams.io (“Create your diagram” -> replace the code at the left side with the code below):

TABLE crime_scene_reports {
    id INTEGER PK
    year INTEGER
    month INTEGER
    day INTEGER
    street TEXT
    description TEXT
}

TABLE interviews {
    id INTEGER PK
    name TEXT
    year INTEGER
    month INTEGER
    day INTEGER
    transcript TEXT
}

TABLE courthouse_security_logs {
    id INTEGER PK
    year INTEGER
    month INTEGER
    day INTEGER
    hour INTEGER
    minute INTEGER
    activity TEXT
    license_plate TEXT
}

TABLE atm_transactions {
    id INTEGER PK
    account_number INTEGER
    year INTEGER
    month INTEGER
    day INTEGER
    atm_location TEXT
    transaction_type TEXT
    amount INTEGER
}

TABLE bank_accounts {
    account_number INTEGER
    person_id INTEGER
    creation_year INTEGER
}

Ref {
    bank_accounts.person_id > people.id
}

TABLE airports {
    id INTEGER PK
    abbreviation TEXT
    full_name TEXT
    city TEXT
}

TABLE flights {
    id INTEGER PK
    origin_airport_id INTEGER
    destination_airport_id INTEGER
    year INTEGER
    month INTEGER
    day INTEGER
    hour INTEGER
    minute INTEGER
}

Ref {
    flights.origin_airport_id > airports.id
}
Ref {
    flights.destination_airport_id > airports.id
}

TABLE passengers {
    flight_id INTEGER
    passport_number INTEGER
    seat TEXT
}

Ref {
    passengers.flight_id > flights.id
}

TABLE phone_calls {
    id INTEGER PK
    caller TEXT
    receiver TEXT
    year INTEGER
    month INTEGER
    day INTEGER
    duration INTEGER
}

TABLE people {
    id INTEGER PK
    name TEXT
    phone_number TEXT
    passport_number INTEGER
    license_plate TEXT
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .