Part ause the prime minister database primeminister2013sql

Assignment Help Database Management System
Reference no: EM13379897

Part A

Use the Prime Minister database (Prime_Minister_2013.sql) available from the Interact site. Answer the following queries using that database.

You are required to submit:

1. The appropriate SQL statements, which should be copied from your SQL code in MySQL, and pasted into your submission file; and

2. Screenshots of the resultant tables which are to be pasted into your assignment file immediately after the SQL code. Typing or manually drawing the results is NOT acceptable.

Write SQL SELECT statements to retrieve the following information from the Prime Minister database.

1. List the name, year commenced service as Prime Minister, party, state represented and the name of the Deputy Prime Minister for each Prime Minister that served for less than 3 years. Order by the year they commenced service as Prime Minister in descending order

2. List the name, party, recreation(s), name of their spouse and number of children of each Prime Minister of a Labor government who had four or more children and enjoyed outdoor sports.

3. List the name, the year that they commenced service as Prime Minister, the party they led and the year in which they left office of each Prime Minister of a Labor government. Order by the year they commenced service and the Prime Minister's name.

4. Did any Deputy Prime Minister(s) subsequently become Prime Minister? List the Deputy Prime Ministers name, the year that he/she commenced as Deputy Prime Minister, the year he/she commenced as Prime Minister and the party that they led. Order the list by name, year commencing as Prime Minister and Party in descending order.

Part B

The following questions are based on the Book Seller ERD as shown below. 

2187_Write and execute SQL definition commands.png

Tasks:

1. Write the SQL DDL to create the database that contains each of the relations shown in the above ERD. You will need to provide:

a. Your DDL code for each table that you create;

b. A screenshot showing each table that is created.

Notes:

- Use appropriate data types for each of the attributes;
- Use correct integrity constraints for each of the tables you create;
- You are to use the primary keys identified in the ERD;
- You are to identify and implement appropriate primary keys in the associative tables;
- You may need to create additional attributes in associative tables;
- Your SQL DDL code needs to be in the correct format for your RDBMS.

2. Before any row can be entered into the BOOKS table, the Author_ID must already exist in the AUTHOR table, why?

3. Write and execute SQL definition commands for each of the following queries:

a. Add the attributes Email, Comments and Send Newsletter to the CUSTOMERS table. Give those attributes an appropriate size and data type.

b. Change the attribute BOOK_CATEGORY_DESCRIPTION from 15 characters to 50 characters. 

4. Write and execute SQL commands for the following:

a. Add the following customers  to the Customer table.

12345, Jones, George, 123 Bentinck St, Bathurst, NSW, 2795, 0213455678
23456, Jones, Pauline, 48 Summer St, Orange, NSW, 2800, 0223456789
34567, Wilson, Paul, 23 Long St Blayney, NSW, 2799, 0298765432

b. Write a command that will remove the Jones that lives in Orange from the Customer table.

You are required to submit:

1. The appropriate SQL commands, which should be copied from your source code in MySQL, and pasted into your submission file; and

2. The resultant tables, which must be screenshots to show the change due to the execution of commands.

Typing or manually drawing the results are NOT acceptable.

Rationale

This assignment has been designed to test students in the use of the 4th Generation language SQL.

Reference no: EM13379897

Questions Cloud

Security primitivesaexplain the different roles between : security primitivesaexplain the different roles between hashing and message authentication codes mac. can a good hash
Security infrastructure and protocolsapki and pgp are two : security infrastructure and protocolsapki and pgp are two methods for generating and managing public keys for use in
You are required to conduct research and participate in : you are required to conduct research and participate in onlineforum discussions on a topic from the set total of seven
In this question you will test using a backtracking : in this question you will test using a backtracking algorithm if a mouse can escape from a rectangular maze.the
Part ause the prime minister database primeminister2013sql : part ause the prime minister database primeminister2013.sql available from the interact site. answer the following
A prestigious university has recently implemented a : a prestigious university has recently implemented a consolidation strategy that will require it to centralize their
Purpose the purpose of this assignment is to assess through : purpose the purpose of this assignment is to assess through research students capacity to provide an informed consumer
Jaedan industries has the following account balances as of : jaedan industries has the following account balances as of december 31 2010 found on page 64 amp 65 of the text. the
Sorne of me internets biggest companies le cones : sorne of me internets biggest companies le. cones hilcrosoffahnobdquo yak and vedsign are working on a new single

Reviews

Write a Review

Database Management System Questions & Answers

  Find names of students who have higher gpa from table

List the students ID, name, GPA, and course Number such that all students have GPA greater than 3 . 5 and enrolled in a course in Jan 1, 2011. Find the names of all students who have GPA greater than 3.

  Explaining weak relationship and weak entity

What is meant by a weak relationship? Provide an example. What is meant by weak entity? What do you understand by relationship degree?

  Create a relational database schema

Draw the ER diagram for the database described above and create a relational database schema for this model assuming

  Compute numbers of married men-single men from table

Compute the numbers of married men, single men, married women and single women. Print these numbers on a student summary report.

  Referential integrity constraint prevent from data inserting

What actions does a referential integrity constraint prevent from occurring when data is inserted in a table that contains this constraint?

  Design premiere products databas-shows relationship

Indicate changes you require to make to design of Premiere Products database to support following situation: There is no relationship between customers and sales reps.

  Create ascreenshot of each query and output data

Create 3 rows of data for each table ensuring that the referential integrity is valid and add the 30 rows of data to the appropriate table in your database (using any appropriate method available).

  Write problems and issues associated with internet databases

Over 70% of web applications use database to store persistent data. Write some of the problems and issues associated with internet databases?

  A database security did not take priority in the enterprise

Data breaches have been reported in all industries, from education to healthcare to finance. Database security did not take priority in the enterprise IT security plans until a few years ago

  Apply and consolidate skills acquired in the requirement

Develop a domain model for the car park system. Express your model with a class diagram, showing any inheritance and compositional relationships.

  Examine the use of databases in organization

Create a 2-3 page (350 words per page) examining the use of databases in organization. Explain what database applications are utilized (Microsoft Access, DB2, Oracle, etc.).

  Make a report that identifies the most expensive bicycles

Prepare a report that identifies the five most expensive bicycles. The report should list the bicycles in descending order from most expensive to lsit expensive, the quantity on hand for each, and the mark up percentage for each.

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