Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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 following: vendor(vendor_id, name, address1, address2, city, state , zip_code, phone, contact_last_name , contact_first_name) Create a new table containing the previous ten columns: The table name should be VENDOR.

The vendor ID column contains a numeric number. Use column sizes you consider suitable for the columns. The vendor_id column is a primary key. Select appropriate datatypes/sizes for columns. Use a SINGLE sql statement to create the table. If you use more than one statement to complete this part, you will get no points for this query.

Query 2: Add five rows to the VENDOR table. The script 151A_vender_insert_data.sql contains the sql to populate the table needed for this part of the assignment. Run this each time you work on the table. ( this is a fairly small file- you can run it via copy and paste techniques.) BE CERTAIN to run the inserts script before you run the version of the script-to-spool that you want me to grade.

Query 3: Alter the VENDOR table to add a column that will be used to store the email address of each vendor. Name this column vendor_email and use an appropriate number datatype specification. You do not need to store any data in this column.

Query 4: Display the rows in the VENDOR table.

Query 5: Display column names and datatypes for the VENDOR table.

Query 6: Delete the vendor_email column from the VENDOR table.

Query 7: Rename the VENDOR table as VENDOR_BACKUP.

Query 8: Display the names of the tables in your current database. ______ 2

Query 9: Remove the VENDOR_BACKUP table from the database.

Query 10: Alter the EMPLOYEES table to add a column that will be used to store the salary earned year-to-date. Name this column SalaryYearToDate and use an appropriate NUMBER datatype specification. You do not need to store any data in this column.

Query 11: Write an SQL statement to drop the SalaryYearToDate column you added to the EMPLOYEES table in query 10.

Data:

INSERT INTO vendor
(vendor_id,name,address1,address2,city,state,zip_code,phone,contact_last_name,contact_first_name)
VALUES (1,'US Postal Service','Attn: Supt. Window Services','PO Box 7005','Madison','WI','53707','(800) 555-1205','Alberto','Francesco');
INSERT INTO vendor
(vendor_id,name,address1,address2,city,state,zip_code,phone,contact_last_name,contact_first_name)
VALUES (2,'National Information Data Ctr','PO Box 96621','NULL','Washington','DC','20090','(301) 555-8950','Irvin','Ania');
INSERT INTO vendor
(vendor_id,name,address1,address2,city,state,zip_code,phone,contact_last_name,contact_first_name)
VALUES (3,'Register of Copyrights','Library Of Congress','NULL','Washington','DC','20559','NULL','Liana','Lukas');
INSERT INTO vendor
(vendor_id,name,address1,address2,city,state,zip_code,phone,contact_last_name,contact_first_name)
VALUES (4,'Jobtrak','1990 Westwood Blvd Ste 260','NULL','Los Angeles','CA','90025','(800) 555-8725','Quinn','Kenzie');
INSERT INTO vendor
(vendor_id,name,address1,address2,city,state,zip_code,phone,contact_last_name,contact_first_name)
VALUES (5,'Newbrige Book Clubs','3000 Cindel Drive','NULL','Washington','NJ','07882','(800) 555-9980','Marks','Michelle');

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M93122160

Have any Question?


Related Questions in DBMS

Suppose that you have designed a database for morgan

Suppose that you have designed a database for Morgan Importing that has the following tables: EMPLOYEE (EmployeeID, LastName, FirstName, Department, Phone, Fax, EmailAddress) STORE (StoreName, City, Country, Phone, Fax, ...

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

Question 1 unified communications system eg email

Question: 1. Unified Communications System (e.g., email, conferencing, and messaging) - The local area network is slower than needed, especially for newer, cloud-based applications. The email system needs refurbishment a ...

You can work on this assignment individually or in a group

You can work on this assignment individually or in a group of 2. If you are working in a group please establish a group in Assignment 2 Group on Canvas In this assignment you are asked to explore the use of neural networ ...

Question as explained throughout this course entity

Question: As explained throughout this course, entity relationship modeling is a critical element of database design. If the database is not properly modeled, it is unlikely that the database will be properly developed. ...

Assignmentqueries functions and triggersdatabase

Assignment Queries, Functions and Triggers Database Systems Aims The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL qu ...

Question sql injection is in the top 10 owasp and common

Question : SQL Injection is in the top 10 OWASP and Common Weakness Enumeration. Using MySQL and PHP, show your own very short and simple application that is vulnerable to this attack. Provide another version that mitiga ...

Assignment question - write and run sql statements to

Assignment Question - Write and run SQL statements to complete the following tasks Part A - DML 1. Locate the record in the vendor table that does not have a value for the attribute V_STATE 2. Find the customers whose ba ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

Your taskyou have been commissioned to develop a database

Your task You have been commissioned to develop a database system that is capable of keeping records for FU's table tennis matches from now on. The database needs to keep a record of: - All team information, including pl ...

  • 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