Create database architecture and write functions to interact with database