database magic in action