数据建模往往和数据架构有关
数据模型是一种展示,方便人们更好理解数据,也能描绘出内在逻辑结构,和影响。
好的数据模型要完整,不冗余,贯彻业务规则,模型能够重用,稳定性,有弹性,最后是美观(优雅elegance)
做数据模型需要先找实体(who,what,when,where,why,how)
normalization:通俗的解释:1,put the data into tabular form(removing repeated groups)
2,remove duplicated data to separate tables
One fact one column!!!
KEY 是表格里能被唯一识别的,经常作为一个表格的column。
NF越高表格分的越细越简洁
superkey ——符合唯一性都叫超键
没有被选中的:alternate key次要/备用键
组合键compound key=一组俩个或更多的集合
复合键composite key=组合键compound key+其他键
Structured key(non DMBOK)
外键foreign key用处是Cross-referencing columns
example:
数据建模4steps: