Data Models and Query Languages. What you need to know?

Data Models and Query Languages. What you need to know?

Data models are perhaps the most important part of developing software, because they have such a profound effect: not only on how the software is written, but also on how we think about the problem that we are solving.

Most applications are built by layering one data model on top of another. For each layer, the key question is: how is it represented in terms of the next-lower layer? For example:

  1. As an application developer, you look at the real world (in which there are people, organizations, goods, actions, money flows, sensors, etc.) and model it in terms of objects or data structures, and APIs that manipulate those data structures. Those structures are often specific to your application.
  2. When you want to store those data structures, you express them in terms of a general-purpose data model, such as JSON or XML documents, tables in a relational database, or a graph model.
  3. The engineers who built your database software decided on a way of representing that JSON/XML/relational/graph data in terms of bytes in memory, on disk, or on a network. The representation may allow the data to be queried, searched, manipulated, and processed in various ways.
  4. On yet lower levels, hardware engineers have figured out how to represent bytes in terms of electrical currents, pulses of light, magnetic fields, and more.

In a complex application there may be more intermediary levels, such as APIs built upon APIs, but the basic idea is still the same: each layer hides the complexity of the layers below it by providing a clean data model. These abstractions allow different groups of people - for example, the engineers at the database vendor and the application developers using their database - to work together effectively.

There are many different kinds of data models, and every data model embodies assumptions about how it is going to be used. Some kinds of usage are easy and some are not supported; some operations are fast and some perform badly; some data transformations feel natural and some are awkward.

It can take a lot of effort to master just one data model (think how many books there are on relational data modeling). Building software is hard enough, even when working with just one data model and without worrying about its inner workings. But since the data model has such a profound effect on what the software above it can and can’t do, it’s important to choose one that is appropriate to the application.

In my subsequent articles we will look at a range of general-purpose data models for data storage and querying (point 2 in the preceding list). In particular, we will compare the relational model, the document model, and a few graph-based data models. We will also look at various query languages and compare their use cases. And we will start by comparing Relational Model with Document Model.

 

Вас заинтересует / Intresting for you:

Graph-Like Data Models: full d...
Graph-Like Data Models: full d... 3747 views dbstalker Fri, 04 Oct 2019, 08:52:26
The Value Proposition for the ...
The Value Proposition for the ... 3304 views Светлана Комарова Sat, 03 Feb 2018, 17:09:14
The Evolution of Digital Media...
The Evolution of Digital Media... 2106 views Akmaral Sat, 03 Feb 2018, 16:47:36
Introduction to NoSQL Database...
Introduction to NoSQL Database... 3171 views sepia Tue, 12 Jun 2018, 18:51:49
Comments (0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations