Anda di halaman 1dari 2

MIS 311 Project 1 RETAIL

Austin Easler

10/18/2017

Entity Relations Diagram Galore Books

User ID Age

Date of Birth Credit Card


Number Email
Address
Street

First Book
Address City Category
Cost of the
Book Title
Book
Name
State

Last
Users
Interact
[0:M] [0:M] Product
With

C
Product ID

Product ID
Seller Buyer

Transaction
User ID

Reputation Genre
User ID User ID Number of
Points Preference
Total Items
Start Time
Transaction

Relations

1) USERS(UsersNameFirst, UsersNameLast, UserDate_of_Birth, UserID, UsersCredit_Card_Number,


UsersAge, UsersEmail_Address, UsersAddressStreet, UsersAddressCity, UsersAddressState)
FK (User ID) Ref Users

2) SELLER(UserID, SellerReputation_Points) FK (User ID) Ref Users

3) BUYER(UserID, BuyerGenre_Preference) FK (User ID) Ref Users

4) PRODUCT(ProductID, ProductBook_Title, ProductBook_Category, ProductCost_of_the_Book)


FK (Product ID) Ref Product

5) TRANSACTION((UserID, ProductID, TransactionTotal_Transaction, TransactionStart_Time,


TransactionNumber_of_Items)
FK (User ID) Ref Users, (Product ID) ref Product
Schema Construct Domain Name Field Type Attributes/Constraints

USERS
UsersNameFirst First Name Character (25) Not Null
UsersNameLast Last Name Character (25) Not Null
UserDate_of_Birth Date of Birth Date: Format mm/dd/yy
UserID User ID Character (6) Auto Generating Primary Key
(User ID); Not Null
UsersCredit_Card_Number Credit Card Number Integer (16 digits) Not Null
UsersAge Age Integer (2 digits)
UsersEmail_Address Email Character (100)
UsersAddressCity City Character (30)
UsersAddressState State Character (20)
UsersAddressStreet Street Character (30)
SELLERS
UserID User ID Character (6) Composite Primary Key. Foreign
Key (User ID) References USERS
(User ID)
SellerReputation_Points Reputation Points Integer (4 digits)
BUYERS
UserID User ID Character (6) Composite Primary Key. Foreign
Key (User ID) References USERS
(User ID)
BuyerGenre_Preference Genre Preference Character (50)
PRODUCT
ProductID Product ID Character (7) Auto Generating Composite
Primary Key (Product ID); Not
Null
ProductBook_Title Book Title Character (50) Not Null
ProductBook_Category Book Category Character (50)
ProductCost_of_the_Book Cost of Book Monetary (3 digits) Not Null
TRANSACTION
UserID User ID Character (6) Composite Primary Key. Foreign
Key (User ID) References USERS
(User ID)
Composite Primary Key. Foreign
Key (Product ID); Not Null
TransactionTotal_Transaction Total Transaction Monetary (4 digits) Not Null
TransactionStart_Time Start Time Date: Format mm/dd/yy Not Null
TransactionNumber_of_Items Number of Items Integer (3 digits) Not Null

The Data above is all written to 3NF (as the Entity Relationship Diagram is drawn to). The Functional
Dependencies are Users -> Seller, Buyer, Transaction, all of which are separated. From that within Partial
Dependencies are within the attributes of each Entity. All the attributes are already separated by partial
dependencies on the ER diagram. From partial dependencies to transitional dependencies, the data is
already in the format of transitional dependencies so further separation is not required.

Anda mungkin juga menyukai