You are on page 1of 30

OrderInvoice of The Bread Box

BranchID
1
1
1
OrderInvoice of The Bread Box
Branch Address BranchPhNum
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon 09789888222
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon 09789888222
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon 09789888222
OrderNum OrderDate StaffID StaffName CustomerID CustomerName
IVN001 30/5/2022 1001 Kyaw Kyaw C001 Yamin
IVN002 30/5/2023 1001 Kyaw Kyaw C002 Yamin
IVN003 30/5/2024 1001 Kyaw Kyaw C003 Yamin
CustomerAddress CustomerTownship CustomerPhNum
No.28,Hnin Se Str., Moe Kaung Road, Yangon Yankin 09765866444
No.28,Hnin Se Str., Moe Kaung Road, Yangon Yankin 09765866444
No.28,Hnin Se Str., Moe Kaung Road, Yangon Yankin 09765866444
CustomerEmail ItemID ItemDescription CategoryID ItemCategory
yamin@gmail.com B001 Jam Doughnut A001 Doughnut
yamin@gmail.com B004 Chocolate Chip Muffin A004 Muffin
yamin@gmail.com B010 Brown Finger Roll A010 Losse Rolls
Price Quantity Discount Tax DeliveryDate DeliveryTime Delivery Fees
500 3 0% 5% 30/5/2022 11:00 AM 2500
1000 2 0% 5% 30/5/2023 11:00 AM 2500
1800 2 0% 5% 30/5/2024 11:00 AM 2500
OrderInvoice of The B
Order
Composite Primary Key(Ord
OrderNum(FK)
IVN001
IVN001
IVN001

BranchID
1
OrderInvoice of The Bread Box
Order
Composite Primary Key(OrderNum, ItemID)
ItemID(PK)
B001
B004
B010

Branch Address
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon
derInvoice of The Bread Box
Order
te Primary Key(OrderNum, ItemID)
CategoryID ItemDescription ItemCategory Price Qty
A001 Jam Doughnut Doughnut 500 3
A004 Chocolate Chip Muffin Muffin 1000 2
A010 Brown Finger Roll Loose Rolls 1800 2

orderDetail
BranchPhNum OrderNum(PK) OrderDate StaffID StaffName
09789888222 IVN001 30/5/2022 1001 Kyaw Kyaw
erDetail
CustomerID CustomerName CustomerAddress
C001 Yamin No.28,Hnin Se Str., Moe Kaung Road, Yangon
CustomerTownship CustomerPhNum DeliveryDate DeliveryTime DeliveryFees
Yankin 09765866444 30/5/2022 11:00 AM 2500
OrderInvoice of The Bread Box
Order
Composite Primary Key(OrderNum, ItemID)
OrderNum(FK)
IVN001
IVN001
IVN001

BranchID
1

Item
ItemID(FK)
B001
B004
B010
OrderInvoice of The Bread Box
Order
Composite Primary Key(OrderNum, ItemID)
ItemID(FK)
B001
B004
B010

Branch Address
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon

Item
CategoryID
A001
A004
A010
ID)
Qty
3
2
2

BranchPhNum OrderNum OrderDate


09789888222 IVN001 30/5/2022

Item
ItemDescription ItemCategory Price
Jam Doughnut Doughnut 500
Chocolate Chip Muffin Muffin 1000
Brown Finger Roll Loose Rolls 1800
orderDetail
StaffID StaffName CustomerID CustomerName
1001 Kyaw Kyaw C001 Yamin
CustomerAddress CustomerTownship CustomerPhNum
No.28,Hnin Se Str., Moe Kaung Road, Yangon Yankin 09765866444
CustomerEmail Discount Tax DeliveryDate DeliveryTime DeliveryFees
yamin@gmail.com 0% 5% 30/5/2022 11:00 AM 2500
OrderInvoice of The Bread Box
Order
OrderNum(FK)
IVN001
IVN001
IVN001

orderDetail
BranchID(FK)
1

Item
ItemID(PK)
B001
B004
B010

Customer
CustomerID(PK)
C001

Staff
StaffID(PK)
1001

Branch
BranchID(PK)
1

Category
CategoryID(PK)
A001
A004
A010
OrderInvoice of The Bread Box

ItemID(FK)
B001
B004
B010

StaffID(FK)
1001

ItemDescription
Jam Doughnut
Chocolate Chip Muffin
Brown Finger Roll

CustomerName
Yamin

StaffName
Kyaw Kyaw

Branch Address
No.216, Shop-house Building 2B, Times City Complex,Kamayut Township, Yangon

Category
ItemCategory
Doughnut
Muffin
Loose Rolls
Qty
3
2
2

CustomerID(FK) OrderNum(PK) OrderDate


C001 IVN001 30/5/2022

Price
500
1000
1800

CustomerAddress CustomerTownship CustomerPhNum


No.28,Hnin Se Str., Moe Kaung Road, Yangon Yankin 09765866444

BranchPhNum
09789888222
Discount Tax DeliveryDate DeliveryTime DeliveryFees
0% 5% 30/5/2022 11:00 AM 2500

CustomerEmail
yamin@gmail.com
Table Name Order
Attributes DataType Null/Not Null Constraints

Foreign Key,
OrderNum char(6) Not Null Composite Primary
Key

Foreign Key,
ItemID char(4) Not Null Composite Primary
Key
Quantity int Not Null Default

Table Name Order Detail


Attributes DataType Null/Not Null Constraints
BranchID int Not Null Foreign Key

StaffID int Not Null Foreign Key

CustomerID char(4) Not Null Foreign Key

OrderNum char(6) Not Null Primary Key, Check

OrderDate date Not Null


Discount decimal Not Null
Tax decimal Not Null
DeliveryDate date Not Null
DeliveryTime time Not Null
DeliveryFees money Not Null

Table Name Branch


Attributes DataType Null/Not Null Constraints

BranchID int Not Null Primary Key

BranchAddress varchar(200) Not Null


BranchPhNum varchar(14) Not Null check

Table Name Item


Attributes DataType Null/NotNull Constraint

ItemID char(4) Not Null Primary Key, Check

ItemDescription varchar(50) Not Null


Price money Not Null

Table Name Customer


Attributes DataType Null/Not Null Constraints

CustomerID char(4) Not Null Primary Key, Check

CustomerName varchar(50) Not Null


CustomerAddress varchar(200) Not Null
CustomerTownship varchar(50) Not Null

CustomerPhNum varchar(14) Not Null Check

CustomerEmail varchar(50) Null Check

Table Name Staff


Attributes DataType Null/Not Null Constraints
StaffID int Not Null Primary key

StaffName varchar(50) Not Null

Table Name CategoryDetails


Attributes DataType Null/Not Null Constraints

CategoryID char(5) Not Null Primary Key, Check

ItemCategory varchar(25) Not Null


Description

* OrderNum will be saved in this column.


* Reference from'OrderNum' column from 'Order' table.

* ItemID wll be saved in this column.


* Reference from 'ItemID' column from 'Item' table.

* Item quanities will be saved in this column. *Defined as 1.

Description
* BranchID will be saved in this column.
* Reference from 'BranchID' column of 'Branch' table.
* StraffID will be saved in this column.
* Reference from 'StaffID' column of 'Staff' table.
* CustomerID will be saved in this column.
* Reference from 'CustomerID' column of 'Customer' table.

* OrderNum will be saved in this column.


* Primary key constraint will be applied to this column to store unique data.
* Format is ‘IVN001’. Key constraint will be applied to this column. Check key
constraint is ‘IVN[0-9][0-9][0-9]'

* OrderDate will be saved in this column.


*Discount will be saved in this column.
* Tax will be saved in this column.
* DeliveryDate will be saved in this column.
* DeliveryTime will be saved in this column.
* DeliveryFees will be saved in this column.

Description

* BranchID will be saved in this column.


* Primary key constraint will be applied to this column to store unique data.
* Auto increasement value.

* Branch Address will be saved in this column.


* Branch Phone will be saved in this column.
* Format is ‘09789 888222’. Check key constraint will be applied to this
column. Check key constraint is ‘09[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'

Description

* ItemID will be saved in this column.


* Primary key constraint will be applied to this column to store unique data.
* Format is ‘B001’. Check key constraint will be applied to this column. Check
key constraint is ‘B[0-9][0-9][0-9]'

* ItemDescription will be saved in this column


* Item Price will be saved in this column

Description

* CustomerID will be saved in this column.


* Primary key constraint will be applied to this column to store unique data.
* Format is ‘C001’. Check key constraint will be applied to this column. Check
key constraint is ‘C[0-9][0-9][0-9]'

* CustomerName will be saved in this column.


* CustomerAddress will be saved in this column.
* CustomerTownship will be saved in this column.

* CustomerPhone will be saved in this column.


* Format is ‘09765866444’. Check key constraint will be applied to this column.
Check key constraint is ‘09[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'

* CustomerEmail will be saved in this column. Key constraint is [a-z]

Description
* StraffID will be saved in this column.
* Primary key constraint will be applied to this column to store unique data.
* Format is ‘1001’. Check key constraint will be applied to this column. Check
key constraint is ‘[0-9][0-9][0-9][0-9]'

* StaffName will be saved in this column.

Description

* CategoryID will be saved in this column.


* Primary key constraint will be applied to this column to store unique data.
* Format is ‘A001’. Check key constraint will be applied to this column. Check
key constraint is ‘A[0-9][0-9][0-9]'

* ItemCategory will be saved in this column.

You might also like