Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Gregory Anuhin](https://uploads.teamtreehouse.com/production/profile-photos/1882002/micro_20141014_161340.jpg)
Gregory Anuhin
4,379 PointsQuestion about database tables organization for project
my target is to create quiz for memorizing english words.
for each user I have to create a new table in mysql with words knowledge?
just i think if every user will have table with 2000 words it can be a problem . How to orginize the table in the right way ?
thank you
2 Answers
![shezazr](https://secure.gravatar.com/avatar/076a57ae4d16a74cfc69ca27952c9ce0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
shezazr
8,275 Pointsso you have a user table, words table with two fields english & russian, quiz table which holds info about user quizzes, and finally a user_quiz or something that links quiz table to words table so that you know which words were in which quiz.
This way user can have multiple quizzes open and when you assign a new quiz, just make sure that you don't give user same word....
Actually one bad thing about this design is the words table.. you shouldn't have two fields or design it like that unless you are 100% sure you won't extend this to another language say French etc.. because if you do that, then there are better ways of doing that such as:
words id, language, word, parent_id
parent_id is the id in words table for a word in Russian.. so if you had <Welcome> in Russia, if its id = 1, when you translate <Welcome> to English, you would give it 1 as parent_id so that it is easier for you to reference.. this way you can extend your quiz to other languages..
![shezazr](https://secure.gravatar.com/avatar/076a57ae4d16a74cfc69ca27952c9ce0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
shezazr
8,275 PointsI have no idea what your project is about even after reading your post.. but clearly you are right creating 1000s tables for each user is a bad idea...
what does this mean:
"my target is to create quiz for memorizing english words?"
what are the requirements or how does this work..
![Gregory Anuhin](https://uploads.teamtreehouse.com/production/profile-photos/1882002/micro_20141014_161340.jpg)
Gregory Anuhin
4,379 Pointsexample: user entered to the quiz of translating words from english to russian. he did the quiz using element. Now i need to give him score or points for each of the words he wrote right.
then next time he is trying to pass the same quiz or test whatever. My target here is to know if the user is already know current words, if he knows so i wont give him points for that.
sorry for my english , I'm not a native speaker