MySQL: Big amount of tables
Posted by: Borut Svara
Date: February 23, 2014 05:12AM

Hi,
Let me say that i'm new on this forum so apologize for any error.

I try to explain my worries;
I have two tables:
-'users' within a lot of columns (uniqueID, name, surname, username, password, ...).
-'comments' which contain a list of comments writed by users on various topics.

Now... i'm planing to expand the table 'user' to 100'000 rows and the 'comments' to 10'000'000 or more.

Here is my problem: i want implement 'likes'. Each user could 'like' 0, 1 or all the comments, and each user can se the list of 'liked' comments. But i don't know how to do. There is no sense adding columns to 'user' with a bolean value like/nolike for each comment or adding columns to 'comments' for each user, because i will use a big amount of memory for saving this data, but how much is possible that everyone likes all comments? or even the 10%? there will be a lot of space with 'false' value.

So i used a bit of fantasy and I asked my self; if i make a table named {'LK' + user uniqueID} for each user, with a single column which contain the ilst of comments uniqueID liked by the user?

Thinking about this i get a lot of worries, because i don't see any problem doing this, but i never sow this type of SQL server hierarchy and it seems strange.

I just need a mySQL guru which says me 'you are on the right way' or 'you are crazy, and you are making it wrong'?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
MySQL: Big amount of tables
February 23, 2014 05:12AM
February 24, 2014 05:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.