Consider an application which is being developed for a 'Used Car seller'. For storing various details...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider an application which is being developed for a 'Used Car seller'. For storing various details related to the cars and owners, create the tables according to the schemas given below; CAR(Car Reg_No, Brand, Model, Variant, Model_Year, Color, Year_of_Purchase, Kilometers) OWNER(Owner ID, Owner_Name, Owner_Phone, License_Number) OWNER_CAR(Owner ID, Car Reg_No, Price) 1- Consider the following as important components while creating the tables; a. The columns that are underlined are Primary keys b. All columns must contain some values. c. Choose the appropriate data types which would match the most for all the attributes. d. Use constraint names for all the constraints you create. e. For table CAR; i. Brand should be one of { 'Maruti', "Ford', 'Hyundai' } ii. Color should be one of { 'Black', 'White', 'Red', 'Blue' } iii. Kilometers should be less than 50000. f. For table OWNER; i. Owner_ID should start with 'OID' ii. License_Number should be unique value. g. For table OWNER_CAR; i. Price should be greater than Rs.150000. II - After table creation, write the queries to alter the tables according to the requirements given below; a. Add the Foreign Key in OWNER_CAR table to refer Owner_ID from OWNER table. b. Add the Foreign Key in OWNER_CAR table to refer Car_Reg_No from CAR table. c. Add an attribute Owner_Address in OWNER table. d. Add an attribute Test_Status of the car which accepts character based values. e. Remove the column Year_Of_Purchase from CAR. f. Remove the column Owner Address from OWNER table. g. Remove the Unique constraint of License_Number attribute. h. Remove the color constraint so that any colored cars can be inserted. i. Add a column Years_Used to OWNER_CAR table which stores the number of years the car used by the owner. j. Remove the table OWNER_CAR from the database completely. k. Change the type of License_Number attribute from character based type to number type. Consider an application which is being developed for a 'Used Car seller'. For storing various details related to the cars and owners, create the tables according to the schemas given below; CAR(Car Reg_No, Brand, Model, Variant, Model_Year, Color, Year_of_Purchase, Kilometers) OWNER(Owner ID, Owner_Name, Owner_Phone, License_Number) OWNER_CAR(Owner ID, Car Reg_No, Price) 1- Consider the following as important components while creating the tables; a. The columns that are underlined are Primary keys b. All columns must contain some values. c. Choose the appropriate data types which would match the most for all the attributes. d. Use constraint names for all the constraints you create. e. For table CAR; i. Brand should be one of { 'Maruti', "Ford', 'Hyundai' } ii. Color should be one of { 'Black', 'White', 'Red', 'Blue' } iii. Kilometers should be less than 50000. f. For table OWNER; i. Owner_ID should start with 'OID' ii. License_Number should be unique value. g. For table OWNER_CAR; i. Price should be greater than Rs.150000. II - After table creation, write the queries to alter the tables according to the requirements given below; a. Add the Foreign Key in OWNER_CAR table to refer Owner_ID from OWNER table. b. Add the Foreign Key in OWNER_CAR table to refer Car_Reg_No from CAR table. c. Add an attribute Owner_Address in OWNER table. d. Add an attribute Test_Status of the car which accepts character based values. e. Remove the column Year_Of_Purchase from CAR. f. Remove the column Owner Address from OWNER table. g. Remove the Unique constraint of License_Number attribute. h. Remove the color constraint so that any colored cars can be inserted. i. Add a column Years_Used to OWNER_CAR table which stores the number of years the car used by the owner. j. Remove the table OWNER_CAR from the database completely. k. Change the type of License_Number attribute from character based type to number type.
Expert Answer:
Answer rating: 100% (QA)
Answers The queries are written in SQL as used in Oracle RDBMS I Table Creation I have listed the requirements for creating tables as specified in the question in the table given below Type column in ... View the full answer
Related Book For
Fundamentals of Momentum, Heat and Mass Transfer
ISBN: 978-1118947463
6th edition
Authors: James Welty, Gregory L. Rorrer, David G. Foster
Posted Date:
Students also viewed these physics questions
-
A microchannel reactor is being developed for the reforming of methane gas (CH 4 ) to CO 2 and H 2 gas using steam (H 2 O vapor) at high temperature. Prior to entering the reforming reactor, CH 4...
-
A business student is searching for a used car to purchase, so she posts an ad to a website saying she wants to buy a used Jeep between $18,000 and $20,000. From Kellys BlueBook.com, she learns that...
-
A customer shopping for a used car believes there should be a negative association between the kilometrage a used car has on it and the price of the car. Yet when she runs a correlation, its near 0,...
-
Asset allocation explains a large portion of a portfolio return. However, the implementation issues involved inthe asset allocation process may reduce the efficiency of the asset allocation strategy,...
-
In a new high-efficiency furnace, natural gas, assumed to be 90% methane and 10% ethane (by volume) and 110% theoretical air each enter at 25C, 100 kPa, and the products (assumed to be 100% gaseous)...
-
A gas storage cylinder contains nitrogen at $250 \mathrm{psig}$ and $70^{\circ} \mathrm{F}$. Attached to the cylinder is a 3 in. long $1 / 4$ in. sch 40 stainless steel pipe nipple, and attached to...
-
The usual expansion device used in a window air conditioner is (a) capillary tube (b) automatic expansion valve (c) float valve (d) hand expansion valve
-
Consider the following data for two products of Vigano Manufacturing. Required 1. Using direct labor hours as the basis for assigning overhead costs, determine the total production cost per unit for...
-
The annual incomes for 8 professions are shown below. Form the data, Calculate the following: Profession Farming, fishing, forestry - $ 1 9 , 6 3 0 Sales and related - $ 2 8 , 9 2 0 Architecture and...
-
How would the companys cash needs change for the company in Examples 14-1 to 14-5 if the third project started in May instead of February and the retention was not released until the following year?
-
You want to lean your dad's ladder on a smooth wall if the mass of ladder is 442 kg and coefficient of friction of the floor is 053, What is the minimum angle, at which the ladder does not slip. What...
-
Write a short note on wind energy and its conversion.
-
Define dryness fraction and degree of superheat and show their applications in a steam power plant.
-
Explain briefly air preheater, superheater, and chimney with respect to boilers.
-
Differentiate between (i) Natural circulation and forced circulation in boilers, (ii) Internal fired and external fired boilers, (iii) Fire tube and water tube boilers, and (iv) High-pressure and...
-
In the presence of an electrostatic field, you find that you must do positive work on a proton to move it from point A to point \(\mathrm{B}\) without changing its kinetic energy. (a) Considering...
-
What are the following tests counting and what would they be used to find? RBC count: What is it counting: What is it used for: Reticulocyte count: What is it counting: What is it used for:...
-
Smthe Co. makes furniture. The following data are taken from its production plans for the year. Required: 1. Determine the hazardous waste disposal cost per unit for chairs and for tables if costs...
-
An 8-km-long, 5-m-diameter head race tunnel at the Paute river hydroelectric project in Ecuador supplies a power station 668 m below the entrance of the tunnel. If the tunnel surface is concrete,...
-
The atmospheric density may be approximated by the relation = 0 exp(-y/), where = 22,000 ft. Determine the rate at which the density changes with respect to body falling at v fps. If v = 20,000...
-
A heater composed of Nichrome wire wound back and forth and closely spaced is covered on both sides with 1/8 - in. thickness of asbestos (k = 0.15 Btu/h ft F) and then with a 1/8 -in. thickness of...
-
One molecule of ATP provides 0.30 eV when it is used to power cellular processes. Photosynthesis in a typical plant requires 8 photons at 550 nm to produce 1 molecule of ATP. What is the overall...
-
A study of photosynthesis in phytoplankton in the open ocean used short pulses of laser light to trigger photosynthetic reactions. The investigators system used 0.10 mW pulses of 640 nm laser light...
-
Greg and Jan are married and file a joint tax return. They have two children: Ben and Kelly. Ben, age 20, was a full-time student during the current year and had scholarships of \($12,000.\) Greg and...
Study smarter with the SolutionInn App