Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Recursive or Redundancy

Author  Topic 

belkin_99
Starting Member

27 Posts

Posted - 2009-01-25 : 12:49:38
I have a table called UNITS which include Names and ID.
I linked UNITS with other table called SCHEDULES which include Start Time and EndTime. the type of link is 1:m
Now i need to know which unit is active based on SCHEDULES , so i created a third table called ACTIVITY which include location.
I linked UNITS with ACTIVITY via Names as 1:m.
And I linked SCHEDULES with ACTIVITY via StartTime as 1:m.
My question is:
Is this redundancy in the link, because i do not need to link with UNITS since I have link with SCHEDULES?
How I will be sure that ACTIVITY will contain all unit names that in SCHEDULES?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-25 : 12:59:33
shouldn't schedule be having fk to Activity rather than units so that it represents schedule of particular activity?
Go to Top of Page

belkin_99
Starting Member

27 Posts

Posted - 2009-01-25 : 21:05:46
THANK YOU for your reply.
Yes,
SCHEDULES has fk with UNITS throught UnitID, so I have many schedules for each UNITS. In the same time ACTIVITY has fk with SCHEDULES. So each unit has many schedules and each schedule has many activity.

In ACTIVITY do i need to link it vi fk to UNITS, or this will be impeded within SCHEDULES?

ACTIVITY should reflect to you all units, within UNITS, that active based on their SCHEDULES
I hope it is clear this time.



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-26 : 08:22:51
then its enough to connect schedule to activity as units will automatically be linked through units->schedules->activity link
Go to Top of Page

belkin_99
Starting Member

27 Posts

Posted - 2009-01-26 : 19:58:11
Thats clear to me.
Thank you.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-26 : 23:51:14
welcome
Go to Top of Page
   

- Advertisement -