Database Management Systems

Database Management Systems

Question 1: Normalization

1.1)    Consider a relation R with six attributes ABCDEF where AB is a composite primary key for R. Assume R has the following functional dependencies:
AB? CDEF
B? CDE
D? E

a)    In what normal form is relation R? Explain why?

b)    Is it possible to decompose R into a number of relations in order to achieve a higher normal form? Explain how.

1.2)

branchNo    branchAddress    telNo    mgrStaffNo    name
B001    8Jefferson Way,Portland,OR97201    503-555-3618    S1500    TomDaniels
B002    CityCenterPlaza,Seattle,WA98122    206-555-6756    S0010    MaryMartinez
B003    14–8thAvenue,New York,NY 10012    212-371-3000    S0145    ArtPeters
B004    16–14thAvenue,Seattle, WA98128    206-555-3131    S2250    SallyStern

Primary key: branchNo

a)    Why the above table is not in 3NF?
b)    Describe and illustrate the process of normalizing the data shown in this table to third normal form (3NF).
c) Identify the primary and foreign keys in your 3NF relations.

Question 2: Triggers and Stored Procedures

After the file completes,the tables shown above are created and populated with the shown data. Familiarize yourself with the database before starting to write your queries. Once you are familiar with the data, start working on the following questions.

Answer the following questions based on the above database:

1)    Create a view named “AC2778V” that includes the following “For each charter of aircraft 2778V, print the charter date, destination, and the corresponding customer last name, area code, and phone number”. Your answer should include both the SQL statement for view creating along with the contents of the view (you get the contents of the view by select * from AC2778V).

2)    Modify the MODEL table to add the following attribute and insert the values shown in the following table. (Note: use ALTER TABLE and UPDATE commands.)

Attribute name    Attribute Description    Attribute type    Attribute Values
MOD_WAIT_CHG    Waiting charge per hour for each model:    Numeric    $100 for C-90A
$50 for PA23-250
$75 for PA31-350

3)    Create a trigger named trg_char_hours that will automatically update the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values.The meaning for the AIRCRAFT table columns are as follows: AC_TTAF: Total time on the air frame
AC_TTLR: Total time on the left engine (Also used to record single engine hours) AC_TTER: Total time on the right engine.

So in the trigger, you need to increase all of them with CHAR_HOUR_FLOWN

4)    Create a trigger named trg_cust_balancethat will automatically update the CUSTOMER table’s CUST_BALANCE when a new CHARTER row is added. Use the CHARTER table’s CHAR_TOT_CHG as the update source (Assume that all charter charges are charged to the customer balance.)

5)    Create a stored procedure to update model waiting charge per hour attribute that just created in question 2. The procedure takes the model number as a parameter.  The procedure increases the waiting charge for this model by 20%.

6)    Create a stored procedure that will take a CHARTER _TRIP number and update the corresponding customer balance by adding the charter total charge to the customer balance.

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET A GOOD DISCOUNT 🙂

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency

Order your essay today and save 10% with the discount code tCPCOVID10