Let the following database schema be given. Person(idnumber, name, dob, mother, father) primary key idnumber foreign...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Let the following database schema be given. Person(idnumber, name, dob, mother, father) primary key idnumber foreign key father references Person(idnumber) foreign key mother references Person(idnumber) Consider the following query: For the person with idnumber 42 produce a list of all their ancestors. Note that ancestors include grandparents, great-grandparents and so on. (a) Outline how you would solve this task programmatically, ad- dressing which particular SQL shortcoming you have to over- come. [5 marks] (b) What other kind of database might be more appropriate for the query and why? above [2 marks] Let the following database schema be given. Person(idnumber, name, dob, mother, father) primary key idnumber foreign key father references Person(idnumber) foreign key mother references Person(idnumber) Consider the following query: For the person with idnumber 42 produce a list of all their ancestors. Note that ancestors include grandparents, great-grandparents and so on. (a) Outline how you would solve this task programmatically, ad- dressing which particular SQL shortcoming you have to over- come. [5 marks] (b) What other kind of database might be more appropriate for the query and why? above [2 marks]
Expert Answer:
Answer rating: 100% (QA)
Here is an outline on how to solve the problem programmatically 1 Recursive approach This approach involves writing a recursive function that starts w... View the full answer
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Posted Date:
Students also viewed these programming questions
-
For r problems a to b, let T: R2 R2 be defined by Where a. Determine the image under the map of the square having vertices (0, 0), (1, 0), (l , 1) , and (0, 1) . Calculate and compare the areas of...
-
For each of the five independent situations below, prepare a single journal entry that summarizes the recording and payment of income taxes in order to determine the amount of cash paid for income...
-
Increasingly sophisticated communications technology is allowing more people to work at home. What effect do you think this might have on land-use patterns, specifically the density of residential...
-
1. If the court rules that the union has no duty to represent these former employees, they cannot pursue their grievance against the company. Discuss why this result is fair or unfair to all three...
-
High-low method and regression analysis. Happy Business College has recently opened a restaurant as part of its hospitality major. For the first 10 weeks the manager did not estimate any costs, but...
-
In an article, Scott Wolla of the Federal Reserve Bank of St. Louis writes that potential GDP doesnt mean that the the entire working-age population is working 18 hours per day or that factories are...
-
A major car manufacturer developed the following information as part of its target costing efforts: Required(a) Prepare an exhibit similar to Exhibit 8-9 showing percentage contributions of each...
-
Duncan's Diamond Bit Drilling Corporation (Duncan) purchased the following assets in 2023. Assume its taxable income was $60,000 for purposes of computing the 179 expense deduction. Asset Purchase...
-
Serum containing Na + gave a signal of 6.00 m V in an atomic emission analysis. Then4.00 mL of 2.00 MN a Cl were added to96.0 mL of serum. This spiked serum gave a signal of 9.00mV. Find the original...
-
A putty ball of inertia \(m\) moving at speed \(v_{\mathrm{i}}\) slides on a slick horizontal surface along a path that is perpendicular to the long axis of a rod of length \(\ell\) and inertia \(2...
-
Calculate the rotational inertia of a hoop of inertia \(m\) and radius \(R\) about an axis perpendicular to the plane of the hoop and passing through its center.
-
Your physics instructor has you sit on a chair that is free to rotate and hands you a spinning bicycle wheel (Figure P12.44). What happens when you flip the wheel over so that the end of the axle...
-
Choose a company that you admire. Use the sources suggested in the Strategy in Practice feature about stakeholder relationships and analyze its performance with 2 to 3 of its stakeholder groups. What...
-
A \(0.20-\mathrm{kg}\) turntable of radius \(0.20 \mathrm{~m}\) spins about a vertical axis through its center. A constant rotational acceleration causes the turntable to accelerate from 0 to 28...
-
Suppose investment bank one decides to underwrite a million 6 year 5% semi annual bond issue for clothing company on a firm commitment basis. investment bank 1 pays clothing company 1 million today...
-
You are standing on the top of a building and throw a ball vertically upward. After 2 seconds, the ball passes you on the way down, and 2 seconds after that, it hits the ground below. a. What is the...
-
Given the schema SCHEDULE (Prof, Office, Major, {Book}, Course, Quarter) along with: F: fd1: Prof {Office, Major} and D: mvd: Prof --->> Book a. Identify the primary key of SCHEDULE such that...
-
Why can total participation of an entity type in a relationship type also be referred to as existence dependency of that entity type in that relationship type?
-
Given the set of functional dependencies F {fd1, fd2, fd3, fd4, fd5, fd6, fd7, fd8, fd9, f10, f11} where: a. Construct the universal relation schema that includes (i.e., preserves) the set of...
-
Prove that the product of two symmetric matrices is not necessarily symmetric.
-
a. Find the rank of the given matrix. b. Confirm the result of (a) in MATLAB. 3 5 ST TNT 2 A=1 7
-
BAw Perform the indicated operations, if defined, for the following vectors and matrices. -2 1 -3 1 1 A = 1 -3 2 1 32 B = V= W = 0 0 4 5
Study smarter with the SolutionInn App