How are you accessing the data in notion now? Via HTTP? It might make sense to migrate to something that supports that interface in order to ease migration instead of a wholesale rewrite. You could start with sqlite or even postgres and with extensions mimic the interface you're used to while transitioning to a pretty scalable database.