MySQL and even SQLite already have spatial indexes, so there are no problems.
You can use the BLOB field to store data files, but it is usually better (and easier to optimize) to store as files. So that the files associated with database records, you can put the full path (or URL) in the varchar field or save the image in the path calculated by the record identifier.
To easily scale to a multi-terabyte storage, plan to use multiple servers from the start. If the data is read - basically, an easy way is to store the images on different hosts, each with a static HTTP server, and each image is written to the database. then put the webapp interface for the database, where the URLs for each image directly point to the corresponding storage server. Thus, you can continue to add storage without creating a bottleneck on the βcentralβ server.
source share