Identify the tables, in your final schema, that are expected to be extremely large and are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Identify the tables, in your final schema, that are expected to be extremely large and are expected to grow over time. For each of these tables: Describe the expected record size (in bytes or kilobytes), the estimated initial table size, and estimated table size after 10 years of use. Describe a suitable storage strategy for such tables. Your answer must include the modified SQL DDL statements to define your chosen strategy. Write SQL queries for the following tasks: 1. Assume that the total number of voters column (in the Electorate table) is empty. This data is to be computed by aggregating data from Voter Registry. Write an SQL query to display the total number of voters registered in each of the electorate. Your query should produce a report consisting of the electorate name and total number of voters only. The result should be displayed in the descending order of the total number of voters. A sample result is shown below: RMIT Classification: TrustedRMIT Classification: Trusted Division MACARTHUR PATERSON MAYO ADELAIDE COWPER SPENCE STURT LONGMAN HINDMARSH BOOTHBY Electorate Adelaide Adelaide Adelaide Adelaide Adelaide Adelaide Adelaide 2. The names of candidates appear on the ballot paper in a totally randomized order, i.e. no political party or a group gets any advantage of having their candidates on the top of the list, or candidates with names starting A always appear at the top, etc. Write an SQL query to produce candidate lists for all electorates for the 2022 federal election (election event id: 20220521). The result set must be sorted by electorate, and then candidates within each electorate must be randomized. A sample result is shown below: Aston Aston Aston Aston Aston Aston Aston Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Electors on 20 C 133,501 132,123 130,767 130,151 129,887 129,243 129,151 129,110 . 128,814 128,766 . Candidate Name GRANTHAM, Amy GEORGANAS, Steve ALLWOOD, Sean MCMILLAN, Matthew GALDIES, Rebecca GERHARD, Faith ALLWOOD, Gayle SPELMAN, Rebekah Jane TUDGE, Alan COOKSON, Asher BRUCE, Ryan IBBOTSON, Craig ROCHE, Liam DOYLE, Mary BARNES, John GREEN, Ben GRAHAM, Alex SEDGMAN, Kerryn Political Party Liberal *** Australian Labor Party United Australia Party FUSION: Science, Pirate, Secular, Climate Emergency The Greens Australian Federation Party Pauline Hanson's One Nation United Australia Party Liberal The Greens TNL Pauline Hanson's One Nation Liberal Democrats Australian Labor Party The Greens Liberal Independent Australian Federation Party PRYSE-SMITH, Terri Elizabet United Australia Party TAXIS, Rosale MCGRATH, Julia KING, Catherine Pauline Hanson's One Nation 3. Registered voters who do not vote at an election receive a penalty (typically, a fine). Write an SQL query, using IN or NOT IN clause, to generate a report that lists the names and addresses of registered voters who did not vote in 2022 general election (election event id: 20220521) and also not voted in 2019 general election (election event id: 20190518). For each of the queries: Liberal Democrats Australian Labor Party Produce the SQL query, but do not include the results set. Identify what indexes would help. Identify the type of index and columns that are used to build these indexes (justify your design). Show the SQL commands for building these indexes in Oracle. Show the query execution plans both before the index is added and after adding the index. RMIT Classification: Trusted RMIT Classification: Trusted Explain how the index was utilised (or not) and why. What join algorithms were used? What changes would you need to make for the index to be properly utilised, or for a different join algorithm to be used instead? (Provide concrete details of the changes). TASK 3: Describe a suitable partition strategy for extremely large tables you identified in step 1. Include details of the partitioning type and which columns/key should be used. You must include the SQL DDL statements used to implement your partition strategy. You must justify your design decisions. Include details about which of the above queries it will improve the performance of and how it helps with concrete examples. (You must explain in clear terms-such as partition pruning, partition joins, and parallel SQL, applicable to each of these queries.) (Note: While you will be able to test that there are no syntax errors, you may not be able to actually implement them on RMIT's Oracle servers due to permission restrictions). TASK 4: Before a voter is allowed to vote, to ensure the integrity of the election system, the system should check if he/she had voted earlier on this election. Write a stored function - previouslyvoted (), to check if the voter had voted before. This function reads the election code, electorate, voter identification as inputs and returns a Boolean value (true, if voted before and false, if not voted before). TASK 5: Write a stored procedure -primaryVoteCount(), to complete the step 1 of the counting process. This stored procedure requires election code and electorate name as inputs. It will read Computerised Ballot Papers and does required processing, and update Election Results table with primary votes (first preferences) received by each candidate in chosen electorate in the chosen election. TASK 6: Write a stored procedure-distributePreferences (), to complete the step 2 of the counting process. This stored procedure requires election code and electorate name as inputs. It will read Computerised Ballot Papers and does required processing, and update Election Results table with preference votes received by each candidate at each preference distribution in chosen electorate in the chosen election. Identify the tables, in your final schema, that are expected to be extremely large and are expected to grow over time. For each of these tables: Describe the expected record size (in bytes or kilobytes), the estimated initial table size, and estimated table size after 10 years of use. Describe a suitable storage strategy for such tables. Your answer must include the modified SQL DDL statements to define your chosen strategy. Write SQL queries for the following tasks: 1. Assume that the total number of voters column (in the Electorate table) is empty. This data is to be computed by aggregating data from Voter Registry. Write an SQL query to display the total number of voters registered in each of the electorate. Your query should produce a report consisting of the electorate name and total number of voters only. The result should be displayed in the descending order of the total number of voters. A sample result is shown below: RMIT Classification: TrustedRMIT Classification: Trusted Division MACARTHUR PATERSON MAYO ADELAIDE COWPER SPENCE STURT LONGMAN HINDMARSH BOOTHBY Electorate Adelaide Adelaide Adelaide Adelaide Adelaide Adelaide Adelaide 2. The names of candidates appear on the ballot paper in a totally randomized order, i.e. no political party or a group gets any advantage of having their candidates on the top of the list, or candidates with names starting A always appear at the top, etc. Write an SQL query to produce candidate lists for all electorates for the 2022 federal election (election event id: 20220521). The result set must be sorted by electorate, and then candidates within each electorate must be randomized. A sample result is shown below: Aston Aston Aston Aston Aston Aston Aston Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Ballarat Electors on 20 C 133,501 132,123 130,767 130,151 129,887 129,243 129,151 129,110 . 128,814 128,766 . Candidate Name GRANTHAM, Amy GEORGANAS, Steve ALLWOOD, Sean MCMILLAN, Matthew GALDIES, Rebecca GERHARD, Faith ALLWOOD, Gayle SPELMAN, Rebekah Jane TUDGE, Alan COOKSON, Asher BRUCE, Ryan IBBOTSON, Craig ROCHE, Liam DOYLE, Mary BARNES, John GREEN, Ben GRAHAM, Alex SEDGMAN, Kerryn Political Party Liberal *** Australian Labor Party United Australia Party FUSION: Science, Pirate, Secular, Climate Emergency The Greens Australian Federation Party Pauline Hanson's One Nation United Australia Party Liberal The Greens TNL Pauline Hanson's One Nation Liberal Democrats Australian Labor Party The Greens Liberal Independent Australian Federation Party PRYSE-SMITH, Terri Elizabet United Australia Party TAXIS, Rosale MCGRATH, Julia KING, Catherine Pauline Hanson's One Nation 3. Registered voters who do not vote at an election receive a penalty (typically, a fine). Write an SQL query, using IN or NOT IN clause, to generate a report that lists the names and addresses of registered voters who did not vote in 2022 general election (election event id: 20220521) and also not voted in 2019 general election (election event id: 20190518). For each of the queries: Liberal Democrats Australian Labor Party Produce the SQL query, but do not include the results set. Identify what indexes would help. Identify the type of index and columns that are used to build these indexes (justify your design). Show the SQL commands for building these indexes in Oracle. Show the query execution plans both before the index is added and after adding the index. RMIT Classification: Trusted RMIT Classification: Trusted Explain how the index was utilised (or not) and why. What join algorithms were used? What changes would you need to make for the index to be properly utilised, or for a different join algorithm to be used instead? (Provide concrete details of the changes). TASK 3: Describe a suitable partition strategy for extremely large tables you identified in step 1. Include details of the partitioning type and which columns/key should be used. You must include the SQL DDL statements used to implement your partition strategy. You must justify your design decisions. Include details about which of the above queries it will improve the performance of and how it helps with concrete examples. (You must explain in clear terms-such as partition pruning, partition joins, and parallel SQL, applicable to each of these queries.) (Note: While you will be able to test that there are no syntax errors, you may not be able to actually implement them on RMIT's Oracle servers due to permission restrictions). TASK 4: Before a voter is allowed to vote, to ensure the integrity of the election system, the system should check if he/she had voted earlier on this election. Write a stored function - previouslyvoted (), to check if the voter had voted before. This function reads the election code, electorate, voter identification as inputs and returns a Boolean value (true, if voted before and false, if not voted before). TASK 5: Write a stored procedure -primaryVoteCount(), to complete the step 1 of the counting process. This stored procedure requires election code and electorate name as inputs. It will read Computerised Ballot Papers and does required processing, and update Election Results table with primary votes (first preferences) received by each candidate in chosen electorate in the chosen election. TASK 6: Write a stored procedure-distributePreferences (), to complete the step 2 of the counting process. This stored procedure requires election code and electorate name as inputs. It will read Computerised Ballot Papers and does required processing, and update Election Results table with preference votes received by each candidate at each preference distribution in chosen electorate in the chosen election.
Expert Answer:
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these databases questions
-
Next step is writing a code for the canvas mouse down event handler. 7.1. In your JS file, go to canvasMouseDown function. 7.2. Make sure your function has an input parameter for the even object....
-
To demonstrate the ability to propose, implement, and query the database. Problem: MovinOn Inc. is a moving company that provides moving and storage services in California, Nevada, and Arizona....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The current quoted price of a 13% coupon bond is $110. It pays coupon semi-annually. The next coupon will be paid in 6-days (total number of days in this semi-annual period is 181) and the futures...
-
Use the discriminant to determine the number of real solutions of the quadratic equation. 1. 9x2 + 12x + 4 = 0 2. x2 + 2x + 4 = 0 3. 2x2 5x + 5 = 0 4. 5x2 4x + 1 = 0
-
Assume that the director of a social agency was exploring different alternatives for decreasing the number of homeless people in the area. Describe how a political factor might influence his or her...
-
How are internal auditing and independent auditing related?
-
The following data are taken from the general ledger and other records of Coral Park Production Co. on January 31, the end of the first month of operations in the current fiscal year:...
-
Write and solve a question that combines dynamics and kinematics and requires multiple steps to solve. Requirements: ZF = ma 1. Your question must require the use of Newton's Second Law. 2. Your...
-
1. Which of the two basic reporting approaches for the cash flows from operating activities did Lowes use? Is this the same as what The Home Depot used? 2. What amount of cash did Lowes receive from...
-
What will be displayed when the button is clicked? Sub btnDisplay_Click() Dim a,b,c As Double a = 5 b = 2 c= 10 Compute(a,b,c) End Sub Sub Compute (ByVal a As Double, ByVal b As Double, ByVal e As...
-
Define working capital.
-
This case study shows a typical situation in which management accounting can be helpful. Read the case study now but only attempt the discussion points after you have finished studying the chapter....
-
How are variable overhead cost variances calculated.
-
Explain how the current ratio is calculated.
-
Pick a brand that you currently use. Check the brands presence on Twitter. See how far you can go in learning about the brand. For example, how many hashtags are used that pertain to the brand? If...
-
(a) Find A when -1 3 7 1+M-[38] +5A = 4 3 2 -5 1 3 6 (6 marks) (b) Find a condition on the numbers a, b and c such that the following system of linear equations is consistent. When that condition is...
-
Derive Eq. (18.33) from Eq. (18.32).
-
One of the recommendations regarding indexes is to specify a unique index for each primary key. Explain the justification for this recommendation.
-
A cellular operator needs a database to keep track of its customers, their subscription plans, and the handsets (mobile phones) that they are using. The E-R diagram in Figure 2-24 illustrates the key...
-
List five disadvantages of file processing systems.
-
Tests of controls: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are evaluations...
-
Analytical procedures: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are...
-
Substantive tests of details: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are...
Study smarter with the SolutionInn App