add metadata table, add export db to text,
adds crud functions for metadata table