Create a view named largeslip using the data

Assignment Help PL-SQL Programming
Reference no: EM13926430

1. Create a view named LargeSlip using the data in the MarinaNum, SlipNum, RentalFee, BoatName, and OwnerNum columns in the MarinaSlip table for those slips with lengths of 40 feet. Display the data in the view.

2. Create a view named InitialService using the slip ID, category number, category description, and estimated hours for every service request for which the spent hours are zero. Display the data in the view.

3. Create a view named TypesOfBoats using the boat type and a count of all boats of each type. Display the data in the view.

4. Create the following indexes. If it is necessary to name the index in your DBMS, use the indicated name.

a. Create an index named BoatIndex on the BoatName field in the MarinaSlip table.
b. Create an index named BoatIndex2 on the OwnerNum field in the MarinaSlip table.
c. Create an index named BoatIndex3 on the Length and BoatName fields in the MarinaSlip table and list the lengths in descending order.

5. Drop the BoatIndex3 index.

6. Assume the MarinaSlip table has been created but there are no integrity constraints. Create the necessary integrity constraints so the rental fee must be less than $5,000 and the slip length must be 25, 30, or 40.

7. Ensure that the following are foreign keys (that is, specify referential integrity) in the Alexamara database.

a. MarinaNum is a foreign key in the MarinaSlip table.
b. OwnerNum is a foreign key in the MarinaSlip table.
c. CategoryNum is a foreign key in the ServiceRequest table.
d. SlipID is a foreign key in the SerivceRequest table.

8. Add to the MarinaSlip table a new character field named FeePaid that is one character in length. On all records, change the value for the FeePaid field to Y.

9. Change the FeePaid field in the MarinaSlip table to N for the slip whose slip ID is 4.

10. Change the length of the BoatName field in the MarinaSlip table to 60.

11. Write a stored procedure that will change the rental fee of a slip with a given slip ID. How would you use this stored procedure to change the rental fee of slip ID 3 to 3,700.00?

12. Assume the Owner table contains a column called TotalRental that represents the total rental fee for all slips rented by that owner. Write the code for the following triggers following the style shown in the text.

a. When inserting a row in the MarinaSlip table, add the rental fee to the total rental for the appropriate owner.
b. When updating a row in the MarinaSlip table, add the difference between the new rental fee and the old rental fee to the total rental for the appropriate owner.
c. When deleting a row in the MarinaSlip table, subtract the rental fee from the total rental for the appropriate owner.

Reference no: EM13926430

Questions Cloud

Capital budget recommendation : Guillermo Navalles, owner of Guillermo Furniture faces a decision that could make or break the success or failure of his business. Because of increased competition and costs, profits for the Mexican company have taken a hit.
Analyzing an argument -from samizdat to twitter : How effectively does Burton's use of language help establish his credibility as well as emotional and logical appeal? Be sure to consider his rhetorical situation. Who is his audience and what is his purpose?
Declares several circle objects : Create a class named TestCircle whose main method() declares several Circle objects. Using setRadius() method, assign one circle a small radius value (code a user input making use of Scanner of JOptionPane), and assign another a larger radius valu..
Should nonmoral claims override the moral claims : Is this a moral or legal/economic issue? Could it be both? What are some of the most important value and prescriptive claims involved here? Should any of the relevant nonmoral claims override the moral claims? Why or why not?
Create a view named largeslip using the data : Create a view named LargeSlip using the data in the MarinaNum, SlipNum, RentalFee, BoatName, and OwnerNum columns in the MarinaSlip table for those slips with lengths of 40 feet. Display the data in the view.
Name of all customers that have a credit limit : List the names of all customers that have a credit limit less than $10,000.
What is green technology : You currently work for a small private consulting company. It has been very successful in the current economy but business has started to slow down. Your competitors have started implementing green technology. Your boss has asked you to research g..
Dba at premiere products : The DBA at Premiere Products wants you to investigate biometric identification techniques for potential use at the company for computer authentication purposes.
What type of strategy consists of geographical pricing : The marketing manager needs to know the cost of the research project before approving it. During which stage of the marketing research process would such a consideration most likely take place?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Application which tests the random number generation

Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.

  Write select statement to return those rows with due balance

Write SELECT statement which returns those rows with the balance due greater than 1000. Sort result set by InvoiceTotal, with largest invoice first.

  Develop a logical database model for the company

Please use either Access notation (i.e., one-1, many-∞) or ER modeling notation (i.e., one- , many- )(see slide 3.28) to develop a logical database model for the company.

  Write a pl/sql block and declare a variable v_sal

Write a PL/SQL block and declare a variable  v_sal  of the type NUMBER. Include the following statement in the Execution section:

  Write a compete pl/sql program to display the staffno

Write a compete PL/SQL program to display the StaffNo,

  Write a pl-sql block to select the name of the employee

Write a PL/SQL block to select the name of the employee with a given salary value. You will be using the MESSAGES table that was created for a previous assignment.

  Write a program in towers of hanoi

How to write a program in towers of hanoi using pl/sql language

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Find the most classes taken by students

Find the students by student ID who have taken the most class (counted by enrolled students) and not counting where an ‘F' was the grade - Find the facility by facility id who teach math class.

  Provide a comprehensive record of using sql

Learning Objectives: The purpose of Project 3 is to enable the students to gain extensive experience with using SQL to design and query databases.

  Sql script-creating the database and inserting data

Understanding the SQL script, creating the database and inserting data and display all product information for products that contain the string ‘saw' in their description.

  What does sql mean and what can you do with sql

Now we're getting to some exciting stuff - SQL and queries! We have *touched on it* earlier and now this week it will be the primary focus of this discussion topic. So what is SQL? What does SQL mean and what can you do with SQL

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