tacnode
Back to Demos·

Semi Structured Data

We demonstrate Tacnode's query capabilities with semi-structured data. Watch as we explore how Tacnode supports JSON and JSONB data types, allowing for dynamic fields in our tables. We’ll showcase a practical example to highlight Tacnode's efficiency in handling semi-structured data while ensuring high performance.

INTRODUCTION

Welcome to our demonstration of Tacnode's query capabilities with semi-structured data. We'll be using the Tacnode Playground for this demonstration.

Traditional relational databases typically store data in a structured, tabular format. Each table contains multiple columns, with each column representing a specific field, ensuring that structured data remains well-organized and consistently formatted.

However, we often find ourselves in situations where schema-free data seems to be a better option. In some cases, we can't predetermine the necessary columns and fields for our data, so we need to be able to dynamically add fields and data types as new data comes in. In our everyday lives, semi-structured data has a variety of use cases, including log data, email data, and IoT technology.

To account for all of these situations, Tacnode supports semi-structured data, with JSON and JSONB data types. Since JSONB objects are stored in a decomposed binary format, leading to higher storage performance and lower space overhead (as opposed to using JSON), we recommend using JSONB for semi-structured data.

SCHEMA OVERVIEW

In our BnB scenario, each listing may feature multiple amenities (like having a fridge, washing machine, microwave, and/or WiFi), all with varying product specifications. For example, we can have a single-door or double-door refrigerator, top-loading or front-loading washing machine, so on and so forth. Portraying these different product specifications using common fields would be highly impractical. Instead, we can create an "amenities" field in the "listings" table, with its data type being JSONB. To optimize performance, we've also created an index for this field. Next, let's revisit the Playground and demonstrate Tacnode's query performance for semi-structured data.

TACNODE BNB DEMO

First, we navigate to the homepage, click on "Advanced Search," and locate the “Amenities" field. Let’s say we want a listing with WiFi, so we can type “Wifi” as our key, then a COLON, and then the desired value (which is our internet speed).

We can see that the search engine was able to quickly find listings with a WiFi connection that’s 12Mbps.

In the backend, we can see that in the listings table, we’ve performed a JSON query on the “amenities” field.

To confirm the accuracy of our results, we can click on one of these listings and see that it does indeed feature 12Mbps Wifi.

And with that, we conclude this demonstration of Tacnode's query capabilities with semi-structured data. Thank you for tuning in.