Primary keys and referential integrity constraints

Assignment Help Basic Computer Science
Reference no: EM13928492

Assignments 2
1. Items 1A - 1C refer to a database that keeps track of automobile and option sales in a car dealership. CAROPTION refers to some optional equipment installed on an automobile that is sold. You will create the database in Oracle.

The ERD, the conceptual model of the database, contained the following:
- three entities: SALESPERSON, CAR and CAROPTION
- The ternary relationship, among the entities SALESPERSON, CAR and CAROPTION
The relations (tables) of the database are listed below. The primary key of each relation is shown in bold, underline and italics lettering.
CAR(SerialNo, Model, Manufacturer, List_Price)
CAROPTION(OptionNo, OptionName, List_Price)
CARSALE(SalespersonId, SerialNo, Date, Car_Sale_price)
OPTIONSALE(SalespersonId, SerialNo, OptionNo, Option_Sale_price)
SALESPERSON(SalespersonId, Name, Phone)

1A. Give the DDL commands to create the tables, primary keys and referential integrity constraints. The DDL must have at least an example of each of the following. Use comments to indicate the examples.
1. Not Null check constraint
2. Column check constraint
3. Table check constraint
4. Column default value
5. Table-level constraint
6. Check constraint
DDL:

1.B  Provide the DML and logs that show that you populated the database with the data shown below.
Car

SerialNo Model Manufacturer List_Price
ABC LX Kia 19,000
BCD EX Kia 19,500
EFG SX Kia 26,000
SALESPERSON

SalespersonId Name Phone
101 John 555-555-5555
102 Paul 555-556-5678
103 Mary 555-678-7890
OPTION

OptionNo OptionName List_Price
1 2.4-liter 2,000
2 2.0-liter turbo 3,000
3 Sun roof 1,000
CARSALE

SalespersonId SerialNo Date Car_Sale_price
101 ABC 10/16/2011 18,500
101 BCD 10/16/2011 21,000
102 EFG 10/16/2011 25,500
OPTIONSALE

SalespersonId SerialNo OptionNo Option_Sale_price
101 ABC 1 1,500
101 ABC 3 1,000
102 EFG 2 2,500
102 EFG 3 750

DML:

1.C. 1.  Do a search to find out the name of a salesperson who sold a car on 10/16/2011 for 25,500.
1C.2.  Find out what kind of model and manufacturer the car that was sold was.

Reference no: EM13928492

Questions Cloud

Importance of ethics in the workplace : Identify and discuss the importance of ethics in the workplace. What do you think the business world would be like without them? Why?
Ways to change the course of a brand : One of the ways to change the course of a brand is to modify the product. Under product modification, ________ adds size, weight, materials, supplements, and accessories that expand the product's performance, versatility, safety, or convenience.
Calculate the amount of gain or loss : Calculate the amount of gain or loss from the sale of the asset under each of the depreciation methods.
Strategic planning-decision making : Explain the basic steps in the planning process. Describe the steps in the decision-making process and predict how the personal attributes of the manager influence decision making.
Primary keys and referential integrity constraints : Give the DDL commands to create the tables, primary keys and referential integrity constraints. The DDL must have at least an example of each of the following. Use comments to indicate the examples.
How a bond can be classified as a fixed-income security : Explain how a bond can be classified as a fixed-income security when the yield to maturity can fluctuate significantly over time, depending on the market price of the bond.
Explain how logistics performance crucial to jit philosophy : How can strategic procurement contribute to the quality of products produced by a manufacturing organization? Explain how logistics performance is crucial to a Just In Time (JIT) philosophy.
Elements of an organization external environment : Describe the elements of an organization's external environment. Why is it important to understand the external environment?
What was the dollar amount of the price change on the bond : How much would you have to pay for one of these $1,000 face value bonds? What was the dollar amount of the price change on this bond?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd