first draft of database operations