Lightweight database framework