Implemented working database models

and they work f*ck'n sweet!