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

  Create relational schema of database in 3nf

A Relational schema of your database in 3NF, clearly indicating attributes, the data type of each attribute, primary and foreign keys, candidate keys, and which attributes are nullable, giving reasons. List any assumptions you need to make.

  To create a collection called msgs under dbs

To create a collection called "msgs" under dbs named "IASP565DB". You need to create a schema that can accommodate the following information. As you know, when you in the chat mood, you are constantly send out a new message, reply to a message

  Developing a household inventory database

For this Final Project you will be designing and developing a Household Inventory Database (HID). You will be creating tables, relationships, queries, forms, and reports

  Create a visio erd with an associative entity

Create a Visio ERD with an Associative Entity. Add a second new entity named Orders with the following attribute so that your diagram matches the diagram below.

  Analyze how sales of individual items would be entered

How sales of individual items would be entered? How the database would store the data compared to the current spreadsheet method?

  Which part of the rdbms takes care of the data dictionary

Name the sub-systems of a RDBMS. Which part of the RDBMS takes care of the data dictionary and How?

  Why is it preferable to use a numeric based attribute

Why is it preferable to use a numeric-based attribute as the key attribute?- Why is it important that you identify all of the important relationships when developing an entity-relationship (E-R) diagram?

  Design an er diagram to capture the given requirements

Design an ER diagram to capture the requirements. State any assumptions you have that affects your design and three-level schema architecture for the Gyan Gurukul Company that provide better security also design a data abstraction for his client ka..

  Analyze the use of databases in your organization

Write a 700 - 1050 word paper analyzing the use of databases in your organization. Address in your paper the following: Include what database applications are used (Microsoft Access®, DB2®, Oracle®, and so forth).

  Implement the pays auditing model

You have decided to push the envelope and implement the pays auditing model. Provide a step-by-step summary for imple¬menting this model.

  Explain distinction between total and partial constraints

Explain the distinction between total and partial constraints. Explain the difference between a weak and a strong entity set. Explain the distinction between disjoint and overlapping constraints

  Technology terminology for effective communication

Demonstrate written communication skills by understanding basic information communication and technology (ICT) terminology for effective communication and applying it within a business environment.

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