Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Assignment

In this assignment, you will delve deeply into Structured Query Language (SQL) statements. You will review existing SQL statements and troubleshoot them. You would need to determine why the given statements are not functioning properly. At the conclusion of this assignment, you should be able to examine and troubleshoot basic SQL statements.

Scenario:

A good friend of yours is starting a fantasy football league and has created a small database to track the team owners, teams, players, and games. Your friend knows that you are taking a database fundamentals class and has asked you to help. Your friend is not able to figure out why the database is not getting modified in any way. Your friend has given you a copy of the following:

• A database schema diagram. Access the database schema diagram.

• A Microsoft Access database. Access the Microsoft Access database.

• The following list of what he or she is trying to do:

1. Add a new owner named Alice Wonderland with an owner ID of 1205 and a contact e-mail of awonderland@domain.com

INSERT INTO Owner

VALUES (1205, 'Wonderland', 'Alice', 'awonderland@domain.com')

2. Update player 323's salary to $1,800,000

UPDATE Player
salary = 1800000
WHERE player_id = 323

3. Display all players whose salary is greater than $1,000,000

SELECT FROM Player
WHERE salary > 1000000

4. Delete owner Jerry Jones from the database

DELETE FROM Owner
last_name = "Jones" AND first_name = "Jerry"

5. Update game 0105 with the final score

UPDATE Game
SET home_score = 17,
visitors_score = 23

Note: For this assignment, you will use Microsoft Access 2010 to open the database file provided. If you do not have Microsoft Access 2010, you may download a free trial version of Microsoft Office 2010, which includes Microsoft Access 2010, from the Microsoft website.

Tasks:

1. Open the Microsoft Access file "Football.accdb" by double-clicking on it. You will see the small database created for the fantasy football league.

2. Familiarize yourself with the database by opening and examining the data in each table.

3. There are two queries included with the database that will display some of the information contained in the tables. Double-click each of these to see the results of the query.

Once you are familiar with the database, proceed to the next section.

1. Examine and Correct the Faulty SQL Statements

1. For each SQL statement listed above, identify the SQL statement errors.

2. Once you have identified the errors, rewrite the SQL statements so that they will work.

Note: Take special precautions with Statement 5 above. If you run the statement as it is written above, you will overwrite the scores of all of the existing games in the database.

I. Execute the Statements

1. On the Create tab, in the Queries group, click Query Design.

2. When prompted to add tables, click the Close button.

3. On the Query Tools Design tab, in the Results group, click on the down arrow below the word View and select SQL View. This is where you will compose your SQL statements. Feel free to type the statements above into the SQL View window and run them (see Step 4) to view the errors. (Note: Take special precautions with Statement 5 above. If you run the statement as it is written above, you will overwrite the scores of all of the existing games in the database.)

4. To run your SQL statements against the database, click the Runbutton in the Results group. You will be prompted to confirm that you want to modify data in your database. Click Yes. Close the query and save it as "Statement n", where n is the statement number listed above. For example, you will save the first statement as "Statement 1".

5. Repeat this process for each SQL statement provided above.

6. Once you have completed correcting the SQL statements, save and exit the database.

II. Explain the SQL Statement Errors

1. Create a Microsoft Word document explaining what was wrong with each of the five originally written SQL statements. Include any additional comments that you might have about the statements.

Attachment:- Database-Schema-Diagram.pdf

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92474965
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in DBMS

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

The case study company received a detailed report from the

The case study company received a detailed report from the ECM consultant with a detailed list of data requirements, tools, and processes that are currently used to manage this data. The chief executive officer (CEO) and ...

Systems analysis project scenic routes operates a bus

Systems analysis project Scenic Routes operates a bus company that specializes in travelling on secondary roads, rather than Interstate highways. Their slogan is: "It Takes a Little Longer, But It's Scenic." The firm nee ...

Query 1 the bookstore has decided to keep track of the

Query 1: The bookstore has decided to keep track of the vendors' information. In order to do this, one new table will be added to the database. The schema for this table, as related to the existing tables, is the followi ...

A taking an unnormalised list describe how you would

(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the process of developing a RDBMS for a natio ...

In sql developer onlydeliverables include sql scripts and

In SQL Developer ONLY! Deliverables Include SQL scripts and screenshot of the results: D1. Create the following three user-defined roles that are shown in the table below and assign them the specified permissions for the ...

Database and information retrieval assignment - data

Database and Information Retrieval Assignment - Data Privacy Essay Task - Write an essay (aim for 750 words) that addresses issues associated with data proivacy. Use the Australian Privacy Principles - discussed in class ...

Tableau is business intelligence software that helps people

Tableau is business intelligence software that helps people see and understand their data. Fast Analytics Connect and visualize your data in minutes. Tableau is 10 to 100x faster than existing solutions. Ease of Use Anyo ...

This assignment is a continuation of this solution the case

This assignment is a continuation of this solution The case study company has received the first report from its enterprise content management (ECM) consultant and now has a documented list of major content requirements ...

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As