基本信息
文件名称:SchemaLess的文档型数据库,更需要数据建模.pptx
文件大小:5.88 MB
总页数:26 页
更新时间:2025-05-18
总字数:约6.68千字
文档摘要

SchemaLess的文档型数据库更需要数据建模

目录CONTENTS?文档模型关系模型SchemaLess到底是:弱Schemaor无SchemaJSON文档模型设计共筑JSON文档技术生态

contact:SequoiaDB,address:广州市南沙区水岸广场21楼},line_items:[{sku:892874,description:xBookPro,qty:20,unitPrice:4999.00},{sku:895746,description:xBookMax,qty:10,unitPrice:5999.00}],payment:{type:UnionPay,last5:3456,expiry:12/2048}数据模型的对比 - 文档型对象化层次结构文档模型{orderId:123456,customer:{custId:scottsiu,name:ScottSiu,关系模型123456scottsiuScottSiuSequoiaDB广州市南沙区水岸广场21楼Ordernumber:Cusstomer:Lineitems:Payment:UnionPayType:CCNumber:Expiration:123456789012345612/2048 Code: 124oderIdcustIdpmtId123456scottsiu4163412Port#DescriptionQtyPriceExtension892874xBookPro204999.0099980BookMax105999.0059990.00=======159970.00custIdnamecontactaddress123456scottsiuSequoiaDB广州市南沙区水岸广场21楼skuqtyunitPrice892874204999.00895746105999.00sku description892874 xBookPro895746 xBookMaxpmtidtypelast4expiry4163412UnionPay345612/2048订单表客户信息表订单明细表产品表付款信息表

数据模型的对比 - 文档型多态性文档模型{accountId:234567890,balance:-5000,accountType:loan,accountDetails:{loanAmount:20000,term:25,interestRate:1.25,monthlyPmt:847.33}},{accountId:345678901,balance:5000,accountType:savings,accountDetails:{interestRate:0.04,interestEarned:536.21}},……}{{accountId:123456789,balance:1000,accountType:checking,accountDetails:{miniBalance:50,overdraftLimit:1000}},关系模型AccountaccountIdpkstringdateOpeneddatebalancedblaccountTypestringanyOfch[0]checkingsubminiBalancedecoverdraftLimitint[1]savingssubinterestRatedecinterestEarneddbl[2]loansubloanAmountdbltermintinterestRatedecmonthlyPmtdblAccountaccountIdpkvchardateOpeneddatebalancefitaccountTypevcharcheckingminiBalanacedecoverdraftLimitint32savingsinterestRatedecimal(2,5)interestEarnedfitloanloanAmountfittermint32interestRatedecimal(2,5)monthlyPmtfit

数据模型的不同因素关系(行存)维度(列存)查询(文档)优势通过表格精确表示数据精确表示数据如何用于分析精确表示将如何接收和访问数据重点精确表示将如何接收和访问数据分析业务流程的业务问题提供业务流程洞察的访问路径业务运营(OLTP)分析(OLAP)发现数据库种类RDBMSRDBMSNoSQL例子每个银行客户必须拥有至少一个账户。通过日期、区域和产品产生了多少收入?也想按月