Lightweight database layer