subject

1. Define the following database, similar to the example database from Assignment 1: CUSTOMER CID, CName, CPhone) TICKET (CustomerID, CruiseID, TDate) CRUISE (Crib, PortName, CrLength, CrPrice) The customer IDs should be exactly two characters long, and the phone numbers should be exactly seven characters long; you may choose an appropriate maximum length for the customer names. The eruise IDs should be exactly three characters long, and you may choose an appropriate maximum length for the port names. Each cruise length should be a positive integer (i. e., zero is not allowed) with at most two digits, and each cruise price should be a non-negative number (i. e., zero is allowed) with up to four digits to the left of the decimal point and exactly two digits to the right of the decimal point. The ticket dates should be stored as date objects (using the DATE keyword or the to_date function), not just as character strings. Define the primary keys and foreign keys as indicated in the schemas above. (This means that you will have to create CUSTOMER and CRUISE before TICKET.) In order to avoid name conflicts, start your script file with DROP TABLE commands for all three tables (since TICKET contains foreign keys, you will have to drop it first.) Run your script and look at the columns and constraints of each table to verify that they have been created correctly before going on. 2. Populate the CRUISE table with IDs, ports, cruise lengths, and prices for at least three cruises offered by the company. (Choose ports you would be interested in visiting - you can make up the IDs, lengths, and prices.) Then populate the CUSTOMER table with information for yourself and at least three of your friends. (You can make up the IDs and the phone numbers - and even the friends if you'd like.) Look at the data in each table to verify that they have been populated correctly before going on. 3. Next, insert at least five records into the TICKET table. There should be at least one record for each customer, and at least one customer must have two or more records in the TICKET table. Choose your data so that each customer is only booked on one cruise at a time that is, a customer's next cruise cannot start until the previous one has ended. (This particular constraint - ensuring that cruises do not

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:10
What is word processing and word wrap?
Answers: 1
question
Computers and Technology, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
question
Computers and Technology, 22.06.2019 09:00
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
You know the right answer?
1. Define the following database, similar to the example database from Assignment 1: CUSTOMER CID, C...
Questions
question
English, 21.09.2019 05:10
Questions on the website: 13722367