Table design issues - should I create separate fields or store as a blob

Posted by Ali on Stack Overflow See other posts from Stack Overflow or by Ali
Published on 2010-03-27T10:27:01Z Indexed on 2010/03/27 10:33 UTC
Read the original article Hit count: 463

Filed under:
|
|

Hi guys I'm working on my web based ordering system and we would like to maintain a kind of task history for each of our orders. A hsitory in the sense that we would like to maintain a log of who did what on an order like lets say an order has been entered - we would like to know if the order was acknowledged for an example. Or lets say somebody followed up on the order - etc.

Consider that there are numerous situations like this for each order would it be wise to create a schema on the lines of:

Orders
ID - title - description - date - is_ack - is_follow - ack_by .....

That accounts to a lot of fields - on teh other hand I could have one LongText field called 'history' and fill it with a serialised object holding all the information.

However in the latter case I can't run a query to lets say retrieve all orders that have not been acknowledged and stuff like that. With time requirements woudl change and I would be required to modify it to allow for more detailed tracking and that is why I need to set up a way which would be feasible to scale upon yet I don't want to be restricted on the SQL side too much.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql