Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2015

    Help needed in creating ERD with optional stuff..

    Hello guys,

    I have a database which consists of university, country, state, city

    How do I make the relations between them so that state and city are optional, while country and university must always have an entry?

    I was thinking of creating a new table, adding university and country as PFKs, state and city as FKs. But it doesn't make full sense to me.

    If you could please offer guidance, thank you.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    entity for each
    university entity has FK of other 3 tables, state and city FK's are nullable
    presumably state has non nullable FK to country
    presumably city has non nullable FK to state
    ..but then again its your homework, your design choices
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts