Database creation and metadata table