We're Open
+44 7340 9595 39
+44 20 3239 6980

QUERY AND UPDATE DATABASES USING SQL

  100% Pass and No Plagiarism Guaranteed

QUERY AND UPDATE DATABASES USING SQL

Task

 

NOTES

 

  • In this assignment you have a choice to use either MySQL or SQLite.
  • If you are using SQLite, follow the instructions listed below:
  • For guidance on how to install SQLite, watch this short YouTube video: https://www.youtube.com/watch?v=YZQuQ6jael8
  • For guidance on how to create tables using SQLite, watch this short YouTube video: https://www.youtube.com/watch?v=Ev2JnjavvmE
  • If you are using MySQL: The instructions for using MySQL will be placed in the Students Resources Folder.
  • To use other packages, please seek the approval of your subject coordinator.
  • Typing the SQL statements or the results is NOT acceptable.

 

If you are using SQLite, please note the guidelines given below:

 

·         Copy sqlite3.exe and cmd.exe files from the Students Resources Folder into a folder in your machine

·         Copy a5.txt from the Students Resources Folder into the folder in your machine where your SQLite file is located

·         Open a5.txt in Notepad

·         Replace yourstudentid in line .output yourstudentid.txt in a5.txt with your actual studentid i.e. for example 45446667.txt

·         From the Command Prompt type sqlite3.exe yourstudentid.db

·         Note: From the Command Prompt call the folder in your machine where your SQLite file is located before you type sqlite3.exe yourstudentid.db

·         At the SQLite Command Line type .read a5.txt [to create the tables you will use to answer this assignment’s questions]

·         At the SQLite Command Line type .quit

·         Using WordPad open yourstudentid.txt [to check the tables you created exist]

·         From the Command Prompt type sqlite3

·         At the SQLite Command Line type .open yourstudentid.db

·         At the SQLite Command Line type .headers on

·         At the SQLite Command Line type .mode column

 

Instructions for using MySQL Workbench

 

From Resources under Main Menu in Interact 2 go to Students Resources Folder

 

Download ‘assignment5’ to your student folder.

 

If you are using MySQL, you need to import the database file called ‘assignment5’ before you can commence your work on this assignment – after importing you should see ‘assignment5’ showing in the left hand side list on MySQL Workbench. You are now able to start your assignment5 tasks as listed below:

 

Assignment 5 tasks: each query is worth 5 marks

 

Write and run SQL statements to complete the following:

 

Part A - DML

 

  1. List the record/s in the vendor table that do not have a value for the attribute V_STATE.
  2. Find the customers whose balance is greater than $250 but less than $400.
  3. Create a query based on invoice table to show a 15% increase on tax.
  4. Show the names of the customers for whom we have generated any invoices.
  5. Show the CUS_CODE of the customers for whom we DID NOT generate invoices.
  6. Show the names of the customers for whom we DID NOT generate invoices.
  7. Find out how many times a customer generated an invoice – make sure the counted column heading reads “Invoices_generated”.
  8. List the names of the customers and how many times a customer generated an invoice – make sure the counted column heading reads “N_Of_Invoices” .
  9. Find the customers whose last name is either Dunne, Orlando or Brown and live in area 615, sort in alphabetical order by the CUS_LNAME.

 

Part B – DDL

 

  1. Add a new attribute called ‘email_address’ to ‘emp’ table with data type and length ‘VARCHAR-20’.
  2. Add a new row/record to the `customer` table to include your actual student ID in the CUS_CODE, your lastname as the CUS_LNAME` and your firstname as CUS_FNAME. Add any other details of your choice in all the other fields.
  3. Delete all the vendors in the FL state.

 

You are required to submit:

 

  1. The SQL statements for each query, which should be copied from your SQLite3 Command Line and pasted into your submission file
  2. The screenshots of the results of the SQL statements which are to be copied from your MySQL Workbench screen or SQLite3 Command Line and pasted into your submission file immediately after you execute the SQL query.

 

Rationale

 

This assignment will assess your knowledge and ability to use SQL to query database tables and update them. It will also test your ability to write both simple and complex queries and run those queries to return the requested data.

 

Marking Criteria

 

Task

HD

DI

CR

PS

Write and run SQL statements to complete tasks 1-12 above

The SQL statements retrieve or update the required information for all assignment tasks using concise, correct and free of errors SQL syntax that

The SQL statements retrieve or update the required information for most of the assignment tasks using correct and free of errors SQL syntax

The SQL statements retrieve or update the required information for some of the assignment tasks using mostly correct SQL syntax

The SQL statements retrieve or update the required information for only a few of the assignment tasks using SQL syntax that contains frequent errors

 


100% Plagiarism Free & Custom Written,
Tailored to your instructions


International House, 12 Constance Street, London, United Kingdom,
E16 2DQ

UK Registered Company # 11483120


100% Pass Guarantee

STILL NOT CONVINCED?

View our samples written by our professional writers to let you comprehend how your work is going to look like. We have categorised this into 3 categories with a few different subject domains

View Our Samples

We offer a £ 2999

If your assignment is plagiarised, we will give you £ 2999 in compensation

Recent Updates

Details

  • Title: QUERY AND UPDATE DATABASES USING SQL
  • Price: £ 109
  • Post Date: 2018-11-09T07:43:11+00:00
  • Category: Assignment
  • No Plagiarism Guarantee
  • 100% Custom Written

Customer Reviews

QUERY AND UPDATE DATABASES USING SQL QUERY AND UPDATE DATABASES USING SQL
Reviews: 5

A masterpiece of assignment by , written on 2020-03-12

Writing is not my field. I take help from this website for my accounting assignment. The work is good and I scored good grades in it. Thank you from the bottom of my heart.
Reviews: 5

A masterpiece of assignment by , written on 2020-03-12

CIPD assignment is not my cup of tea. That’s the reason I sought out this place suggested by my friend. I would say that the writers of this site are really admiring. I was assigned the best CIPD writer that solved all my issues. He explained to me the difficult topics so well that now I am able to talk on those topics eloquently. I owe my writer a huge thanks and praise! And yes, I would recommend other students as well to come to instaresearch.co.uk for the top CIPD assignment help.