목차
Development agility vs. database manageability
NoSQL business and data model design process
RDBMS data modeling influence on NoSQL
NoSQL data model variation
NoSQL data model visualization
New NoSQL data modeling opportunities

NoSQL Data Modeling

Jun 07, 2016 pm 04:39 PM
data model nosql

Data modeling for RDBMS has been a well-defined discipline for many years. Techniques like logical to physical mapping and normalization / de-normalization have been widely practiced by professionals, including novice users. However, with

Data modeling for RDBMS has been a well-defined discipline for many years. Techniques like logical to physical mapping and normalization / de-normalization have been widely practiced by professionals, including novice users. However, with the recent emergence of NoSQL databases, data modeling is facing new challenges to its relevance. Generally speaking, NoSQL practitioners focus on physical data model design rather than the traditional conceptual / logical data model process for the following reasons:

  • Developer-centric mindset – With flexible schema (or schema-free) support in NoSQL databases, application developers typically assume data model design responsibility. They have been ingrained with the notion that the database schema is an integral part of application logic.
  • High-performance queries running in massive scale-out distributed environments – Contrary to traditional, centralized scale-up systems (including the RDBMS tier), modern applications run in distributed, scale-out environments. To accomplish scale-out, application developers are driven to tackle scalability and performance first through focused physical data model design, thus abandoning the traditional conceptual, logical, and physical data model design process.
  • Big and unstructured data – With its rigidly fixed schema and limited scale-out capability, the traditional RDBMS has long been criticized for its lack of support for big and unstructured data. By comparison, NoSQL databases were conceived from the beginning with the capability to store big and unstructured data using flexible schemas running in distributed scale-out environments.

In this blog post, we explore other important mindset changes in NoSQL data modeling: development agility through flexible schemas vs. database manageability; the business and data model design process; the role of RDBMS in NoSQL data modeling; NoSQL variations that affect data modeling; and visualization approaches for NoSQL logical and physical data modeling. We end the post with a peak into the NoSQL data modeling future.

Development agility vs. database manageability

One highly touted feature in today’s NoSQL is application development agility. Part of this agility is accomplished through flexible schemas, where developers have full control over how data is stored and organized in their NoSQL databases. Developers can create or modify database objects in application code on the fly without relying on DBA execution. The result is, indeed, increased application development and deployment agility.

However, the flexible schema is not without its challenges. For example, dynamically created database objects can cause unforeseen database management issues due to the lack of DBA oversight. Furthermore, unsupervised schema changes increase DBA challenges in diagnosing associated issues. Frequently, such troubleshooting requires the DBA to review application code written in programming languages (e.g., Java) rather than in RDBMS DDL (Data Definition Language) – a skill that most DBAs do not possess.

NoSQL business and data model design process

In old-school software engineering practice, sound business and (relational) data model designs are key to successful medium- to large-scale software projects. As NoSQL developers assume business / data model design ownership, another dilemma arises: data modeling tools. For example, traditional RDBMS logical and physical data models are governed and published by dedicated professionals using commercial tools, such as PowerDesigner or ER/Studio.

Given the nascent state of NoSQL technology, there isn’t a professional-quality data modeling tool for such tasks. It is not uncommon for stakeholders to review application source code in order to uncover data model information. This is a tall order for non-technical users such as business owners or product managers. Other approaches, like sampling actual data from production databases, can be equally laborious and tedious.

It is obvious that extensive investment in automation and tooling is required. To help alleviate this challenge, we recommend that NoSQL projects use the business and data model design process shown in the following diagram (illustrated with MongoDB’s document-centric model):

design_process

Figure 1

  • Business Requirements & Domain Model: At the high level, one can continue using database-agnostic methodologies, such as domain-driven design, to capture and define business requirements
  • Query Patterns & Application Object Model: After preliminary business requirements and the domain model are produced, one can work iteratively and in parallel to analyze top user access patterns and the application model, using UML class or object diagrams. With RDMS, applications can implement database access using either a declarative query (i.e., using a single SQL table join) or a navigational approach (i.e., walking individual tables embedded in application logic). The latter approach typically requires an object-relational mapping (ORM) layer to facilitate tedious plumbing work. By nature, almost all NoSQL databases belong to the latter category. MongoDB can support both approaches through the JSON Document model, SQL-subset query, and comprehensive secondary indexing capabilities.
  • JSON Document Model & MongoDB Collection / Document: This part is where native physical data modeling takes place. One has to understand the specific NoSQL product’s strengths and weaknesses in order to produce efficient schema designs and serve effective, high-performance queries. For example, modeling social network entities like followed and followers is very different from modeling online blogging applications. As such, social networking applications are best implemented using Graph NoSQL databases like Neo4j, while online blogging applications can be implemented using other flavors of NoSQL like MongoDB.

RDBMS data modeling influence on NoSQL

Interestingly enough, old-school RDBMS data modeling techniques still play a meaningful role for those who are new to NoSQL technology. Using document-centric MongoDB as an example, the following diagram illustrates how one can map a relational data model to a comparable MongoDB document-centric data model:

mongodb_mapping

Figure 2

NoSQL data model variation

In the relational world, logical data models are reasonably portable among different RDBMS products. In a physical data model, design specifications such as storage clauses or non-standard SQL extensions might vary from vendor to vendor. Various SQL standards, such as SQL-92 and the latest SQL:2008 as defined by industry bodies like ANSI/ISO, can help application portability across different database platforms.

However, in the NoSQL world, physical data models vary dramatically among different NoSQL databases; there is no industry standard comparable to SQL-92 for RDBMS. Therefore, it helps to understand key differences in the various NoSQL database models:

  • Key-value stores – Collections comprised of unique keys having 1-n valid values
  • Column families – Distributed data stores in which a column consists of a unique key, values for the key, and a timestamp differentiating current from stale values
  • Document databases – Systems that store and manage documents and their metadata (type, title, author, creation/modification/deletion date, etc.)
  • Graph databases – Systems that use graph theory to represent and store data as nodes (people, business, accounts, or other entities), node properties, and edges (lines connecting nodes/properties to each other)

The following diagram illustrates the comparison landscape based on model complexity and scalability:

nosql_comparisons

Figure 3

It is worth mentioning that for NoSQL data models, a natural evolutionary path exists from simple key-value stores to the highly complicated graph databases, as shown in the following diagram:

nosql_evolution

Figure 4

NoSQL data model visualization

For conceptual data models, diagramming techniques such as the Entity Relationship Diagram can continue to be used to model NoSQL applications. However, logical and physical NoSQL data modeling requires new thinking, due to each NoSQL product assuming a different native structure. One can intuitively use any of the following three visualization approaches, using a document-centric data model like MongoDB as an example:

  • Native visual representation of MongoDB collections with support for nested sub-documents (see Figure 2 above)

Pros – It naturally conveys a complex document model through an intuitive visual representation.
Cons – Without specialized tools support, visualization results in ad-hoc drawing using non-uniform conventions or notations.

  • Reverse engineering selected sample documents using JSON Designer (see Figure 5 below)

Pros – It can easily reverse engineer a hierarchical model into a visual representation from existing JSON documents stored in NoSQL databases like MongoDB.
Cons – As of this writing, JSON Designer is available only on iPhone / iPad. Furthermore, it does not include native DB objects, such as MongoDB indexes.

json_designer

Figure 5

  • Traditional RDBMS data modeling tools like PowerDesigner (see Figure 6 below)

Pros – Commercial tools support is available.
Cons – it requires tedious manual preparation and diagram arrangement to represent complex and deeply nested document structure.

power_designer

Figure 6

In a future post, we’ll cover specific data model visualization techniques for other NoSQL products such as Cassandra, which is based on the Column Family structure.

New NoSQL data modeling opportunities

Like any emerging technology, NoSQL will mature as it becomes mainstream. We envision the following new data modeling opportunities for NoSQL:

  • Reusable data model design patterns (some product-specific and some agnostic) to help reduce application development effort and cost
  • Unified NoSQL model repository to support different NoSQL products
  • Bi-directional, round-trip engineering support for (data) model-driven design processes and tools
  • Automated data model extraction from application source code
  • Automated code-model-data consistency validation and consistency conformance metrics
  • Strong control for application / data model change management, with proactive tracking and reconciliation between application code, embedded data models, and the actual data in the NoSQL databases
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

Spring Boot와 NoSQL 데이터베이스 통합 및 사용 Spring Boot와 NoSQL 데이터베이스 통합 및 사용 Jun 22, 2023 pm 10:34 PM

인터넷의 발달로 인해 빅데이터 분석과 실시간 정보처리는 기업의 중요한 요구사항이 되었습니다. 이러한 요구 사항을 충족하기 위해 기존 관계형 데이터베이스는 더 이상 비즈니스 및 기술 개발 요구 사항을 충족하지 않습니다. 대신 NoSQL 데이터베이스를 사용하는 것이 중요한 옵션이 되었습니다. 이 기사에서는 NoSQL 데이터베이스와 통합된 SpringBoot를 사용하여 최신 애플리케이션을 개발하고 배포하는 방법에 대해 설명합니다. NoSQL 데이터베이스란 무엇입니까? NoSQL은 SQL이 아닙니다.

Trezor Cold Wallet: Model One 및 Model T 기능 및 사용 가이드 Trezor Cold Wallet: Model One 및 Model T 기능 및 사용 가이드 Jan 19, 2024 pm 04:12 PM

많은 중앙화된 거래소에서 문제가 발생한 후 점점 더 많은 통화 투자자들이 중앙화된 거래소에서 발생하는 위험을 줄이기 위해 자산을 콜드 지갑으로 이전하기 시작했습니다. 이 글에서는 세계 최초의 콜드월렛 제공업체인 Trezor를 소개하겠습니다. 2014년 최초의 콜드월렛이 출시된 이후 전 세계 여러 나라에서 판매되고 있습니다. Trezor의 제품에는 2014년에 출시된 Model One과 2018년에 출시된 고급 버전인 Model T가 포함됩니다. 다음에서는 계속해서 이 두 제품과 다른 콜드월렛의 차이점을 소개하겠습니다. Trezor 콜드월렛이란 무엇인가요? 2014년 Trezor는 최초의 콜드 지갑 ModelOne을 출시했습니다. 일반적인 BTC, ETH, USDT 및 기타 통화 외에도 지갑은 1,000개 이상의 다른 통화도 지원합니다.

PHP 및 NoSQL 데이터베이스 적용 PHP 및 NoSQL 데이터베이스 적용 Jun 19, 2023 pm 03:25 PM

최신 웹 애플리케이션 개발에서 PHP와 NoSQL 데이터베이스는 매우 인기 있는 기술이 되었습니다. 과거에는 PHP가 동적 웹 사이트 및 웹 애플리케이션 개발에 널리 사용되었지만 NoSQL 데이터베이스는 최근에 등장한 새로운 데이터 저장 기술로 보다 유연하고 확장 가능한 솔루션을 제공합니다. 이 기사에서는 실제 애플리케이션에서 PHP 및 NoSQL 데이터베이스를 살펴보겠습니다. PHP는 원래 서버측 프로그래밍 언어입니다.

다양한 사용자 요구 사항을 충족하기 위해 PHP 및 MongoDB를 사용하여 NoSQL 데이터베이스 구현 다양한 사용자 요구 사항을 충족하기 위해 PHP 및 MongoDB를 사용하여 NoSQL 데이터베이스 구현 Jun 26, 2023 pm 11:39 PM

NoSQL(NotOnlySQL) 데이터베이스는 최근 급속히 발전한 데이터베이스 유형으로, 기존 관계형 데이터베이스에 비해 확장성과 성능이 뛰어나며 더 많은 데이터 유형과 데이터 저장 방법을 지원합니다. 그 중 MongoDB는 문서 데이터베이스 모델을 사용하는 NoSQL 데이터베이스로 웹 애플리케이션, 모바일 애플리케이션, 사물 인터넷 장치 및 기타 분야에서 널리 사용됩니다. 이 기사에서는 PHP를 사용하여 MongoDB 데이터베이스의 기본 작업을 작성하는 방법을 소개하고 예제를 통해 이를 충족하는 방법을 보여줍니다.

nosql과 mysql의 차이점은 무엇입니까 nosql과 mysql의 차이점은 무엇입니까 May 06, 2019 pm 02:39 PM

nosql과 mysql의 차이점은 다음과 같습니다. 1. MySQL은 테이블 설계를 기반으로 하는 관계형 데이터베이스인 반면 NoSQL은 본질적으로 비관계형 문서 기반 설계입니다. 2. MySQL의 엄격한 스키마 제한은 확장이 쉽지 않지만 NoSQL은 확장이 가능합니다. 동적 스키마를 통해 기능을 쉽게 확장할 수 있습니다.

Redis와 NoSQL 데이터베이스 비교 Redis와 NoSQL 데이터베이스 비교 May 11, 2023 am 10:52 AM

인터넷의 급속한 발전으로 인해 데이터의 양도 늘어나고 있다. 따라서 데이터 관리는 매우 중요한 주제가 되었습니다. NoSQL(비관계형 데이터베이스)은 빅데이터 문제를 처리하는 데 널리 사용되는 솔루션 중 하나가 되었습니다. Redis는 매우 인기 있는 NoSQL 데이터 관리 소프트웨어입니다. 이 기사에서는 Redis와 다른 NoSQL 데이터베이스 간의 유사점과 차이점을 분석하고 비교하여 특성, 장점 및 단점을 이해하는 데 도움을 줍니다. 1. Redis 개요 Redis는 사용자가 다음과 같은 기능을 사용할 수 있는 메모리 기반 스토리지 시스템입니다.

데이터 폴더에는 어떤 데이터가 있나요? 데이터 폴더에는 어떤 데이터가 있나요? May 05, 2023 pm 04:30 PM

데이터 폴더에는 소프트웨어 설정 및 설치 패키지와 같은 시스템 및 프로그램 데이터가 포함되어 있습니다. 데이터 폴더의 각 폴더는 데이터 파일이 파일 이름인 Data 또는 명명된 데이터를 참조하는지 여부에 관계없이 다양한 유형의 데이터 저장 폴더를 나타냅니다. , 모두 시스템이나 프로그램에 의해 사용자 정의된 데이터 파일입니다. 데이터는 데이터 저장을 위한 백업 파일입니다. 일반적으로 meidaplayer, 메모장 또는 워드로 열 수 있습니다.

Java API 개발에서 NoSQL 처리를 위해 MongoDB 사용 Java API 개발에서 NoSQL 처리를 위해 MongoDB 사용 Jun 18, 2023 am 10:24 AM

인터넷의 발달로 인해 데이터의 양이 증가하고 있으며, 특히 이러한 데이터를 효과적으로 저장하고 처리하는 것이 중요합니다. NoSQL(NotOnlySQL) 데이터베이스는 기존 관계형 데이터베이스에 비해 높은 성능, 확장성 및 편의성으로 인해 많은 주목을 받고 있습니다. 더 유연하고 다양한 데이터 처리 시나리오에 적합합니다. MongoDB는 매우 인기 있는 NoSQL 데이터베이스이며 Java 개발에 자주 사용됩니다. 이 기사에서는 JavaAPI의 개발을 소개합니다.

See all articles