![]() Denormalization is the opposite of normalization. For Page Properties or Subpages, we should create other tables and reference only the page ID with each page property or subpage:Ĭontrarily, when it comes to non-relation databases (NoSQL) the denormalization approach is the best practice. Obviously, we insert, update, or retrieve these parts of data together and the relation between them is one to one. In order to follow best practices, it is recommended to store related parts of data together in one table such as ID, Name, Date, Metadata, and Description. Let’s take an example of page data in a CMS that needs to be stored in a relational database: Id, title, metadata, description, properties, subpages, date. When it comes to a relation database, it’s a fact that Normalization is the best practice approach to better maintain the data and avoid redundancy. These attributes are in the format of key-value pairs. Inside each document, there are attributes (fields). For more info please check my previous article about NoSQL DB and Data Model. We organized Documents into collections (equivalent to tables in a Relational database). Each document has data that represent the attributes of an entity. A document’s data may contain embedded documents. The data model for document databases consists of a structured hierarchy. JSON Role in Modeling Data for Document Databases Primitive such as Boolean, String, Int, Double, etc.….Technically speaking JSON has 3 main data Types: Attribute values can be a string, a number, a boolean, a nested JSON object, or an array. In the above figure, the JSON structure consists of a curly brace, and within these, we have what are essentially key and value pairs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |