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, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
You know the right answer?
1. Define the following database, similar to the example database from Assignment 1: CUSTOMER CID, C...
Questions
question
History, 30.03.2021 16:10
Questions on the website: 13722359