dbTalk Databases Forums  

Database deign - Order status - pending, completed etc

comp.databases comp.databases


Discuss Database deign - Order status - pending, completed etc in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default Database deign - Order status - pending, completed etc - 07-26-2004 , 05:57 PM






Hi, i have a newbie question so your kindness would be much
appreciated!

I have a question relating to orders. For my database i will have a
number of states, ranging from when a customer initially places an
order, to the order being assigned to a customer sales representative,
then a completed state.

Is it better to store a 'state' ie order_pending, order_complete enum
type in a database, or is it better to have seperate tables for
different states (ie pending table, completed table)? I have been
thinking that the state flag idea would be the best of the two, but
expert opinion would be great or perhaps some other recommendations
for my problem?

Many thanks,

Chris

Reply With Quote
  #2  
Old   
John
 
Posts: n/a

Default Re: Database deign - Order status - pending, completed etc - 07-27-2004 , 07:18 AM






Chris wrote:
Quote:
Hi, i have a newbie question so your kindness would be much
appreciated!

I have a question relating to orders. For my database i will have a
number of states, ranging from when a customer initially places an
order, to the order being assigned to a customer sales representative,
then a completed state.

Is it better to store a 'state' ie order_pending, order_complete enum
type in a database, or is it better to have seperate tables for
different states (ie pending table, completed table)? I have been
thinking that the state flag idea would be the best of the two, but
expert opinion would be great or perhaps some other recommendations
for my problem?

Many thanks,

Chris
If the order may accurately be modelled by the same table all the way
through its life, then the state flag is definitely the best. I would
implement this with codes rather than descriptions, linked to a table
with the corresponding descriptions.

In a large system, you may find that quotations need to be done
separately, since it is often impractical to structure them in the same
way as a proper order.

John

PS. I don't pretend to be an expert, but have used this technique in two
operational projects.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.