database model and sql script for creation database