KevinKelly25 / LearnSQL

LearnSQL, a website for learning SQL
1 stars 2 forks source link

Update ER into EER #88

Closed KevinKelly25 closed 6 years ago

KevinKelly25 commented 6 years ago

I have made updates to the ER diagram that needs review.

1) I have changed the ER diagram to now be an EER diagram as the Userdata entity was a perfect candidate for EER inheritance. Each of the subtypes are connected to the supertype which represents a user. The O represents that the superuser can have overlapping subtypes.

2) The isTeacher attribute in the attends relationship was removed as it is replaced by the relationship between teacher and class now.

3) I have updated the Userdata to User. We originally used userdata instead of users because in PostgreSQL it is not a good idea to user as a table name because of the conflicting PostgreSQL keyword. However, this is physical constraint and should not be represented in the conceptual schema.

Once this PR is reviewed I will update the wiki with the relevant changes.

michaeltorres1 commented 6 years ago

Thank you for this PR @KevinKelly25. The ER Schema looks good however, one thing that may have been overlooked is the constraint between the School table and User table according to the ER Schema is that a user may only be registered to one school only. Although this has not been implemented yet within our project and may become an addition further down the road, I believe that maybe the User should be able to be registered to one or more schools.

KevinKelly25 commented 6 years ago

@michaeltorres1 Thank you for pointing out the relationship constraint. I had never thought about a student being in more then one school. Which would be possible especially over time they may switch schools. I have updated the PR with that change.

Thank you again 👍