Question

Reference: Textbook Minicase MC3, pp. 54. This is a variation of this textbook minicase with an...

Reference: Textbook Minicase MC3, pp. 54. This is a variation of this textbook minicase with an additional constraint included in the list below. Please use the problem description below.)

Snooty Fashions is an exclusive custom fashion designer business. Using ERDplus, create the ER diagram for the Snooty Fashion Operations Database based on the following requirements. Insert the ER diagram as an image below the requirements.

The Snooty Fashions Operations Database will keep track of the following:

For each designer: a unique designer identifier and unique SSN as well as the name (composed of first and last name)

For each customer: a unique customer’s identifier as well as his or her name and multiple phone numbers

For each tailoring technician: a unique SSN as well as his or her name (composed of first and last name)

For each outfit: a unique outfit’s identifier as well as the outfit’s planned date of completion and its unreasonable price

For each fashion show: a unique show identifier as well as the date of the show and location

Each designer designs many outfits. Each outfit has only one designer.

Each outfit is sold (in advance) to exactly one customer. Customers can buy one or many outfits (Snooty Fashions will not keep track of customers that have not made any purchases yet).

For each customer, Snooty Fashions will keep track of the number of outfits that each customer buys.

Each tailoring technician must work on at least one outfit but can work on many. Each outfit has at least one tailoring technician working on it but can have many.

Snooty Fashions will keep track of the date when a tailoring technician started working on a particular outfit.

Each designer can participate in a number of fashion shows, but does not have to participate in any. Each fashion show can feature one or two Snooty Fashions designers (Snooty Fashions will not keep track of fashion shows that do not feature Snooty Fashions designers.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Relational Schema

Customer (CustomerID, Name, HomePhone, OfficePhone)

Technician (SSN, FirstName, LastName)

Designer (DesignerID, SSN, FirstName, LastName)

Outfit (OutfitID, CompletionDate, UnreasonablePrice, DesignerID_FK, CustomerID_FK)

FashionShow (FashionShowID, ShowDate, Location)

OutfitTechnician (OutfitID_FK, TechnicianSSN_FK, DateStarted)

FashionshowDesigner (FashionShowID_FK, DesignerID_FK)

SQL Statements

CREATE TABLE Customer(

CustomerID INT PRIMARY KEY,

Name VARCHAR(40),

HomePhone VARCHAR(15),

OfficePhone VARCHAR(15)

);

CREATE TABLE Technician (

SSN CHAR(11) PRIMARY KEY,

FirstName VARCHAR(20),

LastName VARCHAR(20)

);

CREATE TABLE Designer(

DesignerID INT PRIMARY KEY,

SSN CHAR(11),

FirstName VARCHAR(20),

LastName VARCHAR(20)

);

CREATE TABLE Outfit (

OutfitID INT PRIMARY KEY,

CompletionDate DATE,

UnreasonablePrice NUMERIC(5, 2),

DesignerID INT NOT NULL,

CustomerID INT NOT NULL,

CONSTRAINT fk_OutfitDsgnr FOREIGN KEY(DesignerID)

REFERENCES Designer(DesignerID),

CONSTRAINT fk_OutfitCstmr FOREIGN KEY(CustomerID)

REFERENCES Customer(CustomerID)

);

CREATE TABLE FashionShow (

FashionShowID INT PRIMARY KEY,

ShowDate DATE,

Location VARCHAR(50)

);

CREATE TABLE OutfitTechnician (

OutfitID INT NOT NULL,

TechnicianSSN CHAR(11) NOT NULL,

DateStarted DATE,

CONSTRAINT pk_OutfitTech PRIMARY KEY(OutfitID, TechnicianSSN),

CONSTRAINT fk_OutfitTechOy FOREIGN KEY(OutfitID)

REFERENCES Outfit(OutfitID),

CONSTRAINT fk_OutfitTcn FOREIGN KEY(TechnicianSSN)

REFERENCES Technician(SSN)

);

CREATE TABLE FashionshowDesigner(

FashionShowID INT NOT NULL,

DesignerID INT NOT NULL,

CONSTRAINT pk_FsnDsgnr PRIMARY KEY(FashionShowID, DesignerID),

CONSTRAINT pk_OutfitTech PRIMARY KEY(OutfitID, TechnicianSSN),

CONSTRAINT fk_FsnDgnr FOREIGN KEY(FashionShowID)

REFERENCES FashionShow(FashionShowID),

CONSTRAINT fk_FsnSDgnrDsn FOREIGN KEY(DesignerID)

REFERENCES Designer(DesignerID)

);

Data Insertion

INSERT INTO Customer

VALUES(1, 'John', '6586552255', '9952222285');

INSERT INTO Customer

VALUES(1, 'Greg', '8525542587', '9875879875');

INSERT INTO Technician

VALUES('546-40-3047', 'Waylon', 'Dalton');

INSERT INTO Technician

VALUES('307-13-9416', 'Justine', 'Henderson');

INSERT INTO Designer

VALUES(1, '654-18-5942', 'Abdullah', 'Lang');

INSERT INTO Designer

VALUES(2, '518-54-1723', 'Marcus', 'Cruz');

INSERT INTO Outfit

VALUES(1, '2017-01-26', 50.45, 1, 2);

INSERT INTO Outfit

VALUES(2, '2017-02-18', 30, 2, 1);

INSERT INTO FashionShow

VALUES(1, '2017-05-17', 'New Delhi');

INSERT INTO FashionShow

VALUES(2, '2017-10-20', 'New York');

INSERT INTO OutfitTechnician

VALUES(1, '546-40-3047', '2016-11-20');

INSERT INTO OutfitTechnician

VALUES(2, '307-13-9416', '2016-10-07');

INSERT INTO OutfitTechnician

VALUES(2, '546-40-3047', '2016-11-2');

INSERT INTO FashionshowDesigner

VALUES(1, 2);

INSERT INTO FashionshowDesigner

VALUES(1, 1);

INSERT INTO FashionshowDesigner

VALUES(2, 2);

SQL query with Union statement

SELECT Name FROM Customer

UNION

SELECT FirstName + ' ' + LastName AS Name FROM Designer;

SQL query with Join

SELECT D.FirstName + ' ' + D.LastName AS Designer, OutfitID, CompletionDate

FROM Outfit O JOIN Designer D

ON O.DesignerID = D.DesignerID;

SQL query with Update

UPDATE FashionShow

SET Location = 'Vegas'

WHERE FashionShowID < 3;

SQL Intersection query

SELECT DesignerID

FROM Outfit

INTERSECT

SELECT DesignerID

FROM FashionshowDesigner;

SQL Difference query

SELECT DesignerID

FROM Outfit

MINUS

SELECT DesignerID

FROM FashionshowDesigner;

Add a comment
Know the answer?
Add Answer to:
Reference: Textbook Minicase MC3, pp. 54. This is a variation of this textbook minicase with an...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Snooty Fashions is an exclusive custom fashion designer business. Below are the Requirements of Snooty Fashions....

    Snooty Fashions is an exclusive custom fashion designer business. Below are the Requirements of Snooty Fashions. The Snooty Fashions Operations Database will keep track of the following: • For each designer: a unique designer identifier and unique SSN as well as the name (composed of first and last name) • For each customer: a unique customer’s identifier as well as his or her name and multiple phone numbers • For each tailoring technician: a unique SSN as well as his...

  • House of Rock is a rental business that rents musical instruments to bands. Create an ER...

    House of Rock is a rental business that rents musical instruments to bands. Create an ER diagram using erdplus.com for the House of Rock Operations Database, based on the following requirements. Use the Export Image command under the Diagram pull-down to generate a .png file. Upload the .png file to submit this assignment in Blackboard. The House of Rock Operations Database will keep track of instruments, bands, repair technicians, and shows. For each instrument, House of Rock will keep track...

  • 1) Create Conceptual Schema Diagram 2) Create a fully attributed Loagical Data Model Diagram 3) Create...

    1) Create Conceptual Schema Diagram 2) Create a fully attributed Loagical Data Model Diagram 3) Create the SQL script that will generate the data model Develop an EER model for the following situation using the traditional EER notation, the Visio notation, or the subtypes inside supertypes notation, as specified by your instructor: Wally Los Gatos and his partner Henry Chordate have formed a new limited partnership, Fin and Finicky Security Consultants. Fin and Finicky consults with corporations to determine their...

  • Assignment 4 provides practice with applying the ERD notation to narrative problem descriptions. This assignment involves...

    Assignment 4 provides practice with applying the ERD notation to narrative problem descriptions. This assignment involves problems 20, 33, 34, 35, and 36 on Page 224 in the textbook (Chapter 6). Plan to use the drawing tool of your choice to create the ERD then copy and paste each ERD into a Word document. Label the problems in your Word document to match the problem in the textbook. Problems 33 to 36 are worth 15% each. Problem 20 is worth...

  • Wally Los Gatos and his partner Henry Chordate have formed a new limited partnership, Fin and...

    Wally Los Gatos and his partner Henry Chordate have formed a new limited partnership, Fin and Finicky Security Consultants. Fin and Finicky consults with corporations to determine their security needs. You have been hired by Wally and Henry to design a database management system to help them manage their business. Due to a recent increase in business, Fin and Finicky has decided to automate their client tracking system. You and your team have done a preliminary analysis and come up...

  • For this DATABASE homework assignment you will create an Entity Relationship model for a business case...

    For this DATABASE homework assignment you will create an Entity Relationship model for a business case and then convert the model to a set of relations.  Read through the following business case for the “Drum Corps International”  Create an Entity relationship model with the necessary entities, attributes, identifiers and relationships to capture the data requirements.  All relationships should be labeled with verb phrases.  Use UML notation for this work.  Relationship lines should not cross. ...

  • This is extra information about the shopping database given to answer this question: For many query...

    This is extra information about the shopping database given to answer this question: For many query questions we refer to the following database schema for a website that keeps track of what people like to buy or actually buy in different on-line supermarkets. (Think of something like a cross-store loyalty card system.) customer(cID, cName, street, city) Customers with unique cID and other attributes store(sID, sName, street, city) Stores with a unique ID and other attributes. Stores with the same name...

  • Please summarize the case in 2-3 paragraphs. Marketing Excellence Target In the mid-1980s, then-dominant Kmart and up-a...

    Please summarize the case in 2-3 paragraphs. Marketing Excellence Target In the mid-1980s, then-dominant Kmart and up-and-coming Walmart were both communicating their low-price promise, but their merchandise was perceived as cheap and low quality. Target, founded in 1962, sensed a gap in the market for "cheap chic" mass retail and set out to distinguish itself from the other big-box retailers by building an up-market cachet for its brand without losing its relevance for price-conscious consumers. Through careful merchandising and a...

  • Need help answering these We will do this one as a Word document or pencil and...

    Need help answering these We will do this one as a Word document or pencil and paper. The instructor will tell you how it is to be turned in when it is assigned. The instructor may also adjust the exercise's weight in points for Canvas. I expect that it will be either a Word document or a well drafted, neat pen and paper drawing. 1) Design a database diagram for a product orders database with four tables. Indicate the relationships...

  • 3 (16) You are hired to build a database for a local association of realtors. The database has to...

    3 (16) You are hired to build a database for a local association of realtors. The database has to contain information about the properties that are for sale in the area, realty agencies and agents, as well as keep track of the history of property sales. In particular, you are told the following about the desired database: o The database has to contain information about the realty agencies. Each agency has an ID, name, address and a phone number The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT