Solved

Network Programming Concept

Posted on 2003-12-01
7
256 Views
Last Modified: 2010-04-17
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
Comment
Question by:tsluu
  • 3
7 Comments
 

Expert Comment

by:amitm
ID: 9856258
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
 
LVL 9

Accepted Solution

by:
bhagyesht earned 100 total points
ID: 9856617
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
 

Author Comment

by:tsluu
ID: 9863315
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
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9864048
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
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9864053
just ensure that all the clients are generating different primary key for the master table
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Image decoding from Camera 3 86
Turning python script into an applet 12 111
c++ reading data from file into two dimensional array 3 109
Beginner to Unreal Engine 4 5 80
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question