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,...
-
Shareholder owns 100% of Lambda Corporation stock and has a $700,000 basis in that stock. Shareholder has owned the stock for several years. Prior to liquidating, Lambda had the following balance...
-
Find the midpoint of the line segment joining the points P 1 and P 2 . P = (4, -3); P = (6, 1)
-
Under what circumstances might a court deny a motion to extend time?
-
Presented below are two independent situations related to future taxable and deductible amounts resulting from temporary differences existing at December 31, 2008. 1. Pirates Co. has developed the...
-
An electronic store can sell q= 12,000 (p+59) - 30 cellular phones at a price p dollars per phone. The current price is $136. (a) Is demand elastic or inelastic at p = 136? (b) If the price is...
-
Use the following payoff table for Hardaway Corporation and Paxton Industries. These two firms must make simultaneous pricing decisions. They can choose low, medium, or high prices. The payoffs given...
-
A spherical shell has an outside radius of 2.60 cm and an inside radius of a. The shell wall has uniform thick- ness and is made of a material with density 4.70 g/cm. The space inside the shell is...
-
Why, in your own words, would an otherwise ethical person make an unethical decision?
-
Suppose events elsewhere in the world lead to an increase in demand for Japanese yen, as investors seek a safe haven for their funds. How would this development affect Japanese exporters and Japans...
-
Suppose you operate a bank in a country where the central bank is expected to embark on a series of interest rate increases. Based on gap analysis, would this scenario be more likely to hurt or help...
-
Why is it sometimes necessary to change leaders to ensure cultural change?
-
1. The United States has a comparatively large but declining number of banks. a. The large number of banks in the United States is explained by restrictions on branching, both within and across state...
-
a) How can the corporate finance discipline help a Chief Financial Officer (CFO) of acompany in performing his or her job responsibilities? (4 marks) b)Discuss the three main areas of concern of...
-
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...
-
The armature of a variable-speed electric motor, of mass \(200 \mathrm{~kg}\), has an unbalance due to manufacturing errors. The motor is mounted on an isolator having a stiffness of \(10 \mathrm{kN}...
-
It is found that an exhaust fan, of mass \(80 \mathrm{~kg}\) and operating speed \(1000 \mathrm{rpm}\), produces a repeating force of \(10,000 \mathrm{~N}\) on its rigid base. If the maximum force...
-
A dishwashing machine weighing \(75 \mathrm{~kg}\) operates at \(300 \mathrm{rpm}\). Find the minimum static deflection of an isolator that provides 60 percent isolation. Assume that the damping in...
Study smarter with the SolutionInn App