database - dbsm 中的第一种形式规范化
问题描述
我需要一个解释如何在数据库中做第一个规范化表格。
Order(orderID, customerID, customerName, customerAddress1, customerAddress2,
customerPostalCode customerCity, customerCountry, customerEmail, customerPhoneNumber,
customerDOB, customerGender, bankCardNumber, bankCardExpiringDate, billingAddress1,
billingAddress2, paymentID, paymentDetails, customerCity, orderDateOfOrder,
orderShippingDate, orderPrice, totalPrice, productID, productName, productDescription,
productQuantity, productDiscount, productsOrdered, shipperID, companyName,
shipperContact, supplierID, supplierPhone, supplierEmail, suplierPostalCode,
supplierCompanyName, supplierAddress1, supplierAddress2, supplierCity)
什么方法对第一个规范化形式有好处,规则应该是消除重复组,这到底是什么意思?
感谢您的帮助
解决方案
将重复组视为在每条记录中不必要地重复的信息。例如,在您的示例中,来自同一客户的每个订单都需要为每个订单记录重复所有客户信息。客户信息应该被“规范化”到它自己的“客户”表记录中,而不是包含在订单记录中。
推荐阅读
- api - 通过从 Beego、Reactjs 调用 openstack api 来改变状态
- vue.js - 使用多个 v-on:click 时如何仅绑定单个类?
- excel - 使用 vba 创建复杂的宏
- excel - 引用另一个工作表时如何将文本转换为 Excel 中的公式?
- java - 无法在 jdbc 中更新日期(使用准备好的语句)
- codenameone - 从 URL 源播放音频
- react-native - java.lang.ClassCastException: java.lang.Double 不能转换为 java.lang.String 当我只使用 RN 开关 Android
- python - 使用 udf 以编程方式从数据框中选择列
- tensorflow - 张量流中训练评估预测中每个步骤的目的是什么?
- typescript - 有没有办法指定当前项目根目录之外的文件夹中的节点模块?