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

  Explain onstraint and business rule represented in database

Describe the entities and attributes represented in the database. Describe the relationships among the entities in the database. Describe the constraints and business rules represented in the database.

  Modify oracle table data using the correct sql statements

Explain how you could delete the IT department without deleting all the employees who work for that department.

  Task 1 create 3 rows of data for each table ensuring that

task 1 create 3 rows of data for each table ensuring that the referential integrity is valid.task 2 add the 30 rows of

  Write about enhancing your skills of using xpath expressions

Write about enhancing your skills of using XPath expressions to retrieve XML elements in the database. Which requires you to change the bash file.

  Validate the logical model using normalization

Your Learning Team has been hired as database consultants for a start-up company that will stream movies over the Internet (similar to Hulu, Netflix, and others). Validate the logical model using normalization

  Designing and documenting your system

Create a document named: surnameStudentIDAssign1.doc .  In your document, you must include the following section headings:  System Overview, Class Diagram, Class Descriptions, Testing.

  Calculates the difference between actual and budget amounts

Calculates the difference between the Actual and Budget amounts (B5-C5). Format cells A13:D13 with the Total style. Ungroup the worksheets.

  Write a five pages research paper about oracle

Write a five pages research paper about Oracle, Microsoft SQL server, SyBase, DB2 and MySQL. The paper is focus on Enitity/Relation model and relational database. You need to provide the hosories of ER Model and relational databases.

  Normalization

Using the INVOICE table structure shown in table 1, write the relational schema, draw its dependency diagram and identify all dependencies (including all partial and transitive dependencies). You can assume that the table does not contain repeating g..

  What does the sd for the two sections tell us

For the variable "Points on Final," what does the SD for the two sections tell us about the performance of the two groups on the final exam?

  What are four oracle system processes that run for database

What is an Oracle Instance? What are the four Oracle system processes that must always be up and running for the database to be useable.

  Decompose relation into relations which are in bcnf

it is not essential to give violations which have more than one attribute on right side. Decompose the relation, as essential, into collection of relations which are in BCNF.

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