ralam / Enginestarter

Capstone project
1 stars 0 forks source link

schema: projects, rewards, and supporters should be linked by join tables rather than _ids #2

Open Bibilidibipi opened 9 years ago

Bibilidibipi commented 9 years ago

You'll need a "supportings" table to create a has-many relationship between projects and supporters, and a similar link between projects and rewards. "projects" shouldn't need any foreign keys.

ralam commented 9 years ago

I've reworked the database design to have a "rewardings" association table between users and rewards and removed the supporter ID column from the projects table. Supporters are instead linked to projects through the rewards and rewardings tables (Project : Reward : Rewardings : Users).