Would new types of indexing be possible in a native and standardized way?

intro

Today I make “trees” to make a sort of indexation and take advantage of the visualization of the relations via Ratel.

Like that


so when doing searches I can see the regions, cities and etc of each register I do.

The problem with this is that I have to make mutations in the DB every time it happens to clean completely. And the UIDs are not fixed. This is a “small” problem that I have to work around.

And it’s a big problem when I have to do Backup and then UP/load everything back. I have to always do everything in order or edit the relations via application. Anyway, that’s my thing. xD

The idea

But in the face of this example I thought. Why not have a tree system like this native? and internationally standardized?

Some applications like “Prestashop” already follow international standards. But it’s via Software. I’ve never seen anything like that coming from a DB.

The types of indexing could be weights and measures. Like KG, inches, temperatures, dimensions, distances patterns. Junction of language and country identifiers. As ISO code standard.

And the main one is a “zone” tree. With countries linked to regions, states, cities, provinces and etc. In hierarchical order.

So when We search for “City with the state XY - ISO” would return all nodes related to that. With all contexts spanded as if they were real nodes. As in the example image above.

In that case trees would be native nodes with frozen/unique UIDs from the DB. But expanded as “reverse”. That way when you need to use the BulkLoader would not have problems, since these identifications would be standardized.

Examples:

// IATA = airport code
// Or use
// ISO = ISO 3166-2
// ISO codes can use numbers as well => ftp://ftp.fu-berlin.de/doc/iso/iso3166-countrycodes.txt
// index “country” returns ISO 3166 Codes (because IATA doesn’t have countries) in case you expand the names of countries with “~ expand (trees)”
// States has ISO code also.

Schema:

city: IATA @index(country, IATA) . #International Air Transport Association
BMI: kg/m-square @index(kg) . #BMI = Body mass index
born: ISO @index(country) .

Query:

has(email) {
uid
expand(_all_)
~expand(_trees_)
}

Mutation:

<_:user><city> "BUE"<xs:IATA> . //Buenos Aires - Argentina
<_:user><born> "FRA"<xs:ISO> . //FRANCE

Could try a custom mix of ISOs. Like HI::US::NA

<_:user><born> "HI::US::NA"<xs:mix.ISO> . // Hawaii, USA ,  North America.
<_:user><born> "NewCity::US::NA"<xs:custom> . // Some New City, USA ,  North America.

The custom format could be appreciated via Schema. Where we would create a model for each city, province, municipality and so on. It would be a big Schema, but it would be an option. (obviously, if possible)

What do you think?

Best Regards.

1 Like

I don’t get the problem here. Could you clarify it a bit? We plan to add support for backup, so you should be able to get the same uids when you reload a backup. Does that solve your problem?

1 Like

In fact this was only a comment. There are no issues with that, but since you said that, it will help.

The focus of my question is types of indexing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.