工作笔记 – 表在内存级别内的表现形式

Product  番茄炒蛋 孜然羊肉 葱爆肚丝

Orders Product  (番茄炒蛋,丽丽,2份,不放糖)(番茄炒蛋,方方,3份)(孜然羊肉,丽丽,1份)

Orders 丽丽, 方方

对应关系为 PRODUCT M N ORDERS; PRODUCT 1 M ORDERS PRODUCT; ORDERS PRODUCT M 1 ORDERS

所以可以在PRODUCT里有一张LIST<ORDERS PRDUCT>,可以立马得出这个PRODUCT出现在了哪些ORDERS里。

也可以在ORDERS里加一个LIST<ORDERS PRODUCT>,这样搜一个ORDER,可以看里面有哪些PRODUCT。

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s