Question

In: Computer Science

Question 1                                         &nbs

Question 1                                                                                                                    2 Marks

Briefly explain the referential integrity rule. Provide a suitable situation when the referential integrity constraint is violated.

Question 2                                                                                                                    2 Marks

This question refers to the Part table as used in this unit lecture slides about the customers to order homeware parts. Using SQL DCL command to write a statement to permit a user with the log in ID of JOHNSON to access the Part table and update its UnitPrice value.

Question 3                                                                                                                    2 Marks

Consider a relation named STUDENT_ ACCOMMODATION (StudentID, Buidling, AccommodationFee) as shown in the figure below. Explain why this relation is in 2NF but not in 3NF.             

StudentID

Building

AccommadtionFee

101

Alpha

$320

102

Betta

$250

103

Alpha

$320

104

Betta

$250

105

Gemma

$400

Question 4                                                                                                                    2 Marks

Explain the purpose of transaction logs and checkpoints.

Question 5                                                                                                                    2 Marks

Compare and contrast Data Warehousing against Database.

Solutions

Expert Solution

Question 1   

Briefly explain the referential integrity rule. Provide a suitable situation when the referential integrity constraint is violated.

Answer:

1.Referential Integrity is set of constraints applied to foreign key which prevents entering a row in child table (where you have foreign key) for which you don't have any corresponding row in parent table i.e. entering NULL or invalid foreign keys. Referential Integrity prevents your table from having  incorrect or incomplete relationship.

2.Referential integrity refers to the accuracy and consistency of data within a relationship.

3.In relationships, data is linked between two or more tables. This is achieved by having the foreign key (in the associated table) reference a primary key value (in the primary – or parent – table). Because of this, we need to ensure that data on both sides of the relationship remain intact. So, referential integrity requires that, whenever a foreign key value is used it must reference a valid, existing primary key in the parent table.

Examples of referential integrity constraint in the Customer/Order database of the Company:

  • Customer(CustID, CustName)
  • Order(OrderID, CustID, OrderDate)

To ensure that there are no orphan records, we need to enforce referential integrity. An orphan record is one whose foreign key Foreign Key value is not found in the corresponding entity – the entity where the Primary Key is located. Recall that a typical join is between a Primary Key and Foreign Key.

The referential integrity constraint states that the customer ID (CustID) in the Order table must match a valid CustID in the Customer table. Most relational databases have declarative referential integrity. In other words, when the tables are created the referential integrity constraints are set up.

Question 3   

Consider a relation named STUDENT_ ACCOMMODATION (StudentID, Buidling, AccommodationFee) as shown in the figure below. Explain why this relation is in 2NF but not in 3NF.   

Answer : -

the following relation is in 2NF but not in 3NF.

STUDENT_ ACCOMMODATION (StudentID, Buidling, AccommodationFee)

- because the nonkey attribute AccommodationFee is transitively dependent on the key, StudentID

Question 4                                                                                                                    2 Marks

Explain the purpose of transaction logs and checkpoints.

Answer : -

1.The transaction log supports the following operations:

  • Individual transaction recovery.
  • Recovery of all incomplete transactions when SQL Server is started.
  • Supporting transactional replication.
  • Rolling a restored database, file, filegroup, or page forward to the point of failure.
  • Supporting high availability and disaster recovery solutions: Always On availability groups, database mirroring, and log shipping.

2. A checkpoint writes the current in-memory modified pages (known as dirty pages) and transaction log information from memory to disk and, also records the information in the transaction log.

Question 5                                                                                                                    2 Marks

Compare and contrast Data Warehousing against Database.

DATABASE DATA WAREHOUSE
Definition Database, also called electronic database, any collection of data, or information, that is specially organized for rapid search and retrieval by a computer.Databases are structured to facilitate the storage, retrieval, modification, and deletion of data in conjunction with various data-processing operations. Data warehousing is the electronic storage of a large amount of information by a business or organization. A data warehouse is designed to run query and analysis on historical data derived from transactional sources for business intelligence and data mining purposes.
Design Design of operational database is different from data warehouse design. It mainly observes data accuracy when updating real-time data. The design of data-warehouse ensures vast range of data which is used over-time for analysis purpose.
Focus The focus of database is mainly on transactions with the help of queries. It has ability of data analysis which is collected from different sources and generate reports.
Type of Information The databases provide information such online availability of seats. The information obtained from datawarehouse are used for to check the performance of business.
Types there are many types of databases. The examples are OLTP, CSV, text files, excel spreadsheets and XML files etc. It is an OLAP type of database which exist on the top layer of other database and perform analysis.

Related Solutions

Question 1                                         &nbs
Question 1                                                                                                                    2 Marks Briefly explain the referential integrity rule. Provide a suitable situation when the referential integrity constraint is violated. Question 2                                                                                                                    2 Marks This question refers to the Part table as used in this unit lecture slides about the customers to order homeware parts. Using SQL DCL command to write a statement to permit a user with the log in ID of JOHNSON to access the Part table and update its UnitPrice value. Question 3                                                                                                                    2...
Question 1                                         &nbs
Question 1                                                                                      On October 1, 2010, Madison Ltd. acquired all the shares of Dobson Ltd. for $849,600. On that date, Dobson’s statement of financial position showed share capital of $540,000 and retained earnings of $273,600. In addition, at the acquisition date, all of Dobson’s identifiable assets and liabilities had carrying values that equaled their fair values. Madison and Dobson’s financial statements for September 30, 2014 are presented below: Statement of Financial Position As of September 30, 2014                                                                                                 Madison...
QUESTION 1                                         &nbs
QUESTION 1                                                                                                                                From the following information of two sole trader enterprises conducting similar businesses, prepare: Ratio calculations in the table below for comparison of profitability, asset efficiency, liquidity and capital structure. Vertical analysis of the Balance Sheets for both enterprises. Round all calculations to 2 decimal places. Balance Sheet data (end-of-year) Hi Enterprises $ Lo Enterprises $ Current assets 24 000 32 000 Motor vehicles (net) 19 000 27 000 Total assets 43 000 59 000 Current liabilities 14...
Question 1                                         &nbs
Question 1                                                                                                         25 Marks Study the following comparative profit and loss and financial position statements for Phoenix Energy for the years 2013 and 2014. The current market price for Phoenix Energy is OMR 0.420 Instructions: Based on the information provided, Examine the following ratios for the years 2015 and 2016.                      20 marks Earnings per share.           Inventory turnover. Total assets turnover.        Times interest earned.          Operating profit margin. Critically evaluate the profitability and the efficiency of the company over the two-year period....
Question 1                                         &nbs
Question 1                                                                                   (Total: 25 marks)                                                 Sijanggut runs a news agency and general store, selling goods mainly for cash, although she has a few account customers for newspapers and magazines who pay monthly. His income statement for the year ending 31 August 2019 is as follows: SIJANGGUT INCOME STATEMENT FOR THE YEAR ENDED 31 AUGUST 2019 RM RM Revenue 87,355 Cost of sales Opening inventory 3,567 Purchases 71,714 75,281 (-) Closing inventory (3,886) (71,395) Gross profit 15,960 Expenses (20,466)...
Question 1                                         &nbs
Question 1                                                                                    List the details of cars that are Toyota sedan. The details include registration number, make and model, the number of seats, manufactured year, category ID, and category name. RegoNo MakeAndModel NumOfSeats ManufacturedYear CategoryID CategoryName ABC455 Toyota Camry 5 1 sedan NAK455 Toyota Corolla 4 2017 1 sedan Question 2                                                                                   Which cars have never been rented out? List the details that include the car’s registration number, make and model, number of seats, manufactured year, category as well...
Question No. 1:                                    (LO1)     &nbs
Question No. 1:                                    (LO1)                                                            Explain the “due process” procedures followed by the FASB in developing a financial reporting standard.                                                                                                                      What is meant by “economic Consequences” in accounting standard-setting?                                                                                                                         Explain in your own words the importance of Financial Accounting and Financial Reporting.                                                                  
Question 5                                         &nbs
Question 5                                                                                                                                          Julian and Jenna carry on a partnership business and for the income year ended 30 June, the partnership net income was $38,000, as returned by their accountant. However, included in the deductions was a salary of $12,000 paid to Julian’s wife (who is not a business partner). The Commissioner disallows all but $2,000 of this amount. Required: What authority, if any, does the Commissioner have in disallowing the claim for salary? (2.5 marks) ANSWER: What course of...
Question 3                                         &nbs
Question 3                                                                                     Prints Galore Ltd., a Canadian company, acquired 100% of Sculptures Ltd. for FC 300,000 on January 1, 2014. Prints Galore’s functional currency is the Canadian dollar and Sculpture’s functional currency is the FC. Selected exchange rates are presented below:                              January 1, 2014                       FC1 = $1.6993 CAD                              December 31, 2015                  FC1 = $1.7182 CAD                              December 31, 2016                  FC1 = $1.7233 CAD Assume that the average rate for 2014, 2015, and 2016 is FC 1...
Question 2                                         &nbs
Question 2                                                                                                                  15 Marks The Anderson Group provides counselling services at different suburbs in NSW. It charges clients for (a) direct professional time (at an hourly rate) and (b) support services (at 30% of the direct professional costs billed). The three counsellors in The Anderson Group and their rates per counselling hour are as follows: Counsellor Billing Rate per Hour Rob Mason $320 Meghana Shreshtha 110 Daniel Jacob 50 The Anderson Group has just prepared the May 2019 bills...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT