Add some DB functions