karla90 Posted March 10, 2009 Share Posted March 10, 2009 implement lossless join algorithm using c#. for more detailes i attached a document. a brief description of algorithm: Algorithm 1. Create a matrix S such that - a row for each Ri in D and -a column for each Aj in R 2. Each S(i,j) = bij for all i,j 3. for i = 1 to n for j = 1 to m if Aj an element of Ri, set Sij = aj 4. Repeat for each X --->Y in F For all rows where they correspond in X If there is an a in Y set all Y's to a Else Pick some bij and set all of the Y's to that bij Until no change in S. 5. If there exists a row with all a's, then its a lossless decomposition. please help me, thank you so much. database.doc Link to comment Share on other sites More sharing options...
0 +Dick Montage Subscriber² Posted March 10, 2009 Subscriber² Share Posted March 10, 2009 Sounds like homework to me! Link to comment Share on other sites More sharing options...
0 Andre S. Veteran Posted March 10, 2009 Veteran Share Posted March 10, 2009 How are we supposed to help ? You don't mention any particular problem you have with this algorithm. Nobody (I hope) is going to just provide you with a correct implementation, that's your work. Show us what you did and what exactly you don't understand, then you may get some more useful replies. Link to comment Share on other sites More sharing options...
0 +Dick Montage Subscriber² Posted March 10, 2009 Subscriber² Share Posted March 10, 2009 Just had an private message saying they want me to send the solution. I don't do other people's homework. Moreover, I enjoy learning. So should you! Link to comment Share on other sites More sharing options...
Question
karla90
implement lossless join algorithm using c#.
for more detailes i attached a document.
a brief description of algorithm:
Algorithm
1. Create a matrix S such that
- a row for each Ri in D and
-a column for each Aj in R
2. Each S(i,j) = bij for all i,j
3. for i = 1 to n
for j = 1 to m
if Aj an element of Ri, set Sij = aj
4. Repeat for each X --->Y in F
For all rows where they correspond in
X
If there is an a in Y set all Y's to a
Else
Pick some bij and set all of the Y's to that bij
Until
no change in S.
5. If there exists a row with all a's, then its a lossless decomposition.
please help me, thank you so much.
database.doc
Link to comment
Share on other sites
3 answers to this question
Recommended Posts