main entities and sql scripts