P Kishor-3 wrote:
> Google for "normalizing a database" and then read up on it. It will help. 
> 

Ok, thanks, thats the solution. Now there is another problem that arise.
Lets say I have a table called movies with 3 columns (id, titles, keywords):

1|title1|keyword1
1|title1|keyword2
1|title1|keyword3
2|title2|keyword1
2|title2|keyword2

The id column is unique, the same from imdb so if a want to add twice the
same movie it doesn't let me.

After normalization I have two tables (movies (id, titles) and keywords (id,
keywords)):
movies:
1|title1
2|title2
keywords:
1|keyword1
1|keyword2
1|keyword3
2|keyword1
2|keyword2

How do I prevent inserting the same keyword for the same movie?
-- 
View this message in context: 
http://www.nabble.com/Sqlite-question%3A-group-by-column-with-multiple-tags--tp22153722p22180987.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to