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.
| Author |
Topic |
|
petre
Starting Member
11 Posts |
Posted - 2010-01-04 : 12:21:38
|
| hi friend, In the link http://www.mediafire.com/i/?t2czxn2ihjghas six tables: tblMovies - collection of moviestblMovieCopies - has copies of each movie. eg.: Movie = Avatar has PK of 1000 it has three copies there in teh tblMovieCopies: CopyIndex MovieNumber CopyNumber(NOT number of copies)1 1000 02 1000 13. 1000 2tblMediaType - MediaType such DVD, VHS, Blue Ray.....tblLoanTypes - Type of loans per movie: Overnight, Weekly, FortnightlytblLendingRates - A rate for a combination of MediType and LoandType e.g: Assume Movie Avatar, it could be in MediaTypes DVD, VSH and Blue Ray, A DVD of "Avatar"(a copy) can be rented as "Overnight" for the rate of $25A DVD of "Hancock" can be rented as "Weekly" for 15there fore the combination of Mediaype and LoanType is unique.FinallytblLoans - consider this as a cart that the member adds all the renting movie to The problem that i have is the relationship between tblLoans and tbllendingRates is M:N thus makes relatioship complicated. How should i link tblLoand and tblLendingRates? thanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-04 : 14:23:43
|
tblLendingRates links the M:N relationship between tblMediaType and tblLoanTypes.Why not build a new table to link tblLoans and tbllendingRates in the same way?M:N always needs such a table. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|