mysql - Representation of a simple messeger application using a database -


in application there users, conversations , messages. more 2 users participate in conversation.

i thinking this:(---- relations, capital_words entities)

message ---- conversation ---- user

msg contains sender , content sent;
conversation contains users participate in conversation;

but not enough because sender user , there link between msg , user. if add relation have problem because sender should user participate conversation.(there is-a relation if i'm not mistaking)

i don't know how model problem. if conversation between 2 users, need message , user. in fact conversation entity pretty strange.

if eliminate conversation initial problem have add in message field contains list of partecipants. in way miss concept of conversation , if have retrieve msgs related conversation need join of data :) . --> impractical

i appreciate every suggestion. don't know if database idea kind of application. thought not difficult work with.(keeping in mind can lose performance)


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -