Hi,
For one of the sites that I maintain I am looking to create a form for adding hospitals including address and wards. The end aim will be to retrieve the data stored into another form in order to select a hospital name and then ward name in a double dropdown. What I can't decide in my mind is the method to save all the information into the database.
My initial thoughts are to have:
a single table for the hospital names
a single table to hold the address in separate columns
a single table to hold each of the wards one ward per column
These would all be linked by sharing the same "id" as the hospital so a query on a hospital would be able to select the additional attributes.
Any thoughts on setting it up this way or possibly a better or simpler way of doing it?
Regards,
Dave
For one of the sites that I maintain I am looking to create a form for adding hospitals including address and wards. The end aim will be to retrieve the data stored into another form in order to select a hospital name and then ward name in a double dropdown. What I can't decide in my mind is the method to save all the information into the database.
My initial thoughts are to have:
a single table for the hospital names
a single table to hold the address in separate columns
a single table to hold each of the wards one ward per column
These would all be linked by sharing the same "id" as the hospital so a query on a hospital would be able to select the additional attributes.
Any thoughts on setting it up this way or possibly a better or simpler way of doing it?
Regards,
Dave
Hi Dave,
If each hospital only has one address then you could combine the first two tables, the third table looks good - but it would be one ward per row (not per column).
Bob
If each hospital only has one address then you could combine the first two tables, the third table looks good - but it would be one ward per row (not per column).
Bob
This topic is locked and no more replies can be posted.