Interface for database usage (updated)