First version of database script