MySQL Forums
Forum List  »  Newbie

Database Design
Posted by: Randall Pratt
Date: May 27, 2015 08:32PM

Why Yes I am a newbie!!! Thanks for the Forum title lol

My issue is about database design, I am designing a fairly large database with many joins, triggers, relations and stored procedures. It is for stocks, so it will crunch data from one table, insert it into another table, then from there into another table and so forth, in each table it will store that data, hence the having of multiple tables.

I have a question about what is good practice and how to go about some of the things I want to do. I know that I shouldnt have any duplicate table data, and I shouldnt. However I have some topics that are related.

For instance I need to store if a stock is up for the day, so I have upDay and downDay, each has a tinyint to store a 1/0. Is it good practice to break it out into upDay/downDay or just have upDownDay as a bool?

Also I have inBase, inBuyZone, inSellZone all relate to where the stock is in the cycle, there will only be one that is true, so the same example as above. Should I just have one row that says cycleState, and the entries be inBase, inBuyZone, inSellZone? As it stands now they are all tinyint datasets looking for 1/0.

What do you think?

Options: ReplyQuote


Subject
Written By
Posted
Database Design
May 27, 2015 08:32PM
May 28, 2015 08:06PM
May 29, 2015 05:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.