database design implemented with sql (v1)