Database restructured and applied in the Entity model

Database restructured and applied in the Entity model