Question

You work for a DVD rental company. Your manager has asked you to pull some data on the company, its inventory, and customers.
Add one new customer and provide data for all columns on the table for the new customer. Use your own data to enter (ex: ente
You work for a DVD rental company. Your manager has asked you to pull some data on the company, its inventory, and customers. You will complete this by developing and running SQL queries. Initialize Your Database (NOTE: If you alreody did this in Project 1, you do not need to do this step again): 1. Download RentalCompany.sql from Doc Sharing. Run the script to create tables and data. You should not receive errors. There may be a few warnings, but that is okay To verify you created all tables, run the following SQL: a. b. SELECT TABLE NAME, TABLE ROWS, TABLE TYPE, CREATE TIME FROM information schema.'tables' WHERE table schema,'rentalcompany, AND TABLE TYPE= BASE TABLE Your results should look like the table below. This will help verify that you properly created the schema/database and tables 200 BASE TABLE 603 BASE TABLE 16 BASE TABLIE 600 BASE TABLIE 109 BASE TABLE actor address category city country customer 599 BASE TABLE film film actor 5462 BASE TABLE film category 1000 BASE TABLE film text inventory language payment rental staff store 1000 BASE TABLE 1000 BASE TABLE 4581 BASE TABLE 6 BASE TABLE 16086 BASE TABLE 16005 BASE TABLE 2 BASE TABLE
Add one new customer and provide data for all columns on the table for the new customer. Use your own data to enter (ex: enter your name as first and last name). 3. 4. Create a new actor record on the actor table for Kirk James by copying the record for Russell Bocall 5. Delete language IDs from the language table that have no films assigned to them. Grading
0 0
Add a comment Improve this question Transcribed image text
Answer #1


create table customer(store_id number,
                       active int,
                   first_name varchar(20),
                   last_name varchar(20),
                   address varchar(20));
                  
create table actor(id int,first_name varchar(20),
                   last_name varchar(20),
                   address varchar(20));
                  
                  
create table film(id int primary key,
                   title varchar(20),
                   rental_duration int);
                  
                  

create table language(language_id int,
                       language_name varchar(20),
                       film_id int,
                       foreign key(film_id) references film(id));
                  
insert into customer values(1,111,'Vera','Fuselier','abc');
insert into customer values(2,121,'Kacy', 'Barnett','def');
insert into customer values(3,131,'Lucia', 'Tiger','ght');
insert into customer values(4,141,'robert', 'Smith','klm');
insert into customer values(5,151,'Minta','Barnett','nop');


                  
insert into actor values(1,'Russell','Bacall','abfh');
insert into actor values(2,'Kirk', 'James','gkjj');
insert into actor values(3,'james','smith','dkjkjd');

insert into film values(1,'harry potter',11);
insert into film values(2,'operation rocket',12);
insert into film values(3,'anabAge',13);
insert into film values(4,'fault in our Age',14);
insert into film values(5,'game of throwns',23);


                      
insert into language values(1,'engilsh',1);
insert into language values(2,'engilsh',null);
insert into language values(3,'engilsh',null);
insert into language values(4,'engilsh',1);

3rd query
insert into Customer values(6,156,'brant','kacy','fed');

4TH QUERY

update actor
set id=(select id from actor where first_name='Russell' and last_name='Bacall'),address=(select address from actor where first_name='Russell' and last_name='Bacall')
where first_name='Kirk' and last_name='James';

5TH QUERY

delete from language where film_id is null;

SQL> SELECT FROM CUSTOMER; STORE ID ACTIUE FIRST NAME LAST NAME ADDRESS 1 2 3 111 Uera 121 Kacy 131 Lucia 141 robert 151 Mint

so insert into Custoner values(6,156, brant , kacy.fed 1 row created

media%2F584%2F5848c153-f9f6-4a1d-ae14-0f

SQL> SELECTFROM CUSTOMER; STOREID HAME---- ACTIUE FIRST NAME LAST_NAME ADDRESS - 111 Uera 121 Kacy 131 Lucia 141 robert 151 M

Add a comment
Know the answer?
Add Answer to:
You work for a DVD rental company. Your manager has asked you to pull some data on the company, i...
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
  • SQL Queries – in this assignment you will be asked to create several SQL queries relating...

    SQL Queries – in this assignment you will be asked to create several SQL queries relating to the Sakila database that we installed in class. You may freely use DBeaver to create these queries, but I will expect your solution to show me the SQL code to answer or complete the tasks below. Write a query that produces the last name, first name, address, district, and phone number for every customer in the customer table. (You don’t need to include...

  • EliteVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. E...

    EliteVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. Each store can own several copies (VIDEO) of each movie (MOVIE). For example, the store may have ten copies of the movie Titanic. In this case, Titanic would be an instance in the MOVIE table, while each rentable copy would be an instance in the VIDEO table. A rental transaction (RENTAL) involves one or more VIDEOs being rented to a member (MEMBERSHIP). A video can be rented...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

  • Project 2 (Clothing Rental) Fashion Rental is a rental company located in Manhattan, New York, sp...

    Project 2 (Clothing Rental) Fashion Rental is a rental company located in Manhattan, New York, specializing in rental of high end wome en clothing for the fashion industry. Over the past 12 months, her business has experienced tremendous growth due to a boom in the fashion Industry. The business has kept the daily service records in a workbook format and now needs to expand its reporting capabilities to develop a relatio nal database to effect a more functional structure. Fashion...

  • Instructions: You are required to create ERD and Enhanced ERD diagrams. And also translate your own...

    Instructions: You are required to create ERD and Enhanced ERD diagrams. And also translate your own created ERD & EERD diagrams in to Relational Model. Q# 1: Draw ER diagram based on the following database requirements. A Tutorial class may have one or more students. A student may be in one or more classes. Attributes of CLASS includes CLASS CODE, ROOM NAME and CLASS SIZE. Attributes of STUDENT include STUDENT ID, NAME and NATIONALITY. Translate your ER diagram in to...

  • Help In Database: Next comes the data entry: Make up data for your database, or find...

    Help In Database: Next comes the data entry: Make up data for your database, or find real data. You can enter the data with INSERT statements, but it is much easier to use PhpAdmin. It has a form where you can type the data directly. Alternatively, you can use PhpAdmin to import CSV data (comma-separated values), which you can export from Excel. Include at least 3 rows in each of the entity relations, and as many rows as you need...

  • Through the remaining assignments due in this course, you will be creating a simple database for...

    Through the remaining assignments due in this course, you will be creating a simple database for tracking information about volunteers working and raising money for a community organization. This assignment requires that you create the initial table, called PERSON, to hold basic information about volunteers. You will be redefining the design and building the database in the upcoming unit assignments. 1.Use the mysqldump.exe command line tool to backup the data in your volunteer database. To access the mysqldump.exe tool, start...

  • In this assignment you will combine HTML, PHP, and SQL in order to create a web...

    In this assignment you will combine HTML, PHP, and SQL in order to create a web form that allows a manager to add films to the sakila database. You will also create a method to allow the manager to view a list of all films along with their related information, and a list of actors in the movies. Task 1 Create an initial HTML page titled manager.html with 2 buttons. The first button will be labeled “View Films”, and the...

  • Project Description In this project, you will design and implement a database for keeping track of...

    Project Description In this project, you will design and implement a database for keeping track of information for an online “SOCIAL NETWORK” system (e.g. a simplified version of Facebook!). You will first design an EER schema diagram for this database application. Then, you will map the EER schema into a relational database schema and implement it on ORACLE or MySQL or some other relational DBMS. Finally, you will load some data into your database (via user Interface) and create some...

  • a) [1 pt] Import data (SQL code is provided. Test prog3_createTable.sql on your server): Each of...

    a) [1 pt] Import data (SQL code is provided. Test prog3_createTable.sql on your server): Each of you will work in your own database with the name cs4402xx;; Import the movie data movie-­name_score.txt into a new table called movies with the schema: movies(movie_id integer, name varchar(1000), score integer) Import the movie cast data at movie-­cast.txt into a new table called cast with the schema: cast(movie_id integer, cast_id integer, cast_name varchar(1000)). j) [10 pt] Finding good collaborators: Create a view (virtual table)...

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