Keep word2vexc/fasttext model loaded in memory without using API
Surely, I will good idea to write embedding on some database like SQLite,Postgres or RocksDB. I highly appreciate using RocksDB as it is store data in the form of a key-value pair which is the best suit for your use case. Maybe it will take little more time but your main issue will get resolve through it. If u directly deal with python than there is support of SQLite and Postgres. If u work with java or .NET than RocksDB or LevelDB is supercool. I hope this explanation will help you. Please have review my answer for better reach.