Sandcastle can generate smart contacts from SQL[0]. There may be clues around BigchainDB, IPFS, and Swarm which are leaders in storage[1], and Ardrive[2] is built on Arweave[3], which is an exciting project in the space that focuses on tools for developers to build databases.