added sql script for generation database schema, minor changes in models structure