• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Network Programming Concept

I am to design a program with master-child relationship. The batch (master) part consist of info on the batch and transactions (child) part consist of info on the transactions.
The database is located in a server and this program is meant for a network environment.

My problem is when a user create a new batch, do I create a temporary local database in the user PC during this session or do I use the database in the server for the session. Or do I transfer the whole database into the local hard disk.  Can someone advise me on which concept to use. I am new to this type of programming. Thank-you
0
tsluu
Asked:
tsluu
  • 3
1 Solution
 
amitmCommented:
This type of programming is called Client-Server programming.
Client can access (transactions) the database remotely. There is no need to copy the entire database or a part of it on client side. This will work without any problems until you consider time constraints in some cases. If you want to access (only read) some portion of database frequently, then you can cache that part in local machine, but this will be complicated if you are changing that part of database from other client at the same time. In the beginning, you can leave that optimization.
0
 
bhagyeshtCommented:
hmmm that depends on the number of client users and the database you are using. I assume you are using VB and if you are using components then I can suggest you use DCOM to achieve this so that the clients call the server's components and do the database interaction. DCOM in VB is very easy if you have knowledge of COM in vb instead of using
createobject("prj.class")
 u use
createobject("prj.class", "servername")

remember the components need to be present at both places.

now comming to non component programming.
you can fire queries directly to the database with transactions using ODBC if you are using access the you can use jet by sharing the file on the network too but better would be to upgrade to MSDE which prevents someone from deleting the file accidently (I faced this problem)

if u need more info feel free to write
0
 
tsluuAuthor Commented:
I am using VB and Access *.mdb as my database in the server. What I have done is:

* For new master record
a new record is added in the Master table,
new transactions are added in the Details table, referencing to the Master table,
if user decides to exit without saving then I delete all transactions with reference to the Master record

* For existing master record
user edits transaction the record directly

bhagyesht, I dont know whether this is a practical way to do it. Kindly advise. Thanks.
0
 
bhagyeshtCommented:
if you are expecting under 20 simultenous clients its fine. but never the less I would suggest have a look at MSDE besides offering scalability it offers you an option to migrate to MSSQL server at a later date without any significant code change.
0
 
bhagyeshtCommented:
just ensure that all the clients are generating different primary key for the master table
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now