| | |
DataBase Design Help
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Solved Threads: 1
Hi
I'am doing an online cinema ticket reservation system
and i have face a problem with the database design
i have these entities: Movie, Branch, Hall, Seat, Admin and customer
there is a relationship between the admin and all other entities except the customer which is the admin can add or update info in these entities
as far as i know the relationship can be between two entities or three!!
how can i draw the relationship between the admin and the related entities??
Thanks in advance
I'am doing an online cinema ticket reservation system
and i have face a problem with the database design
i have these entities: Movie, Branch, Hall, Seat, Admin and customer
there is a relationship between the admin and all other entities except the customer which is the admin can add or update info in these entities
as far as i know the relationship can be between two entities or three!!
how can i draw the relationship between the admin and the related entities??
Thanks in advance
Last edited by BeEasy; Oct 31st, 2008 at 12:41 pm.
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
When you say there is a relationship between the admin and the other entities, what do you mean?
They are allowed to edit as far as UPDATES, INSERTS, and DELETES or do you mean the admins are the owners of the movie hall? And just to be sure, hall means movie hall?
i would say to do it like this
admin -> hall -> branch -> movie -> seat -> customer
They are allowed to edit as far as UPDATES, INSERTS, and DELETES or do you mean the admins are the owners of the movie hall? And just to be sure, hall means movie hall?
i would say to do it like this
admin -> hall -> branch -> movie -> seat -> customer
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
If the admin is just a list of people who can add, modify and delete records and is used only for database security/management purposes, then the admin entity would not have a relationship to the other entities in the diagram.
However, if you want to track, say, the admin who made the most recent change to a record in a database, then you could add an AdminID foreign key to each entity.
Lastly, as mentioned by dickersonka, if the admin actually owes or is responsible for a particular Hall, then you would have admin related directly to Hall.
I guess my real question is, are admins used simply to administer the database or are admins responsible for individual halls, branches, movies, etc. ?
However, if you want to track, say, the admin who made the most recent change to a record in a database, then you could add an AdminID foreign key to each entity.
Lastly, as mentioned by dickersonka, if the admin actually owes or is responsible for a particular Hall, then you would have admin related directly to Hall.
I guess my real question is, are admins used simply to administer the database or are admins responsible for individual halls, branches, movies, etc. ?
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Solved Threads: 1
•
•
•
•
When you say there is a relationship between the admin and the other entities, what do you mean?
They are allowed to edit as far as UPDATES, INSERTS, and DELETES or do you mean the admins are the owners of the movie hall? And just to be sure, hall means movie hall?
i would say to do it like this
admin -> hall -> branch -> movie -> seat -> customer
I mean that the admin can edit or update let's say the admin can add new movie or add new hall for example
The hall is the movie hall.
•
•
•
•
If the admin is just a list of people who can add, modify and delete records and is used only for database security/management purposes, then the admin entity would not have a relationship to the other entities in the diagram.
However, if you want to track, say, the admin who made the most recent change to a record in a database, then you could add an AdminID foreign key to each entity.
Lastly, as mentioned by dickersonka, if the admin actually owes or is responsible for a particular Hall, then you would have admin related directly to Hall.
I guess my real question is, are admins used simply to administer the database or are admins responsible for individual halls, branches, movies, etc. ?
i want to keep track of the records edited by admins and thats the idea... i will have the admin Id as foreign key in the entities....
My question is here...should i create a single relationship which is edit or update and link all the related entities together???
or draw multiple relationships that have the same action which is edit or update between the admin entity and the other entities??
and as i said before....the admin is just the database adminstrator and there is no individual admin.
Thanks alot
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
•
•
•
•
and as i said before....the admin is just the database adminstrator and there is no individual admin.
are you meaning admin is a database user(windows / sql user account) or there is a table you are wanting called admin that has user credentials for an administrator?
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
I not sure what you mean by this:
However, let me make a few comments and see if they help:
For databases I've used in the past, there is a text field in each of the tables called "Updated By". Each time a record is updated, the field is updated to show the name of the person who made the update.
I've also used databases that makes copies of all updated records in a separate table so you can see the history of all the updates that have been made.
Lastly, you can't control who can make updates to a database simply by adding an admin entity to the database and adding relationships; you will need to program the database to lookup the current user and see if they are in the admin table; if they are not, the database must be programmed to not allow the user to make the changes.
•
•
•
•
My question is here...should i create a single relationship which is edit or update and link all the related entities together???
or draw multiple relationships that have the same action which is edit or update between the admin entity and the other entities??
For databases I've used in the past, there is a text field in each of the tables called "Updated By". Each time a record is updated, the field is updated to show the name of the person who made the update.
I've also used databases that makes copies of all updated records in a separate table so you can see the history of all the updates that have been made.
Lastly, you can't control who can make updates to a database simply by adding an admin entity to the database and adding relationships; you will need to program the database to lookup the current user and see if they are in the admin table; if they are not, the database must be programmed to not allow the user to make the changes.
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Solved Threads: 1
•
•
•
•
hmmm, still not perfectly clear to me, maybe tim understands a little more
are you meaning admin is a database user(windows / sql user account) or there is a table you are wanting called admin that has user credentials for an administrator?
i need his id as a foreign key in the related entites such as movie entity
so i must make a relation between the admin entity and the others
thanks for reply
•
•
•
•
I not sure what you mean by this:
However, let me make a few comments and see if they help:
For databases I've used in the past, there is a text field in each of the tables called "Updated By". Each time a record is updated, the field is updated to show the name of the person who made the update.
I've also used databases that makes copies of all updated records in a separate table so you can see the history of all the updates that have been made.
Lastly, you can't control who can make updates to a database simply by adding an admin entity to the database and adding relationships; you will need to program the database to lookup the current user and see if they are in the admin table; if they are not, the database must be programmed to not allow the user to make the changes.
but as i said the admin is the system administrator his job to modify or add new movie details or new branch details...i need his id as a foriegn key in the other tables so it will be recorded with each updated record.
also this modifying in the database in a seprate page that cannot be viewed by other users
my question is in the ERD.....can i make more than three connection to one relationship.??
thanks for your replies
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
then just as tim said, add an AdminId column to each table that will be modified by that user and record this id as the user
these will have 1 to many (admin can have multiple relationships to hall, branch, movie)
(1..x)
admin ------> hall
admin ------> branch
admin ------> movie
hall -> branch -> movie -> seat -> customer
then we will have the same structure as before
these will have 1 to many (admin can have multiple relationships to hall, branch, movie)
(1..x)
admin ------> hall
admin ------> branch
admin ------> movie
hall -> branch -> movie -> seat -> customer
then we will have the same structure as before
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Similar Threads
- your ideas on database design??? (Database Design)
- Database design regarding two 'linking' tables (Database Design)
- Database Design for storing versions (Database Design)
- Database Design feedback (absolute beginner here :) (Database Design)
- Help with contact/mailing list database design... (Database Design)
- Database design - subtypes and instances of an entity (Database Design)
- Database Design - Supertypes and Subtypes (Database Design)
- Database Design Advice (MySQL)
Other Threads in the Database Design Forum
- Previous Thread: Confused about ternary relationship mapping
- Next Thread: HELP figuring out a good 3rd year uni project title
| Thread Tools | Search this Thread |






