简体   繁体   English

Mongo DB中NoSQL中的规范化

[英]Normalisation in NoSQL in Mongo DB

The first table is for products, how would I normalize this data. 第一张表是针对产品的,我将如何标准化这些数据。

  • asin - ID of the product, eg 1574571931 asin-产品ID,例如1574571931
  • categories - list of categories the product belongs to 类别-产品所属类别的列表
  • description – description of product 描述–产品描述
  • title - name of the product 标题-产品名称
  • brand – brand name of the product 品牌–产品的品牌名称

IMAT3104 Database Management and Programming Assignment 2017-18 De Montfort University 2018 Page 6 of 11 IMAT3104数据库管理和编程作业2017-18蒙福特大学2018年第6页,共11页

  • price - price in US dollars (at time of crawl) 价格-美元价格(抓取时)
  • salesRank - sales rank information. salesRank-销售排名信息。 The better the sales, the lower the rank. 销售越好,排名越低。
  • imUrl - url of the product image imUrl-产品图片的网址
  • related - 相关-

The second table is for reviews and how would I normalize this table as well. 第二张表用于评论,我也将如何规范该表。

  • reviewerID - ID of the reviewer, eg A2Y113PST5WPPF reviewerID-审阅者的ID,例如A2Y113PST5WPPF
  • asin - ID of the product, eg 1574571931 asin-产品ID,例如1574571931
  • reviewerName - name of the reviewer reviewerName-评论者的姓名
  • helpful - helpfulness rating of the review, eg 2 out of 3 found review helpful 有用-评论的有用性评分,例如3条评论中有2条认为有帮助
  • reviewText - text of the review reviewText-评论文本
  • overall - rating of the product 总体-产品评级
  • summary - summary of the review 摘要-评论摘要
  • unixReviewTime - time of the review (unix time in seconds) unixReviewTime-审核时间(以秒为单位的Unix时间)
  • reviewTime - time of the review (raw) reviewTime-评论时间(原始)

What is the process of normalization and how can I organize the above 2 tables? 规范化的过程是什么,如何组织以上两个表?

Normalization--a strictly logical process--is the same whether the target platform is a SQL dbms, a large scale C++ program, or a nosql database. 无论目标平台是SQL dbms,大型C ++程序还是nosql数据库,规范化(严格的逻辑过程)都是相同的。

Following the normalization procedures in any good, college-level textbook, normalize every relation to 5NF. 遵循任何好的大学级教科书中的规范化程序,将与5NF的每个关系规范化。 Then translate the results to your target platform. 然后将结果转换到您的目标平台。 (You'll often have to translate declarative code to procedural code.) (您通常必须将声明性代码转换为过程代码。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM