0% found this document useful (0 votes)
25 views6 pages

Datamodeling

Uploaded by

cuong.ng.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views6 pages

Datamodeling

Uploaded by

cuong.ng.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

IT4490 – Software Design and Construction

Nguyễn Hùng Cường – 20215264

Conceptual Data Model


Database Design
Logical Data Model

Physical Data Model


- Media

# PK FK Column Name Data Type Mandatory Description

1 x id Integer Yes ID, auto increment

2 category VARCHAR(45) Yes Media type, e.g., CD, DVD

3 price Interger Yes Current price


4 quantity Integer Yes Number of products

5 Title VARCHAR(45) Yes Product name

6 Value Integer Yes Value of the product


7 imageUrl VARCHAR(45) Yes Product image path
- CD

# PK FK Column Name Data Type Mandatory Description


ID, same as ID of Media of which
1 x id Integer Yes
type is CD
2 artist VARCHAR(45) Yes Artist's name

3 recordLabel VARCHAR(45) Yes Record label

4 musicType VARCHAR(45) Yes Music genres

5 releasedDate DATE Yes Release date

- Book

# PK FK Column Name Data Type Mandatory Description


ID, same as ID of Media of which
1 x id Integer Yes
type is Book
2 author VARCHAR(45) Yes Author

3 coverType VARCHAR(45) Yes Cover type


4 Publisher VARCHAR(45) Yes Publishing house

5 publishDate DATE Yes Date of publishing

6 numOfPages Integer Yes Page number

7 Language VARCHAR(45) Yes Language


8 bookCategory VARCHAR(45) Yes Book category

- DVD

# PK FK Column Name Data Type Mandatory Description


ID, same as ID of Media of which
1 x id Integer Yes
type is DVD
2 discType VARCHAR(45) Yes Disc type
3 director VARCHAR(45) Yes Director

4 runtime Integer Yes Duration


5 studio VARCHAR(45) Yes Manufacturer

6 subtitle VARCHAR(45) Yes Subtitles

7 releasedDate DATETIME Yes Release date


# PK FK Column Name Data Type Mandatory Description

8 filmType VARCHAR(45) Yes Genres


- Cart

# PK FK Column Name Data Type Mandatory Description

1 x id Integer Yes ID

- CartMedia

# PK FK Column Name Data Type Mandatory Description

1 x cartId Integer Yes ID


2 x MediaId Integer Yes Disc type
3 price Integer Yes Total price

4 quantity Integer Yes Number of products in cart

- User

# PK FK Column Name Data Type Mandatory Description

1 x username VARCHAR(45) Yes Username

2 password VARCHAR(45) Yes Password


3 email VARCHAR(45) Yes Total price

- Order

# PK FK Column Name Data Type Mandatory Description


1 x id Integer Yes ID
Shipping fees including
2 shippingFees Integer Yes
common order and rush order.

- OrderMedia

# PK FK Column Name Data Type Mandatory Description

1 x orderId Integer Yes ID

2 x mediaId Integer Yes Disc type


# PK FK Column Name Data Type Mandatory Description

3 price Integer Yes Total price

4 quantity Integer Yes Number of products in order

- DeliveryInfo

# PK FK Column Name Data Type Mandatory Description


1 x id Integer Yes ID
Shipping fees including
2 receiverName Integer Yes
common order and rush order.
3 phone VARCHAR(20) Yes Phone Number

4 province VARCHAR(20) Yes Province or City


5 address VARCHAR(50) Yes Address

6 note VARCHAR(100) No Note for shipper

- RushOrder

# PK FK Column Name Data Type Mandatory Description

1 x id Integer Yes ID

- RushOrderMedia

# PK FK Column Name Data Type Mandatory Description

1 x rushOrderId Integer Yes ID


2 x mediaId Integer Yes Disc type

3 price Integer Yes Total price

4 quantity Integer Yes Number of products in order

- Invoice

# PK FK Column Name Data Type Mandatory Description

1 x id Integer Yes ID
Total amount of products you
2 totalAmount Integer Yes
buy
- PaymentTransaction

# PK FK Column Name Data Type Mandatory Description

1 x id Integer Yes ID

2 content VARCHAR(20) Yes Transaction contents

3 method VARCHAR(20) Yes Payment methods

4 createAt VARCHAR(20) Yes Date of creation


5 x cardId Integer Yes ID of used card

- Card

# PK FK Column Name Data Type Mandatory Description


1 x id Integer Yes ID, auto increment
2 cardCode VARCHAR(45) Yes Card code
3 owner VARCHAR(45) Yes Cardholders

4 cvvCode VARCHAR(3) Yes CVV code

5 dateExpired VARCHAR(4) Yes Expiration date

You might also like