Display the rows in the vendor table

Assignment Help Database Management System
Reference no: EM132134695

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');

Reference no: EM132134695

Questions Cloud

Compute the t value of the sample test statistic : Use a level of significance of 0.05 to conduct a two-tailed test of the claim that the population mean is 11.5. Compute the t value of the sample test statistic
What networks were encountered along the way : What information about the geographic locations of the routers can you infer from the trace? What was the longest mean delay on any one hop along the way?
Write a snippet of code to declare an exception class : Write a try catch block of code, which invokes the treatPet method, catches PetBitesException and then invokes the errorHandler method.
How many results are possible to form the board : The Codechef Programming Society has 198 membership-paying mem- bers, 97 females and 101 males.
Display the rows in the vendor table : 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.
Calculate the issue price of the bonds : On January 1, 2017 Lance Co. issued five-year bonds with a face value of $840,000, Calculate the issue price of the bonds
What is the probability that in the next six? flights : What is the probability that in the next six? flights, exactly four flights will be on? time?
Determine the probability of exactly four successes : Consider a binomial probability distribution with p=0.3. Complete parts a through c below.
Republican democrat independent : Suppose we know the following probabilities:

Reviews

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