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

  Discussion of heather sweeney designs operational database

Based on the discussion of the Heather Sweeney Designs operational database (HSD) and dimensional database (HSD-DW) in the text, answer the following questions. Using the SQL statements shown in Figure 1, create the HSD-DW data-base in a DBMS

  How to select the primary key from the candidate keys

A motor vehicle maintenance center wants to improve its services by using database management systems and data mining what tables are needed in such a database and how can it help improve their services

  Backup strategy that your organization has for data systems

Research the type of backup strategy that your organization has for their data systems. Summarize your findings. Do you agree with the strategy that your organization is using. Why or why not

  Draw dependency diagram to show the functional dependencies

Draw a dependency diagram to show the functional dependencies that exist in this relation - Decompose the Home Library relation into a set of 3NF relations and draw a dependency diagram for each of the 3NF relations.

  Practice of optimizing table structures

Database normalization can principally be cleared as the practice of optimizing table structures. Optimization is adapted as a result of a thorough investigation of the numerous parts of data that will be stored within the database.

  Write audit commands and at least one audit trigger

Database Security (COMP 0336A) - Conduct database audits and Develop backup and recovery procedures - Manage the user access on the different objects by giving proper privileges to the users. Give justifications on why you have granted the privileg..

  Create set of relational tables that are normalized to bcnf

Using the information given above, create a set of relational tables that are normalized to BCNF.

  Draw the entity relationship model

Draw the Entity Relationship model - draw the relational schema to show the relationship between DIRECTOR and PLAY.

  Discuss the steps you used to complete your lab

DBM405A- Discuss the steps you used to complete your lab. Were you successful? What did you learn? What were the results? Explain what you did to accomplish each step.

  Find the year when maximum number of faculty

Find the year when maximum number of faculty were hired - List the number of courses (not offerings) taught in 2006 by faculty rank and department excluding the ones with zero courses taught.

  Create a database of all seats and flights

Create a database of all seats and flights and keep track of sold/unsold of all 4 categories of seats - Show cost of chosen seat/flight combo options

  Draw an entity relationship diagram (erd)

Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees.  Each employee is identified by an Employee_Id.  The company wants to store Employee_Name, Employee_Address, and Employee_BirthDate in the dat..

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