Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an ER diagram based on the customer sales invoice and the product attribute list. Include many-to-many relationships: Entities Attributes (mandatory or optional) Unique Identifiers

  • Create an ER diagram based on the customer sales invoice and the product attribute list. Include many-to-many relationships:
    • Entities
    • Attributes (mandatory or optional)
    • Unique Identifiers
    • Relationship cardinality
    • Optionality
    • Identifying and non-identifying relationships
    • Foreign Keys
    • Named Relationships
    • ERD language
  • Additional requirements:
    • The company operates warehouses in different regions of the country
    • Each warehouse stores products and each product may be stored at each warehouse. Not all products are stored at each warehouse. In addition, a warehouse could store a product, but be out of stock of that product. The company wants to maintain the inventory of each product at each warehouse.
ER Diagram including M:M Relationships Resolved
  • Create a second ER diagram with many-to-many relationships resolved
Week 7 Identify Business Rules
  • Create a table (Word or Excel) in the DB1 Word document that lists each database table, column, and constraint
  • Your database MUST include the following constraints:
    • NOT NULL
    • DEFAULT
    • Primary key
      • Primary key of the CUSTOMERS table is an IDENTITY auto generated column
      • Primary key of the ORDERS table is a SEQUENCE auto generated column
    • Unique key
    • Foreign key
    • Check constraint
DDL Database Constraint Statements
  • Use the ALTER TABLE statement to create the constraints identified in the business rules
  • The NOT NULL constraints may be defined at the column level
Database Constraint Testing
  1. Include at least the following constraint testing:
    1. NOT NULL (1)
    2. DEFAULT (1)
    3. Primary keys (2)
    4. Unique keys (1)
    5. Foreign keys (4)
    6. CHECK constraints (at least three, but test all CHECK constraints)
  2. Test each constraint and provide unit-testing documentation:
    1. Provide a test that validates valid data is accepted
    2. Provide a test that validates invalid data is refused. For constraints such as ranges, test the upper and lower ranges. In other words, verify that all conditions work correctly.

 



Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

How can emotions cause communication breakdown?

Answered: 1 week ago