Write and run SQL statements

Assignment Help Database Management System
Reference no: EM131832950

Assignment - Query and update databases using SQL

This assignment requires you to use SQLite to complete the tasks.

Write and run SQL statements to complete the following tasks

Part A - DML

Locate the record in the vendor table that does not have a value for the attribute V_STATE.

Find the customers whose balance is greater than $300 but less than $400.

Show the names of the customers for whom we have invoices.

What is the max balance?

Show the CUS_CODE of the customers for whom we DO NOT have invoices.

Show the names of the customers for whom we DO NOT have invoices.

Find out how many times a customer generated an invoice - make sure the counted column heading reads "Invoices_generated".

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".

Part B - DDL

Add a new row/record to the `customer` table to include your actual student_ID in the CUS_CODE, your last_name as the

CUS_LNAME` and your firstname as CUS_FNAME. Add any other details of your choice in all the other fields.

Add a new attribute (field) credit_history VARCHAR(6) to the customer table.

Update credit_history for customer '10011' to 'Bad'.

Delete the employee Leighla Genkazi from the EMP table.

Add a new attribute called ‘email_address' to ‘emp' table with data type and length ‘VARCHAR(20).

You are required to submit:

The SQL statements for each query, which should be copied from your SQLite3 Command Line and pasted into your submission file.Ifyoutype .echoon at the SQLite3 Command Line, SQLite will output yourSQL statement with the results of the query making it easy to copy and paste both.

The screenshots of the results of the SQL statements which are to be copied from your SQLite3 Command Line and pasted into your submission file immediately after you execute the SQL query.If you used an output file please submit only the output file.

Rationale -

This assessment aligns with the following subject outcomes: be able to critically analyse and modify an existing database design to meet new business requirements;

Attachment:- Assignment Files.rar

Reference no: EM131832950

Questions Cloud

What is the probability that the box chosen : Each of 3 boxes, identical in appearance, has 2 drawers. Box A contains a gold coin in each drawer; box B contains a silver coin in each drawer
Draw the appropriate shift in the supply curve : Suppose Congress abolishes this law: Draw the appropriate shift in the supply curve and label it "a."
Show that the probability that a will be executed : Show that the probability that A will be executed is still·!, even if the jailer were to answer his question, assuming that, in the event that A is to be execut
When inflation fell quickly and unemployment rose quickly : Which shock best explains the 1981-1982 recession, when inflation fell quickly and unemployment rose quickly?
Write and run SQL statements : Write and run SQL statements to complete the following tasks - Show the names of the customers for whom we have invoices
What is the probability that the male is doubly dominant : What is the probability that the male is doubly dominant?
Discuss the good news about the economy : If the Federal Reserve wants to keep aggregate demand (i.e., spending growth) stable, what will it do to the growth rate of the money supply when a lot of good.
Which investment is typically the riskiest : Which investment is typically the riskiest?Which one usually lets you "withdraw" part of your investment at any time, for any reason?
Consider a sample of size drawn in the manner : Consider a sample of size 3 drawn in the following manner. One starts with an urn containing 5 white and 7 red balls.

Reviews

len1832950

1/25/2018 6:59:26 AM

Formatting & Referencing: APA. NOTES - This assignmentrequires you to use SQLite to complete the tasks listed below.Student can also use SQL Workbench or another software (if they are familiar) to complete the tasks. Typing the SQL statements or the results is NOT acceptable.

len1832950

1/25/2018 6:59:20 AM

Instructions for using SQLite: From Resources under Main Menu in Interact 2 go to Assignment 5 Folder, Copy sqlite3.exe and cmd.exe files from the Assignment 5 Folder into a folder in your machine\, Copy a5.txt from the Assignment 5 Folder into the folder in your machine where your SQLite file is located, From the SQLite Command Prompt execute the a5.txt script. To do this, 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 .headers on, At the SQLite Command Line type .mode column.

len1832950

1/25/2018 6:59:15 AM

The marking criteria for this assignment is: SQL syntax returns all attributes that meet the business requirement from the tables that hold the data and applies the correct restrictions to retrieve the required information. Requirements - Either submit your assignment as a PDF or a Word document. Don't use any other file formats. Please include your student ID, name and subject code in your submission.

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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