> How are you? I have a question about our first take-home exam. In exercise > 5.17, we are required to find the optimal fragment alocation solution. But, > in the text book, we can only find the formulas calculating the cost, and > the optimization method is not mentioned. So, could you please give us some > guidence on this topic at our Wed. class? ANSWER: For this question, all what you have to do is to find a "reasonable" fragmentation for ASG and EMP. No need of an explicit complicated algorithm. > In regard to question 5.6, we have the following questions. > > 1) Does performing steps until the CA matrix is calculated > sufficiently answer the exercise 5.6? > > 2) Do we need to perform vertical splitting using the following formula: > > split quality = CTQ * CBQ - COQ^2 > > > If so, then can we perform vertical split when split quality is > negative but still better than other values along the diagonal. > Or does the split quality have to be positive for performing the > fragmentation. > > In 5.6 the first trace along the diagonal (binary paritition) > yeilds all negative split quality values. Performing further > computation manually is quite exhausting. Kindly, advise. ANSWER: 1) Yes. 2) The only thing that matters is that you must maximize CTQ * CBQ - COQ^2, regardless of whether this quantity is positive or negative. I don't know if the values of that quantity are all negative along the diagonal. :-)) > I have a question about 5.8. Considering the following query, > > CREATE VIEW EMPVIEW (ENO, ENAME, PNO, RESP) > AS SELECT EMP.ENO, EMP.ENAME, ASG. PNO, ASG. RESP > FROM EMP, ASG > WHERE EMP.ENO = ASG.ENO > AND DUR = 24 > > there are 6 attribute used > > EMP.ENO | EMP.ENAME | ASG.ENO | ASG.PNO | ASG.RESP | ASG.DUR > and EMP.TITLE is not used from q1 and q2. EMP.ENO and ASG.ENO are actually > the same. > > My question is in our use matrix and AA matrix, should we conside the used > attributes, namely EMP.ENO | EMP.ENAME | ASG.ENO | ASG.PNO | ASG.RESP | > ASG.DUR, or should I include attribute from originally table including title > ( ENO, ENAME, TITLE, PNO, RESP, DUR). Note in the latter case, only one ENO > is included. ANSWER: You should include attributes from the original tables (including the two occurrences of ENO). > 1) Exercise 5.8: > > This question asks to obtain the usage matrix and affinity matrix for > both relations EMP and ASG. > Since ENO exists in both relations, should we have one or two > rows/columns for ENO in the matrix ? > > Since the question does provide the key attribute, should we assume ENO > as key attribute of EMP to perform fragmentation ? > > 2) Exercise 5.17: > > I'm not sure how to approach this question. Why do we need to have the > affinity matrix created in exercise 5.8 to consider fragmentation ? > How does this affinity matrix to help us to determine the fragmentation ? > > In terms of optimal replication and placement of the fragments, do we > need to compare the query processing costs for different possible > fragmentation ? > > does the fragmentation itself provide the optimal replication and > placement of the fragments ? ANSWER: 1) Ex. 5.8: You should have only one column called ENO. Assume ENO is the key. In fact, it is the continuation of the running example we have had throughout the lectures so far. Unless otherwise stated, all assumptions made at the beginning for this running example still hold. 2) Ex. 5.17: You need the affinity matrix from Ex. 5.8 to generate a CA matrix that you should use to see whether it makes sense to vertically fragment ASG. For the query processing costs, make a reasonable assumption depending on this particular setting. For example, you may assume that costs of local query processing are the same on all sites. The fragmentation just gives you the fragments. You still have to place them. So the fragmentation per se does not provide you with an optimal replication and placement.