sql - schema for big database -


i trying solve issue recently, don't know how. have application allows users register , create profiles(as many want). every profile can create campaigns(as many want per profile) , each campaign can add links(there limited number links it's big anyway). each link can have it's own keywords (more 1 keyword).

the obvious thing came mind have table users, 1 profiles, 1 campaigns, 1 links , 1 keywords. think of this, users may use same keywords , don't want repeat information on database n times. don't know if possible in mysql have field in links table refer ids of keywords in keywords table. array of ids. implementation flexible, allowing me retrieve keywords, update "array of keywords" , perform computations (count number of keywords example). can recommend possible solution on how implement this?

just state again: i'm using mysql , php. thank you.

you should create table store keywords i.e.

id (int) keyword (varchar)

and store association table links -> keywords i.e.

link_id (int) keyword_id (int)

hope helps!

  • christian

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -