Write SQL DDL to create the five relations shown below using Oracle. Primary keys are underlined....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write SQL DDL to create the five relations shown below using Oracle. Primary keys are underlined. You need to define primary keys for all tables. Data types are indicated in parentheses next to the attributes • Other constraints are specified next to the attributes. 1. publisher • publisher_id (5 digital number) city (20 characters) • 2. book . • • capital (15-digit number) Not NULL • • book ID (5 digit number) title (25 characters) Not NULL language (15 characters) • genre (10 characters) Not NULL; The value should only be one of the follow: Adventure, Fantasy, Horror, Science Fiction. rank (10-digitl number); has digital_version (1 character); The default value is N. Another possible value is Y. publisher_id references publisher_id in Publisher table ON DELETE SET NULL 3. library . library_name (15 characters) • capacity (8-digit number); The default value is 1000. • contact number (10 characters) Not NULL • • contact_email (50 characters) closing date (10 characters): The value could only be Monday, Tuesday, and Wednesday. 4. author • author_id (4 characters) • name (20 characters): Not NULL & Unique • birthday (DATE): Not NULL default is 1990/1/1 • experience (3-digit number): The value should be less than 100. 5. collect library name references library_name in Library table ON DELETE SET NULL book id references book id in Book table ON DELETE CASCADE • cost (10-digit number): Not NULL 6. writtenby book ID references book_id in Book table ON DELETE CASCADE author ID references author_id in Author table work hour (6-digit number): Not NULL default is 100 Write SQL DDL to create the five relations shown below using Oracle. Primary keys are underlined. You need to define primary keys for all tables. Data types are indicated in parentheses next to the attributes • Other constraints are specified next to the attributes. 1. publisher • publisher_id (5 digital number) city (20 characters) • 2. book . • • capital (15-digit number) Not NULL • • book ID (5 digit number) title (25 characters) Not NULL language (15 characters) • genre (10 characters) Not NULL; The value should only be one of the follow: Adventure, Fantasy, Horror, Science Fiction. rank (10-digitl number); has digital_version (1 character); The default value is N. Another possible value is Y. publisher_id references publisher_id in Publisher table ON DELETE SET NULL 3. library . library_name (15 characters) • capacity (8-digit number); The default value is 1000. • contact number (10 characters) Not NULL • • contact_email (50 characters) closing date (10 characters): The value could only be Monday, Tuesday, and Wednesday. 4. author • author_id (4 characters) • name (20 characters): Not NULL & Unique • birthday (DATE): Not NULL default is 1990/1/1 • experience (3-digit number): The value should be less than 100. 5. collect library name references library_name in Library table ON DELETE SET NULL book id references book id in Book table ON DELETE CASCADE • cost (10-digit number): Not NULL 6. writtenby book ID references book_id in Book table ON DELETE CASCADE author ID references author_id in Author table work hour (6-digit number): Not NULL default is 100
Expert Answer:
Answer rating: 100% (QA)
Certainly Here is the SQL Data Definition Language DDL for creating the five relations using Oracle ... View the full answer
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Posted Date:
Students also viewed these databases questions
-
Damon Associates reported the following transactions during September 2017: Sept. 8 Sold $3,000 of merchandise to Bruce Company for cash. The cost of the merchandise was $1,250 10 Owner invested...
-
ConAir (CA) commercial airlines company requires you experience in database design and have approached you to assist in the design of their new airline database system. They urgently need to have...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What role does the general ledger department play in the conversion cycle?
-
A steel spur pinion is to transmit 15 hp at a speed of 600 rev/min. The pinion is cut on the 20 full-depth system and has a diametral pitch of 5 teeth/in and 16 teeth. Find a suitable face width...
-
1. Define Bass Pro Shops' targeting strategy. Does the chain provide a truly differentiated experience? 2. Describe how Bass Pro Shops became the nation's leading outdoor retailer based on the retail...
-
Find five interesting facts in Table 1.1. TABLE 1.1 Basic Characteristics of Selected Countries GNP per capita Index of Openness Goods & Services 2009 Population Area (millions) (1,000s sq. km.) Avg....
-
The State of Ohio decides that Ohio's landfills are becoming too full at too rapid a pace, so it passes a law banning the import of waste generated out of state. Several landfill operators have...
-
1. How would you write up a follow-up investigation supplemental report on the case below? 2. How would you describe the facts of this case along with the information about the preparator? 3. what...
-
Palese bought five lottery tickets. He used a play slip to select his numbers, then filled them in on the grid. He put his tickets in his pocket. At home, he did the laundry. Several days later, he...
-
For a lead-tin alloy of composition 40 wt% Sn-60 wt% Pb with a total mass of 2.8 kg at 180C (355F): (a) Determine the mass of the a and phases. (b) What is the primary phase present for this alloy?...
-
Consider the electric circuit in the figure below with the following parameters: 19.00 V, 26.00 V, R = 700 2, R3 = 200 2. A i R ww B iz + + R3. ww OV What is the potential at point B? Calculate the...
-
On June 30, Sharper Corporation's stockholders' equity section of its balance sheet appears as follows before any stock dividend or split. Sharper declares and immediately distributes a 50% stock...
-
Assume that the results of a test in a Math 107 class followed a normal distribution. If the average test score was 80% and the standard deviation was 5, approximately 68% of the scores should fall...
-
Martha inadvertently failed to file her 2 0 2 3 tax return for eleven months. The tax due on the return was $ 1 , 750 . Her failure to file penalty will be ?
-
One possible means of achieving space flight is to place a perfectly reflecting aluminized sheet into Earth's orbit and use the light from the Sun to push this solar sail. Suppose such a sail, of...
-
65. 66. 63. 64. E. A. B. CAUAN CAVA C. Inventory becomes part of cost of goods sold when a company purchases the inventory receives payment from the customer sells the inventory pays for the...
-
Marc Company assembles products from a group of interconnecting parts. The company produces some of the parts and buys some from outside vendors. The vendor for Part X has just increased its price by...
-
Define the terms, tuple, attribute, and relation.
-
What is the difference between the conceptual world and the real world? Is it possible for a conceptual model to represent reality in total? Why or why not?
-
What is a primary key? How do the properties of a primary key differ from those of a candidate key?
-
Two Carnot engines work in series between the source and sink temperatures of \(500 \mathrm{~K}\) and \(300 \mathrm{~K}\). If both engines develop equal power determine the intermediate temperature.
-
A reversible heat engine operates between two reservoirs at temperatures, \(700^{\circ} \mathrm{C}\) and \(50^{\circ} \mathrm{C}\). The engine drives a reversible refrigerator which operates between...
-
A reversible heat engine working between two thermal reservoirs at \(875 \mathrm{~K}\) and \(315 \mathrm{~K}\) drives a reversible refrigerator which operates between the same \(315 \mathrm{~K}\)...
Study smarter with the SolutionInn App