Malkavbug Posted April 8, 2006 Share Posted April 8, 2006 Okay, going to try and draw this out as best I can. Here is the issue, I am trying to make a message board for financial stuff, including the stock market.The board will be threaded conversation on several boards which need to be displayed by market, symbol, or industry, so individual threads need the ability to be flagged as pretaining to one, or several stocks, which in turn will flag them as industry or market threads based on the stock, or they need the option to be flagged as just a general industry or a general market.I am trying to do this right and normalize my tables to avoid tons of redundant data, so here is where I am at.I hope I am describing this okay.In general I will need aUsers Table (U), with just basic account information for the user, which will have a one to many relationship with T and PFor the General Stock stuff I will need aMarket Table (M) , which will have a one to many relationship with I and SIndustry Table (I) , which will have a one to many relationship with M and SStock_Symbol Table (S) , which will have a one to one relationship with M and IThen for the message boards I will needA Threads Table (T) , with a one to many relationship with (P)A Posts Table, with a many to one relationship with (T)For the Joins I will need (this is where I am getting a headache)A join table to bring MIST together, so table will have the information on the Market, Industry, Symbol, and Thread it applies to.A join table which will bring PUT together, so a thread can generate and show the message postsIf anyone can point out flaws in this basic sketch or give recommendation on how to go from here I would appreciate it. I want to try and do this right the first time, but I have no experience dealing with table normalization. Quote Link to comment https://forums.phpfreaks.com/topic/6900-need-some-help-with-table-normalization/ Share on other sites More sharing options...
fenway Posted April 9, 2006 Share Posted April 9, 2006 Sounds good so far -- as long as all of the data you're storing is atomic, and you've pulled out all the possible relationships, then you're on your way. Quote Link to comment https://forums.phpfreaks.com/topic/6900-need-some-help-with-table-normalization/#findComment-25281 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.