DB example with real query and insert functionalities