书店的 ER 图

ER diagram for a bookstore

我有一个 book store application,我想设计它的数据库。那么首先我需要它的 E-R 图。

(This is not homework)

它有这么简单的场景:

这是最好的设计吗?

书籍和订单之间应该有一个 link,而不是书籍和订单。 'orders'table应该是中央的table。一个简单的结构是

CUSTOMERS
id
name
adddress, etc

ORDERS
id
customer  (foreign key to customers table)
curdate
status  (open, closed)
% discount

ORDERITEMS
id
order    (foreign key to orders table)
book     (foreign key to books table)
quantity
price    
% discount
status (open, closed, ordered from distributor?)

BOOKS
id
title
author
costprice
salesprice
isbn