【发布时间】:2019-04-18 21:37:48
【问题描述】:
我是数据库设计的新手,所以我有点不确定我是否在这里做事。
我正在为假摩托车租赁服务创建一个数据库。以下是会影响我的数据库的事件:
如果有新客户进入商店:
Store customer info,
If they were referred:
Make note of name of referrer
如果以前的客户进入:
Retrieve previous customer info,
**If this customer has an un-returned scooter, they can't borrow another
如果客户租用滑板车,请跟踪:
Date/hour of borrow,
Date/hour of return,
How much paid,
Freeform notes that are categorized, ie Issues while scooter is returned or when used
当滑板车归还时:
When it was returned,
Is return late,
Is scooter damaged,
Additional fees for damage / late return
我将对数据库进行的查询:
所有有旗帜的人,
所有可用的踏板车,
所有借来的滑板车,
所有迟到的踏板车,
推荐次数排名前 5 的人,
对于一个人,显示该人借过滑板车的所有时间,
对于借款实例,请显示任何额外费用,并且
所有滑板车制造商
这是我想出的(还不是实际的图表,只是不同的表和关系),完全不确定这是否在正确的轨道上: https://imgur.com/a/NzqB0CE
【问题讨论】:
-
为了评论 Schema,我需要查看主要查询。
-
我相信我已经在操作中列出了它们
标签: mysql sql database database-design entity-relationship