Ditch databases?
See original GitHub issueCurrently, we have the following tables in a Terracotta database:
keys
: Contains defined key names and their descriptiondatasets
: Maps key values to physical raster pathmetadata
: Maps key values to raster metadata (such as min and max value, bounds, footprint, …)
An alternative model could be to save raster metadata on the rasters themselves. In that case, it would be much less likely for the raster metadata to go out of date. Having the metadata in a database only makes sense if we want to search it, which we currently don’t allow.
Doing this would even allow us to decouple the database from Terracotta entirely. We could then have an external database that the frontend can query for valid rasters, and request them from Terracotta by filename. This gives users flexibility to have a searchable catalogue outside of TC, and we could recover the current behavior by running directory listings on the raster folder.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16
Top Results From Across the Web
Say YES! to NoSQL: A Guide on When to Ditch Relational Databases
Does this mean there's no structured query language? Do I migrate my existing database to this model? In this talk, I'll answer these...
Read more >Say YES! to NoSQL: A Guide on When to Ditch ... - YouTube
If you're like many developers, relational databases are your bread and butter. They work (mostly) and are a logical solution to your ...
Read more >Dutch Studies: Article Databases - UC Berkeley - Library Guides
The International Bibliography of Periodical Literature in the Humanities and Social Sciences indexes over 5600 journals worldwide, ...
Read more >8. Ditch the Database, Embrace the Search Engine - De Gruyter
8. Ditch the Database, Embrace the Search Engine was published in Non-Consensus Investing on page 130.
Read more >Amazon's consumer business ditches Oracle's databases
But still, Amazon was probably eager to ditch Oracle in order to showcase its own databases, such as Amazon DynamoDB, Amazon Aurora, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Simplest mode of usage:
(only recommended for data exploration)
In this case
/keys
just gives[date, tile, band]
with empty descriptions/datasets
runsglob
with the given pattern and extracts / filters keys/metadata
opens GTiff and reads tags, if there are no tags metadata is computed sloppily based on an overviewSlightly more advanced:
(recommended usage)
/keys
reads descriptions from given JSON file/datasets
retrieves files list of entire bucket and filters it according to query parameters/metadata
reads from GTiff tagsAdvanced:
/datasets
now runs efficient queries on the SQLite databaseCustom paths to rasters:
(keys are not coupled to file paths)
Same as before, but use Python API to create SQLite database
External database:
Option 1a
/keys
and/datasets
are disabled (TC is just used for serving metadata and tiles)Option 1b
/keys
and/datasets
are disabled (TC is just used for serving metadata and tiles)User supplies an external discovery API that maps searchable parameters to file paths
All raster queries require full paths:
Option 2a
Enforce some sort of database structure
Ingestion and creation could go through Terracotta
/keys
returns searchable fields/datasets
does equality checks on searchable fields and returns keys used for raster retrieval:Option 2b
Enforce some sort of database structure
Ingestion and creation could go through Terracotta
/keys
returns searchable fields/datasets
supports SQL SELECT syntax:Well, the data has to live somewhere? S3 was just an example, could be any filesystem.