I am getting confused with making a N:M relationship between two tables in SQLite.
My tables are "posts" and "tags", both components of my CMS I am making for my blog.
I want to link the tags column of the posts table to the tags table so that I can link multiple tags (defined in the tags table with an id, name and description) to the post using just one row of the database in the tags column of the posts table.
I have tried various things since being told to use an N:M relationship, something I hadn't used before being new to SQL. I understand what needs to be done - point the "tags" column to the tags table - but am not sure how to execute this.
I have tried foreign keys, indexes and more according to these links but am not sure what I should be doing... although I acknowledge that the answer is almost certainly right beneath my nose on these pages.
http://www.singingeels.com/Articles/Understanding_SQL_Many_to_Many_Relationships.aspx
SQLite many-to-many relationship?
Is it simply going to be FOREIGN KEY(tags) REFERENCES tags(id) in the posts table? Although I don't see how this enables multiple entries for "tags" in the posts table.
Any advice appreciated and I am continuing to try and educate myself right now,
Ilmiont