Proper use of database splitting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
Through this forum, I have just learned how to split my database into data
(tables) and application (everything else). My application would be ideal if
I could have a seperate back-end database for each customer, as each project
is short term, then the data for that customer is not required, so it could
be deleted. Also sometimes after the project is created for a customer, the
sale goes sour and the information for that customer is again not required.
Could I create a "template" backend database, copy and rename it
appropriately for each customer, then use the File->Get External Data->Import
functionality to switch between databases (customers), or is it really not
meant for toggling between databases and might corrupt things. Please let me
know.
 
Howard
My application would be ideal if
I could have a seperate back-end database for each customer

Ouch! No Way. You are creating a nightmare for your self. Why not add one
new table to your backend that contains Customer Names and a ID. Then in
your main table (Project???) add a colum that is the customer ID. Sure it
makes the database a little more complex, as you will have to add a form or
two to maintain the list of customers and such, but once you have done this,
you get great flexability and all of your data is in one place where it is
easy to maintain, find things and backup.

I recommend that you buy a book on relational database design and take the
advise therein to heart. In the end you will come out way ahead.

Ron W
 
Hi Ron,
I appologize, I haven't been clear. Currently my database is all in one
application. There exists a customer file in which customers are all
referenced by ID which are in turn referenced from the item and labour
tables. However, having a separate database for each customer would satisfy
my client's criteria to take the database on the road with several mobile
sales reps. If each sales rep creates a new client and adds all the item and
labour records for that customer, synchronzing data back at the server will
be a nightmare. A separate database for each customer will be ideal, but with
central product, supplier, resource and other lookup files. Users can then
just pass a customers database back and forth for updating without any
duplication or synchronization problems. I've seen huge tax and accounting
programs developed this way so client records can be shared amongst teams of
mobile accountants. Same as a doctors office with a file for each patient.
I've been a systems/database analyst for 25 years with over 10 semesters of
system and relational / hierarchial database design courses. However, my
experience has been mostly with proprietory databases and some Microsoft SQL.
I'm still new to Access/VB programming. Please let me know if there is an
efficient way to keep each customers data as a separate mdb file. Thanks!

Ron Weiner said:
Howard
My application would be ideal if
I could have a seperate back-end database for each customer

Ouch! No Way. You are creating a nightmare for your self. Why not add one
new table to your backend that contains Customer Names and a ID. Then in
your main table (Project???) add a colum that is the customer ID. Sure it
makes the database a little more complex, as you will have to add a form or
two to maintain the list of customers and such, but once you have done this,
you get great flexability and all of your data is in one place where it is
easy to maintain, find things and backup.

I recommend that you buy a book on relational database design and take the
advise therein to heart. In the end you will come out way ahead.

Ron W
 
If your tables are designed correctly and the proper relationships are
setup, you should have Cascade Delete enforced between CustomerID in the
customer table and CustomerID as the foreign key in all other customer
related tables. Deleting a customer table then in the customer table wou;d
automatically delete that customer's records in all related tables.
 
Hi!
I appologize, I haven't been clear. There is more involved than just being
able to delete a customers entries. I am familiar with Cascading. Having a
separate database for each customer would satisfy my client's criteria to
take the database on the road with several mobile sales reps. If each sales
rep takes a copy of the entire database, then creates a new client and adds
all the item and labour records for that customer, synchronzing data back at
the server will
be a nightmare. A separate database for each customer will be ideal, but
with shared product, supplier, resource and other lookup files. Users can
then just pass a customers database back and forth for updating without any
duplication or synchronization problems. I've seen huge tax and accounting
programs developed this way so client records can be shared amongst teams of
mobile accountants. Same as a doctors office with a file for each patient.
Please let me know if there is an efficient way to keep each customers data
as a separate mdb file. Thanks!
-Howard



PC Datasheet said:
If your tables are designed correctly and the proper relationships are
setup, you should have Cascade Delete enforced between CustomerID in the
customer table and CustomerID as the foreign key in all other customer
related tables. Deleting a customer table then in the customer table wou;d
automatically delete that customer's records in all related tables.
 
If the data in the product, supplier, resource and other lookup tables is
relatively static, make a copy of the database with these tables for each
sales rep and use it as the backend for each sales rep. Create a template
customer mdb for the front end and link to the backend database. When a
sales rep gets a new customer, all he needs to do is make a copy of the
customer template database and he can then immediately record the new
customer's data. When the template is copied, the links to the backend will
stay intact so the sales rep does not have to do anything about linking to
the backend. Since the new database is for one customer, all the sales rep
needs to do is delete the mdb file when he no longer needs that customer's
data. As long as the tables in the master backend stay the same albeit new,
edited or deleted data, the backend database for each sales rep could easily
be replaced with a copy of the master backend; nothinh more would need to be
done.

I could automate this whole process for you through a user interface to make
it user friendly for all involved. If you would like my help to do this,
contact me at my email address below.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


Howard said:
Hi!
I appologize, I haven't been clear. There is more involved than just being
able to delete a customers entries. I am familiar with Cascading. Having a
separate database for each customer would satisfy my client's criteria to
take the database on the road with several mobile sales reps. If each sales
rep takes a copy of the entire database, then creates a new client and adds
all the item and labour records for that customer, synchronzing data back at
the server will
be a nightmare. A separate database for each customer will be ideal, but
with shared product, supplier, resource and other lookup files. Users can
then just pass a customers database back and forth for updating without any
duplication or synchronization problems. I've seen huge tax and accounting
programs developed this way so client records can be shared amongst teams of
mobile accountants. Same as a doctors office with a file for each patient.
Please let me know if there is an efficient way to keep each customers data
as a separate mdb file. Thanks!
-Howard
 
I'll add something to the mix. A sales rep may not only be working with one
customer at a time. He may have 3 or 4 customers on his machine and need to
toggle between customers. A project could go on for weeks before we're done
and its safe to delete that customers database. The sales rep may move an
updated customer back to the server for others to access and copy another
back to his laptop. I want to allow for shuffling of customer databases. Let
me know. Also, thanks for the offer to automate the final solution. I would
like to take a crack at it myself, its the best way to learn. If I then have
trouble, I will let you know.
Thanks again!
-Howard
 
Put the master backend template on the server so that all sales reps use the
same template. Also require all sales reps to put their backend database
(copy of the master) in the same path on their laptops. This way the links
to the backend are the same for all the reps. All reps will then be able to
upload and down load customer databases and not need to do anything else.
 
Howard

If it were me Id set it up as similar to a sales logic ERP program that a
former company of mine used, but with more draconian rules that you are
willing to use. It would look something like:

Main database backend on the server has everything.

Sales rep database backend has ONLY all of the sales reps customers and
projects data

All of the front end databases are the same build.

Sales rep is getting ready to take a swing through his territory. His front
end database is connected to the Main backend database on the server and he
pushes a "I'm am out of the office" button to download all of his customer
information from all of the tables to a local database on his laptop. In
the process of doing this all of his customer records gets a CustCheckedOut
field set that allows the management to see all of his data, BUT not change
anything.

Meanwhile our sales rep goes out into his territory making what ever changes
are necessary, and Even adding new orders and customers. (You will have to
flag new orders and customers as such for later import back into main).

Sales rep comes back with a boat load of sales and new accounts. He
attaches his database front end to the Main Database on your server and
pushes "Hello I'm Back" Button. This button updates all of the existing
records in the Main database and insert's new records from his laptop to the
main database. All of his records CustCheckedOut records in the Main
database are set to false, and management can now make changes as necessary.
The database on his laptop gets all of it records deleted. All the while
our star sales rep is in the office he uses the Main backend.

Whew that's a lot of work you say, and I agree, but look at the advantages.

Management has all the data from all of the customers in one place for
forecasting, reporting, etc. (How are you going to tell the sales manager
that it is gonna take two days to to find your top 50 customers because you
have to gather data from 350 seperate databases? I have never seen a sales
manager type who'd take kindly to that.)
There is no risk of accidentally deleting the wrong database (it is only
a matter of time till you get bit by that)
The whole process is automated and the Sales Rep always has access to
ALL of his accounts
The sales rep can not leave the company and take all of the accounts, as
he has access to only his.
If it were me I'd never delete a potential customer from a database. If
you leave him there you can at least market to him at a later date with a
letter or Email. It's a cheap way to beat the bushes.

Ron W


Howard said:
Hi Ron,
I appologize, I haven't been clear. Currently my database is all in one
application. There exists a customer file in which customers are all
referenced by ID which are in turn referenced from the item and labour
tables. However, having a separate database for each customer would satisfy
my client's criteria to take the database on the road with several mobile
sales reps. If each sales rep creates a new client and adds all the item and
labour records for that customer, synchronzing data back at the server will
be a nightmare. A separate database for each customer will be ideal, but with
central product, supplier, resource and other lookup files. Users can then
just pass a customers database back and forth for updating without any
duplication or synchronization problems. I've seen huge tax and accounting
programs developed this way so client records can be shared amongst teams of
mobile accountants. Same as a doctors office with a file for each patient.
I've been a systems/database analyst for 25 years with over 10 semesters of
system and relational / hierarchial database design courses. However, my
experience has been mostly with proprietory databases and some Microsoft SQL.
I'm still new to Access/VB programming. Please let me know if there is an
efficient way to keep each customers data as a separate mdb file. Thanks!
 
Being in the same path on the notebooks and on the server is one thing.
Wouldn't all the backend databases need to have the same name in order to
maintain the link? I need someway to distinguish which database belongs to
which customer ie smith.mdb, jones.mdb, wong.mdb, etc. Am I understanding you?
-Howard
 
Yes, you are right; the backend databases would all need to be the same
name. Should not be a problem because they are all copies of the master
backend database from the server.

<<distinguish which database belongs to which customer ie smith.mdb,
jones.mdb, wong.mdb, etc. >>
These are all frontend databases so they need different names as you show. I
would suggest incorporating the sales reps' names in the file names as well
as adding more detail. Within the organization there most likely will be
many Smith customers and even for a particular sales rep he may have more
than one Smith customer.
 
Back
Top