Question

Hi Please help me ASAP need SQL commands only for MS Access The following tables provide...

Hi Please help me ASAP need SQL commands only for MS Access

The following tables provide a very small portion of the data that will be kept in the database. The data needs to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Problem 47. (If required by your DBMS, be certain to save the rows permanently.)

only for MS Access!!!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Create table MEMBERSHIP
(MEM_NUM CHAR(3) CONSTRAINT PK_MEMNUM PRIMARY KEY,
MEM_FNAME VARCHAR2(15),
MEM_LNAME VARCHAR2(15),
MEM_STREET VARCHAR2(40),
MEM_CITY VARCHAR2(15),
MEM_STATE VARCHAR2(2),
MEM_ZIP CHAR(5),
MEM_BALANCE CHAR(2));

Create table RENTAL
(RENT_NUM CHAR(4) CONSTRAINT PK_RENTNUM PRIMARY KEY,
RENT_DATE DATE,
MEM_NUM CHAR(3) ,CONSTRAINT FK_MEMNUM FOREIGN KEY(MEM_NUM) REFERENCES MEMBERSHIP(MEM_NUM));

Create table PRICE
(PRICE_CODE CHAR(1) CONSTRAINT PK_PRICECODE PRIMARY KEY,
PRICE_DESCRIPTION VARCHAR2(15),
PRICE_RENTFEE NUMBER(2,1),
PRICE_DAILYLATEFEE NUMBER(2,1));



Create table MOVIE
(MOVIE_NUM CHAR(4) CONSTRAINT PK_MOVIENUM PRIMARY KEY,
MOVIE_TITLE VARCHAR2(40),
MOVIE_YEAR CHAR(4),
MOVIE_COST NUMBER(4,2),
MOVIE_GENRE VARCHAR2(15),
PRICE_CODE CHAR(1),CONSTRAINT FK_PRCCODE FOREIGN KEY(PRICE_CODE) REFERENCES PRICE(PRICE_CODE));


Create table VIDEO
(VID_NUM CHAR(5) CONSTRAINT PK_VIDEONUM PRIMARY KEY,
VID_INDATE DATE,
MOVIE_NUM CHAR(4),CONSTRAINT FK_MOVIENUM FOREIGN KEY(MOVIE_NUM) REFERENCES MOVIE(MOVIE_NUM));


Create table DETAILRENTAL
(RENT_NUM CHAR(4),
VID_NUM CHAR(5),
DETAIL_FEE NUMBER(2,1),
DETAIL_DUEDATE DATE ,
DETAIL_RETURNDATE DATE ,
DETAIL_DAILYLATEFEE CHAR(1),
CONSTRAINT DETLRENT_PK PRIMARY KEY (RENT_NUM,VID_NUM),
CONSTRAINT FK_RENTNUM FOREIGN KEY(RENT_NUM) REFERENCES RENTAL(RENT_NUM),
CONSTRAINT FK_VIDNUM FOREIGN KEY(VID_NUM) REFERENCES VIDEO(VID_NUM));

INSERT INTO MEMBERSHIP VALUES (102 ,'Tami',    'Dawson',    '2632 Takli Circle'       ,'Norene',       'TN', '37136' ,11);
INSERT INTO MEMBERSHIP VALUES (103 ,'Curt',    'Knight',    '4025 Cornell Court'      , 'Flatgap',      'KY', '41219' ,6 );  
INSERT INTO MEMBERSHIP VALUES (104 ,'Jamal',   'Melendez', '788 East 145th Avenue ' , 'Quebeck',      'TN', '38579' ,0 );  
INSERT INTO MEMBERSHIP VALUES (105 ,'Iva',     'Mcclain',   '6045 Musket Ball Circle' , 'Summit',       'KY', '42783' ,15 );
INSERT INTO MEMBERSHIP VALUES (106 ,'Miranda', 'Parks',     '4469 Maxwell Place'      , 'Germantown',   'TN', '38183' ,0 );  
INSERT INTO MEMBERSHIP VALUES (107 ,'Rosario', 'Elliott',   '7578 Danner Avenue'      , 'Columbia',     'TN', '38402' ,5 );  
INSERT INTO MEMBERSHIP VALUES (108 ,'Mattie', 'Guy',       '4390 Evergreen Street'   , 'Lily',         'KY', '40740' ,0 );  
INSERT INTO MEMBERSHIP VALUES (109 ,'Clint',   'Ochoa',     '1711 Elm Street'         , 'Greeneville', 'TN', '37745' ,10 );
INSERT INTO MEMBERSHIP VALUES (110 ,'Lewis',   'Rosales',   '4524 Southwind Circle'   , 'Counce',       'TN', '38326' ,0 );  
INSERT INTO MEMBERSHIP VALUES (111 ,'Stacy',   'Mann',      '2789 East Cook Avenue'   , 'Murfreesboro', 'TN', '37132' ,8 );  
INSERT INTO MEMBERSHIP VALUES (112 ,'Luis',    'Trujillo', '7267 Melvin Avenue'      , 'Heiskell',     'TN', '37754' ,3 );  
INSERT INTO MEMBERSHIP VALUES (113 ,'Minnie', 'Gonzales', '6430 Vasili Drive'       , 'Williston',    'TN', '38076' ,0 );  


INSERT INTO PRICE VALUES (1 ,'Standard ',     2   , 1 );
INSERT INTO PRICE VALUES (2 ,'New Release',   3.5 , 3 );
INSERT INTO PRICE VALUES (3 ,'Discount',      1.5 , 1 );
INSERT INTO PRICE VALUES (4 ,'Weekly Special',1   ,0.5);

INSERT INTO RENTAL VALUES (1001 ,'01-MAR-09' ,103);
INSERT INTO RENTAL VALUES (1002 ,'01-MAR-09' ,105);
INSERT INTO RENTAL VALUES (1003 ,'02-MAR-09' ,102);
INSERT INTO RENTAL VALUES (1004 ,'02-MAR-09' ,110);
INSERT INTO RENTAL VALUES (1005 ,'02-MAR-09' ,111);
INSERT INTO RENTAL VALUES (1006 ,'02-MAR-09' ,107);
INSERT INTO RENTAL VALUES (1007 ,'02-MAR-09' ,104);
INSERT INTO RENTAL VALUES (1008 ,'03-MAR-09' ,105);
INSERT INTO RENTAL VALUES (1009 ,'03-MAR-09' ,111);  

INSERT INTO MOVIE VALUES (1234, 'The Cesar Family Christmas'      ,2007, 39.95 ,'FAMILY' ,2);  
INSERT INTO MOVIE VALUES (1235, 'Smokey Mountain Wildlife'          ,2004, 59.95 ,'ACTION' ,1);
INSERT INTO MOVIE VALUES (1236, 'Richard Goodhope'                ,2008, 59.95 ,'DRAMA'   ,2);
INSERT INTO MOVIE VALUES (1237, 'Beatnik Fever'                   ,2007, 29.95 ,'COMEDY' ,2);
INSERT INTO MOVIE VALUES (1238, 'Constant Companion'              ,2008, 89.95 ,'DRAMA'   ,2);
INSERT INTO MOVIE VALUES (1239, 'Where Hope Dies'                 ,1998, 25.49 ,'DRAMA'   ,3);
INSERT INTO MOVIE VALUES (1245, 'Time to Burn'                    ,2005, 45.49 ,'ACTION' ,1);
INSERT INTO MOVIE VALUES (1246, 'What He Doesnt Know '           ,2006, 58.29 ,'COMEDY' ,1);


INSERT INTO VIDEO VALUES (54321,'18-JUN-08' ,1234);
INSERT INTO VIDEO VALUES (54324,'18-JUN-08' ,1234);
INSERT INTO VIDEO VALUES (54325,'18-JUN-08' ,1234);
INSERT INTO VIDEO VALUES (34341,'22-JAN-07' ,1235);
INSERT INTO VIDEO VALUES (34342,'22-JAN-07' ,1235);
INSERT INTO VIDEO VALUES (34366,'02-MAR-09' ,1236);
INSERT INTO VIDEO VALUES (34367,'02-MAR-09' ,1236);
INSERT INTO VIDEO VALUES (34368,'02-MAR-09' ,1236);
INSERT INTO VIDEO VALUES (34369,'02-MAR-09' ,1236);
INSERT INTO VIDEO VALUES (44392,'21-OCT-08' ,1237);
INSERT INTO VIDEO VALUES (44397,'21-OCT-08' ,1237);
INSERT INTO VIDEO VALUES (59237,'14-FEB-09' ,1237);
INSERT INTO VIDEO VALUES (61388,'25-JAN-07' ,1239);
INSERT INTO VIDEO VALUES (61353,'28-JAN-06' ,1245);
INSERT INTO VIDEO VALUES (61354,'28-JAN-06' ,1245);
INSERT INTO VIDEO VALUES (61367,'30-JUL-08' ,1246);
INSERT INTO VIDEO VALUES (61369,'30-JUL-08' ,1246);

INSERT INTO DETAILRENTAL VALUES (1001, 34342, 2    ,'04-MAR-09' ,'02-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1001, 61353, 2    ,'04-MAR-09' ,'03-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1002, 59237, 3.5 ,'04-MAR-09' ,'04-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1003, 54325, 3.5 ,'04-MAR-09' ,'09-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1003, 61369, 2    ,'06-MAR-09' ,'09-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1003, 61388, 0    ,'06-MAR-09' ,'09-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1004, 44392, 3.5 ,'05-MAR-09' ,'07-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1004, 34367, 3.5 ,'05-MAR-09' ,'07-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1004, 34341, 2    ,'07-MAR-09' ,'07-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1005, 34342, 2    ,'07-MAR-09' ,'05-MAR-09' , 1);
INSERT INTO DETAILRENTAL VALUES (1005, 44397, 3.5 ,'05-MAR-09' ,'05-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1006, 34366, 3.5 ,'05-MAR-09' ,'04-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1006, 61367, 2    ,'07-MAR-09' ,NULL,         1);
INSERT INTO DETAILRENTAL VALUES (1007, 34368, 3.5 ,'05-MAR-09' ,NULL,         3);
INSERT INTO DETAILRENTAL VALUES (1008, 34369, 3.5 ,'05-MAR-09' ,'05-MAR-09' , 3);
INSERT INTO DETAILRENTAL VALUES (1009, 54324, 3.5 ,'05-MAR-09' ,NULL,         3);
INSERT INTO DETAILRENTAL VALUES (1001, 34366, 3.5 ,'04-MAR-09' ,'02-MAR-09' , 3);

COMMIT;

UPDATE MOVIE SET MOVIE_YEAR = '2006' WHERE MOVIE_NUM = 1245 ;

i have answered the above , hope this helps

Add a comment
Know the answer?
Add Answer to:
Hi Please help me ASAP need SQL commands only for MS Access The following tables provide...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to...

    Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to retrieve all the data field from db_pvfc12_std in table CUSTOMER_T 2.- Run a query to retrieve record --> CustomerID = 11, How many records did you get and why? 3.- Run a query to retrieve all the data field from table Order_T               Once retrieved:                              3.1.- Please name the fields showing: Primary Key, Foreign Key and other fields                              3.2.- What type of...

  • need help Create or edit the SQL statements required to accomplish the following tasks. All columns...

    need help Create or edit the SQL statements required to accomplish the following tasks. All columns should have a column name, feel free to create appropriate aliases Use screen shots to ca evidence that each task is completed; include the SQL records before and after statements are executed, as appropriate. Include all work, even if you get errors. Paste your screen shots into a single PowerPoint file pture statements output from the statements, and views of the object explorer when...

  • SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do...

    SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do steps after. First 3 tables are after the first 2 images for reference if needed. //1// CREATE TABLE kr_customer ( Name VARCHAR(40) NOT NULL PRIMARY KEY, City VARCHAR(20), Status CHAR(1) ); //2// CREATE TABLE kr_salesperson ( Name VARCHAR(40) NOT NULL PRIMARY KEY, Age INT, Salary DECIMAL(8, 2) ); //3// CREATE TABLE kr_order ( Order_Number number(3) NOT NULL PRIMARY KEY, Customer_Name VARCHAR(40), Salesperson_Name VARCHAR(40), Amount...

  • I need help with the following SQL query for a company database (script given below). The...

    I need help with the following SQL query for a company database (script given below). The name of the Department. The number of employees working in that department. The number of different projects controlled by this department. The name of the project controlled by this department that has the maximum number of employees of the company working on it. The number of the above project. The cumulative sum of the number of employees of the company working on the projects...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

  • Question 1.Write a SQL statement for each of the following questions based on the above tables...

    Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...

  • please help me to solve the following question ASAP . source files :- Create MS Word...

    please help me to solve the following question ASAP . source files :- Create MS Word document with the following requirements. You final out should look like the file "Formatted.docx”. Use the content of the file "Text.docx” and “Icon.png" as source files. 1) Configure the page before typing. a) Page direction b) Page border c) Water mark. 2) Insert page number 3) Insert header & footer. 4) Font size is 13 point 5) Insert the picture attached 6) Insert the...

  • Your project will require you to develop a database design to solve a real-life data management...

    Your project will require you to develop a database design to solve a real-life data management problem. It can be any problem in your work environment or for another organization, for example, a bookstore (think of how Amazon uses databases), a course management system (think of how a university manages courses), a bank (think of how your bank works), and an online auction site (think of how Ebay works). You will develop a database to solve this problem You will...

  • Overview This lab provides you the opportunity to insert and update data with the use of SQL comm...

    Overview This lab provides you the opportunity to insert and update data with the use of SQL commands. The lab will utilize the FLIX2YOU problem, the current schema. In order to start this lab, you must have successfully completed Lab # 6. In Lab # 6, you executed a script that was provided to you. This script created 7 of the FLIX2YOU tables as documented in the Entity Relationship Diagram in the FLIX2YOU problem document. The second part of lab...

  • Hi i need help to answer all the questions please can someone help me thank you. I need to create it in mongodb Perform the following tasks using MongoDB queries: a. List alphabetically only the fir...

    Hi i need help to answer all the questions please can someone help me thank you. I need to create it in mongodb Perform the following tasks using MongoDB queries: a. List alphabetically only the first 20 names of companies founded after the year 2010. b. List only the first 20 names of companies with offices either in California or Texas, ordered by the number of employees and sorted largest to smallest. 3. Perform the following tasks using the MongoDB...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT