Build database using metadata
Builds a database