Thread: Tables relations
12-21-15, 05:47 #1Registered User
- Join Date
- Nov 2015
Unanswered: Tables relations
I have 4 tables
Some drivers and buses have only one trip in one school while some have two trips in two different schools..
Also there are drivers and buses which have no trips, means they are spare drivers and spare buses..
its easy for me to find spare buses and drivers by creating a query..
The problem for me is that how can I restrict a driver from a bus once allocated to another driver?? I can't set a unique because one driver can use the bus twice in two different schools... please help me.!!
Last edited by alipezu; 12-21-15 at 05:52.
12-21-15, 07:31 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
you cannot neccesarily enforce every constraint using table design, sometimes you have to do some of the groundwork yourself.
you can implement stored procedures using triggers.
what you could do is when trying to allocate a driver to a bus is only show unalloctaed busses. bear in mind that you can run queries, using JOINS which can rerturn rows which are matched, unmatched and so on.I'd rather be riding on the Tiger 800 or the Norton