J
JohnnyD
Hi,
I need to develop a system of batching up a load of outstanding orders based
on how many people we have working and how many hours, etc.. The existing
data is within an off-the-shelf Visual FoxPro database which is soon to be
moved into SQL Server 2005. I am planning on writing my program to use SQL
Server 2005 as well.
There is an order table within the existing database with a primary key
'orderid'. My system will need to select orders based on various parameters
and then group similar orders together for a number of packers. This will be
done up to a week in advance (because of the nature of our products the
customers need to be emailed in advance).
I need some way of making sure that if an order gets cancelled in the
existing database, it doesn't end up staying in my new system and getting
delivered.
My thoughts so far are that:
A - I either need to use the existing database orders table as my only
source of order data, or
B - Create an orders table in my new database and somehow keep them in sync
with each other.
The problem with A is that if an order gets cancelled, it will just
dissapear from my delivery system and then the batch that contained that
order will no longer contain enough work for that person to do. There would
need to be some kind of notification so that it could add another order into
that batch - the only way I can think of doing this would be constantly
checking the existing orders table for changes which wouldn't be very good
for performance.
The problem with B is the synchronisation. At least with this method, If
I've added all the orders in the existing database into my database, I can
refer back to the status of each one at some point before they get delivered
to see if they've been cancelled.
If anyone has any advice on how to go about things like this I'd be really
grateful. It's quite a difficult thing for me to get my head round.
Thanks,
John.
I need to develop a system of batching up a load of outstanding orders based
on how many people we have working and how many hours, etc.. The existing
data is within an off-the-shelf Visual FoxPro database which is soon to be
moved into SQL Server 2005. I am planning on writing my program to use SQL
Server 2005 as well.
There is an order table within the existing database with a primary key
'orderid'. My system will need to select orders based on various parameters
and then group similar orders together for a number of packers. This will be
done up to a week in advance (because of the nature of our products the
customers need to be emailed in advance).
I need some way of making sure that if an order gets cancelled in the
existing database, it doesn't end up staying in my new system and getting
delivered.
My thoughts so far are that:
A - I either need to use the existing database orders table as my only
source of order data, or
B - Create an orders table in my new database and somehow keep them in sync
with each other.
The problem with A is that if an order gets cancelled, it will just
dissapear from my delivery system and then the batch that contained that
order will no longer contain enough work for that person to do. There would
need to be some kind of notification so that it could add another order into
that batch - the only way I can think of doing this would be constantly
checking the existing orders table for changes which wouldn't be very good
for performance.
The problem with B is the synchronisation. At least with this method, If
I've added all the orders in the existing database into my database, I can
refer back to the status of each one at some point before they get delivered
to see if they've been cancelled.
If anyone has any advice on how to go about things like this I'd be really
grateful. It's quite a difficult thing for me to get my head round.
Thanks,
John.