Preview

IST223-GHW7FS13

Powerful Essays
Open Document
Open Document
2215 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
IST223-GHW7FS13
Group Project Homework [78 pts]

Note: This assignment can become very large, due to the screen shots. Use trimming and compression to keep it at a manageable size.

Suppose that you have designed a database for Marcia's Dry Cleaning that has the following tables:
CUSTOMER (CustomerID, FirstName, LastName, Phone, Email)
ORDER (InvoiceNumber, CustomerID, DateIn, DateOut, Subtotal, Tax, TotalAmount)
ORDER_ITEM (InvoiceNumber, ItemNumber, Service, Quantity, UnitPrice, ExtendedPrice)
SERVICE (Service, Description, UnitPrice)

Add the prefix "HW7G_" to each table name.

Do parts A through M as given below. Those that involve SQL should be written in SQL*Plus and run, unless indicated otherwise.
Include screen shots of the results of your runs.
Note: This database has unnecessary duplicated data, which the owner wants to keep.

Here is a crow's foot diagram of the relationships that helps answer some parts:

A. Specify NULL/NOT NULL constraints for each table column. Also specify alternate keys, if any. Use the following table form. (Note: This is a big table, since every column of every table appears as a row.)

Table
Column
NULL/NOT NULL
Alternate Key?
Customer
CustomerID
NOT NULL
No
Customer
Phone
NOT NULL
Yes
Customer
Email
NULL
Yes
Customer
FirstName
NOT NULL
No
Customer
LastName
NOT NULL
No
Order
InvoiceNumber
NOT NULL
No
Order
Date
NOT NULL
No
Order
CustomerID
NOT NULL
No
Order
Subtotal
NULL
No
Order
Tax
NULL
No
Order
Total
NULL
No
Order_Item
InvoiceNumber
NOT NULL
No
Order_Item
ItemNumber
NOT NULL
No
Order_Item
Quantity
NOT NULL
No
Order_Item
Service
NOT NULL
No
Order_Item
UnitPrice
NULL
No
Order_Item
ExtendedPrice
NULL
No
Service
Service
NOT NULL
No
Service
Description
NOT NULL
No
Service
UnitPrice
NOT NULL
No

B. State relationships as implied by foreign keys and specify the maximum and minimum cardinality of each relationship. Justify your

You May Also Find These Documents Helpful

  • Satisfactory Essays

    16 F | You should limit repetition of attributes to the repetition of the primary key as a foreign key in a related table.…

    • 313 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    It203 Homework 5

    • 319 Words
    • 2 Pages

    When you have your Foreign Keys set up correctly, and have Cascade Update & Cascade Deletes set as needed, that's just about all you really need to do. It is used to make sure that data doesn't get orphaned.…

    • 319 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 4

    • 1142 Words
    • 5 Pages

    4. Lynn is adding a billing table to a customer database. If she wants the database to retrieve…

    • 1142 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    IS3110 U5L1

    • 912 Words
    • 4 Pages

    One of the most important first steps to risk management and implementing a security strategy is to identify all resources and hosts within the IT infrastructure. Once you identify the workstations and servers, you now must then find the threats and vulnerabilities found on these workstations and servers. Servers that support mission critical applications require security operations and management procedures to ensure C-I-A throughout. Servers that house customer privacy data or intellectual property require additional security controls to ensure the C-I-A of that data. This lab requires the students to identify threats and vulnerabilities found within the Workstation, LAN, and Systems/Applications Domains.…

    • 912 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    IS3110 U5D1

    • 712 Words
    • 3 Pages

    This is a lot like hardening the OS in respect that you are making sure that software stays up to date to ensure that known exploits are being addresses. Any unnecessary applications, services, or scripts that are installed should be removed immediately once the installation process is complete. Below are some things that you can do to harden software.…

    • 712 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    cis3730_Exam1_Studyguide

    • 512 Words
    • 2 Pages

    Given a table or a set of tables, be able to specify their primary keys and foreign keys.…

    • 512 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    IAT210W05

    • 688 Words
    • 10 Pages

    IAT 210 – Week 5 Summer 2014 Group Work Let’s play some games Go to http://www.classicgamesarcade.com/ Pick five games and answer the following: Arcade Games  What are the game objects?…

    • 688 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt2520 Final Answers 1/3

    • 329 Words
    • 2 Pages

    what best describes the function of a foreign key. the primary key repeated in another table to show relation…

    • 329 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Defining a(n) primary key in a second table creates a relationship between that table and the table where the primary key was first defined. _________________________…

    • 585 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    week 4 Discussion 1

    • 447 Words
    • 2 Pages

    Optimal database design recognizes proper organization of table structures and relationships. Suggest at least two methods that can be used to improve the design of a database system.…

    • 447 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Music

    • 1176 Words
    • 5 Pages

    | Primary Key – may contain alpha and numeric. You create this, do not use autonumber.…

    • 1176 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    Discussion Board

    • 460 Words
    • 2 Pages

    I need to complete this assignment but I am having a hard time understanding it. Can someone give me some pointers on what to write on the DB? I just need a guide to start off with.…

    • 460 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    * Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).…

    • 415 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    JDBC using MySQL

    • 10167 Words
    • 41 Pages

    ////////////////////////////////////////////////////////////////////////////////////////////////// CREATE DATABASE Company; USE Company; CREATE TABLE Customer( id VARCHAR(6) NOT NULL, name VARCHAR(30), address VARCHAR(30), salary DECIMAL(10,2), CONSTRAINT PRIMARY KEY (id) )ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE Orders( id VARCHAR(6) NOT NULL, date DATE, customerId VARCHAR(6) NOT NULL, CONSTRAINT PRIMARY KEY (id), CONSTRAINT FOREIGN KEY(customerId) REFERENCES Customer(id) )ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE Item( code VARCHAR(6) NOT NULL, description VARCHAR(50), unitPrice DECIMAL(8,2), qtyOnHand INT(5), CONSTRAINT PRIMARY KEY (code) )ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE OrderDetail( orderId VARCHAR(6) NOT NULL, itemCode VARCHAR(6) NOT NULL, qty INT(11), unitPrice DECIMAL(8,2), CONSTRAINT PRIMARY KEY (orderId,itemCode), CONSTRAINT FOREIGN KEY (orderId) REFERENCES Orders(id), CONSTRAINT FOREIGN KEY (itemCode) REFERENCES Item(code) )ENGINE=InnoDB DEFAULT CHARSET=latin1; ///////////////////////////////////////////////////////////////////////// INSERT INTO Customer VALUES( 'C001 ', 'Danapala ', 'Panadura ',54000);…

    • 10167 Words
    • 41 Pages
    Better Essays
  • Powerful Essays

    Informatica self learning

    • 1626 Words
    • 7 Pages

    Let us say, you have 10 rows in the source and one of the columns has to be…

    • 1626 Words
    • 7 Pages
    Powerful Essays

Related Topics