Produce a set of relations

Assignment Help Database Management System
Reference no: EM131506630

This assignment may require a significant amount of work but you should treat it as an exercise in examination preparation as well as an assignment. This assignment covers much of the same ground as the exam and will provide you with a strong indicator of your level of preparedness for the exam. Most of the questions are at examination standard although the data modelling exercise is somewhat more substantial than what would be expected in an examination setting.

SECTION A (Data Modelling)

You must use the official USQ data modelling and normalization methodology. This methodology is based on Clive Finkelstein's techniques (SR 2.1 and SR 2.2 located in the assignment section on Moodle) and all the examples in the lectures, study book and the tutorials use this methodology.

If you do not use the USQ methodology, you will probably be marked down.

It is perfectly acceptable if you submit neat hand-drawn ERD's. Alternatively, you might wish to use Word. If you use a CASE or drawing tool, you must adapt the drawing to conform to the USQ methodology.

Student Tests Database.

You are designing a database for multiple choice questions in an online test module of the student information systems for a campus. The online test module stores general profile information about all the students and records student responses and test results. All information regarding the tests including all the questions and options of the multiple choice questions are recorded in the module.

A test is recorded with a name, description, start date, end date and must belong to one of two types: General Test or Academic Test. These two types of test are recorded in an entity called TEST TYPE. For Academic Test, you also need to store the Field of Research (FoR) code.

A test contains a minimum of 10 questions. Each question can be listed in multiple tests as well. For a question, we store its identifier, the question text and the category for the question. A separate list of all category names are stored in an entity called CATEGORY. A question also has a minimum of four options where one of the options must be the correct answer. All the options for each question are stored with an identifier, option text and a flag to determine whether the option is the correct answer or not.

Student numbers and email addresses are imported from a legacy application and stored in the STUDENT entity. The imported student number is the identifier of the student entity and the email address is the username for login. Other details stored for a student include name, password, account joined date and account expiry date.

Information about each response is stored with reference to the particular test, specific question, selected option and the student who attempted the question. We also store the response date and response time for audit purposes.

Finally, results of every test for each student is stored and identified with a result reference number. The score and rank of the student for the test is also recorded for reporting purposes.

Prepare the following:

a) An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

b) A list of relations (equivalent to Finkelstein entity list). Produce complete relations for all entities and attributes. Show all primary and foreign keys. Include all attributes that are specifically mentioned and all key attributes. You may need to create primary and foreign keys that are not specifically mentioned. You must use the Finkelstein methodology as per the study book and tutorials.

c) An Oracle SQL table create statement for the relation that you think is most critical in this system. This relation must have a primary key and at least one foreign key.

SECTION B (Normalisation)

a) Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation. Show your working and entitles for 1NF, 2NF and 3NF. You must use the Finkelstein methodology as used in the study book and tutorials.

LIBRARY (library name, address, opening hours, ((book id, title, category, genre, published date, book entry date, ((author name, author contact)) )), total number of books, ((member id, member name, member contact, join date)), main librarian name, main librarian office, main librarian contact)

Notes:
1. Library name uniquely identifies a library.
2. A library has several books and the number of books can be calculated by this relationship.
3. "book entry date" is the date when the book is entered into the library system.
4. Each book has one or many authors.
5. There are also many members of a library and always one main librarian.

SECTION C (SQL)
Below is a reproduction of the ERD for the JustLee books database. It should help you navigate the tables in the database. The database script to create the tables is located on the Moodle site under the assignment specifications. If you have run a version of the script earlier in the semester please run it again to ensure that you are using the correct version of the tables. The ERD diagram may not necessarily have all the fields listed so you might have to refer to the description of the table by using the DESCRIBE command in Oracle

410_Figure.jpg

The questions in this section are challenging. Most require a number of tables and/or nested queries. When solving each question it is best not to try and write the solution as a single activity. Instead try and write a separate query to solve each of the parts and once you understand the data and the results rewrite the query into a solution.

Each question below is worth 5 marks. For each question, provide the SQL queries to meet the question's specifications and the output result of running your query.

1) Display the book title, publisher name, cost and retail of the books for all books that do not have a discount value and have had no sales recorded for them. All money fields should be formatted as $999.99 and all fields should have meaningful names.

2) Display author last name, book title and category for all books where (1) the author's last name starts with a Z or contains a Q anywhere and (2) the book's title contains the word ‘ZMAY'. Order the output by author last name in ascending order.

3) Using a subquery, display the book category and the average retail price in all categories where the average retail price is less than the highest average retail price of books for all the categories. Sort the resulting set in category order ascending.

4) Display the book title, publisher name, author first and last name for all the books that have been co-authored (that is where the book has been authored by 2 or more authors). Order the resulting set by the book title.

5) Using a three table join, display the book title, category, profit and the first and last names of book authors for all the books published before 1 January 2005. Profit is a calculated field which is calculated as (retail - cost). Rename the calculated field as ‘TOTAL PROFIT'. Round the profit calculation to the nearest full value. Order the result set in the descending order of calculated profit.

6) Display category, book title and retail price for all the books where the retail price of the book is less or equal than the maximum cost of all the books and more than the average cost of all the books. Order the result set by the book category ascending and retail within the category descending order

Reference no: EM131506630

Questions Cloud

What is the fw of paul extra income : Paul works for a government agency in southern California making $70,000 per year. He is now being transferred to a branch office in Tennessee.
Leadership tactics according to the criteria : A 1-2 minute video, or other presentation on the interaction and influence among leadership tactics according to the following criteria:
Data center operating : A. What resources (utilities) do you need to keep your Data Center operating?
Compute the margin of safety ratio for current operations : Compute the margin of safety ratio for current operations and after Mary's changes are introduced (Round to nearest full percent).
Produce a set of relations : CIS2002 - Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation. Show your working and entitles for 1NF, 2NF and 3NF.
What actual interest rate must you earn : A recent college graduate has received the annual salaries shown in the following table over the past four years.
Difference between an experimental group and a control group : What is the difference between an experimental group and a control group? What is the difference between "laboratory" experiments and "real-world" experiments
Develop and share your position on an ethical issue : Develop, and share your position on an ethical issue.Should marijuana be legalized? Should terminal patients be allowed to have assisted suicides?
What concepts can you apply to better your personal finances : As you have explored this week's material, what techniques and/or concepts can you apply to better your personal finances?

Reviews

len1506630

5/25/2017 12:58:11 AM

SECTION C 1) Five marks awarded for each correct SQL statement. 2) Alternative approaches to the model answer could be accepted unless they do not follow the rules requirements set out in the specification, are poorly optimised or are poorly constructed (SQL). 3) Part marks may be awarded if an answer only has a small problem or an alternative solution is presented that works but is not ideally optimised / constructed.

len1506630

5/25/2017 12:58:05 AM

SECTION B 1) Relations – no missing relations, appropriate names, no redundant relations. 2) All primary keys present and correctly notated. 3) All foreign keys present and correctly notated. 4) All attributes present. 5) All repeating groups resolved. 6) Derived attributes indicated in brackets. 7) All 2NF and transitive dependencies resolved. 8) All relations correctly notated using USQ methodology.

len1506630

5/25/2017 12:57:58 AM

MARKING CRITERIA SECTION A 1) Entities – no missing entities, appropriate names, no redundant entities, etc. 2) Cardinalities and optionalities all shown and correct. 3) Complete list of relations, showing all applicable attributes, primary keys and foreign keys. 4) Sophistication: well-presented solution; good layout; innovative approach; correct diagrams/notation; solution easy to read and understand; solution comprehensive 5) SQL CREATE TABLE uses an appropriate relation, is syntactically correct and meets the business rules. 6) USQ methodology used throughout.

len1506630

5/25/2017 12:57:30 AM

This assignment may require a significant amount of work but you should treat it as an exercise in examination preparation as well as an assignment. This assignment covers much of the same ground as the exam and will provide you with a strong indicator of your level of preparedness for the exam. Most of the questions are at examination standard although the data modelling exercise is somewhat more substantial than what would be expected in an examination setting.

Write a Review

Database Management System Questions & Answers

  Provide the sql code you wrote for each table

Provide the SQL code you wrote for each table. Demonstrate that you have tested your code from part C1 by providing a screenshot of your results.

  Why would you choose a database system instead of simply

Why would you choose a database system instead of simply storing data in operating system files? When would it make sense not to use a database system?

  Is there a polynomial algorithm for testing whether a

Prove that, if R is in 3NF and every key is simple, then R is in BCNF.

  Create a schema that supports the company business

Create a schema that supports the company's business and processes. Explain and support the database schema with relevant arguments that support the rationale for the structure

  Explain the speed of the search operation

Describe a mechanism to access the telephone customer records by telephone #. Assume that we have a huge data in hand, say a million records or so.

  Analyze the database environment

Analyze the database environment, including its objectives (why will it be built?), its boundaries (what is in and out of scope?), its constraints (what rules must it follow?), and any challenges that will accompany its construction

  Gathering information using cross indexed

Using data mining, it is possible to gather information which has been buried that can be manipulated and cross indexed which could be a valuable information gathering technique for entities.

  What is the difference between a database and a table

What is the difference between a database and a table? What two conditions must be met before an entity can be classified as a weak entity? Give an example of a weak entity.

  Draw the entity-relationship diagram for all of the entities

Note: The counties for the state capitals shown in the figure above are Travis and Williamson counties for Austin TX; Hartford county for Hartford CT; Clinton, Eaton, and Ingham counties for Lansing, MI; Davidson county for Nashville TN; Hughes co..

  Define the database life cycle

Per the text, the Database Life Cycle includes the Database Initial Study, Database Design, Implementation and Loading, Testing and Evaluation, Operation, and Maintenance and Evolution phases.

  Illustrate the relationships between entities and attribute

After identifying the records and their corresponding fields, draw an entity-relationship (ER) diagram using the MS Excel worksheet to illustrate the relationships between entities and attributes

  How to design and create tables

Databases are powerful tools for storing, managing, manipulating, and accessing data. Most information systems in use today make use of some form of database. In this lesson you will learn about the Access user interface (UI), how to design and ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd