Store Structured Data

The basic job of a database is to store data. And for most general purpose databases, it is expected that the data are stored in a well-structured way that keeps the data healthy, high quality and organized.

Like a relational database

Most developers know how to structure a relational database (like MySQL or SQL Server) with tables and columns.
Although Gyxi is a NoSQL database (or “document database”), data is still structured in more or less the same way as a relational database.¨
Gyxi doesn’t have tables, but it has “types” and these are essentially the same as tables. It is expected that all instances or the same type have more or less the same fields (columns) just like a normal ta
ble in a relational database.
One difference, of course, is that in Gyxi, columns are automatically created when they are found in a document of a certain type.

No Foreign Keys

One of the most important features of relational databases, foreign keys, do not exist in Gyxi or any other document databases for that matter.

However, you can simply design your data model with the assumption that foreign keys exist. Use your existing knowledge about database design and design tables (types) with the columns you would normally use and that includes foreign keys.

No heavy documents

Although a single document in Gyxi can be up to 1 MB, that is highly discouraged. You should not make heavy documents that contain more data types in different heavy fields with json content etc.

It is better to focus on many small documents with few columns to make sure each operation is always fast.

No joins

You cannot make a query where you join together data from two types. In fact, there are no queries at all.

With views you can design your data to be structured exactly as you need them. Instead of a complicated join which costs computing resources, you make two incredibly optimized calls which are Always Fast, even under high load.

The calling client would then have to combine the data as needed.

Structure like a relational database

This is a lot of information. The documentation is full of advice on how to organize your data.

But when all is said and done, just remember one thing. Structure it like a relational database. Create tables. Create tables with many-to-many relationships in Gyxi when you would have done so in a relational database.

Business Registration Number DK28916779