Scratch DB functionality