Would like some general advice on a multi-user application

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

Would like some general advice on a multi-user application

Post by Guest » Thu 24 Aug 2006 20:34

Hello,

I am developing a multi-user application and am just curious as to a few things.

1) When a record is added or updated....what is the best way to let the other running apps know that this data was updated? Have the other apps just do a refresh every so often? Or perhaps send a message to the other apps to refresh that query / table? Doing it this way would definitely increase the complexity of the program.

Or maybe have another table that has a records that point to all the other tables and timestamp it...and have all the other apps look every so often and see if any tables were updated?

Or is there some other way?


2) What is a InnoDB table? Should I be using this type for a small to midsize database?

3) Should I just lock a record or lock the whole table when a user makes a change, adds or deletes a record?

4) Are there any other pitfalls that I can avoid before I start in on this?

Tigger
Posts: 8
Joined: Tue 08 Aug 2006 13:19

Post by Tigger » Fri 25 Aug 2006 17:08

I've just started a similar sounding application myself.

1) I'll be interested to hear comments on this also. At the present time my GUI updates when a user requests an update or changes data.

2) InnoDB is a type of storage engine that MySQL uses. This type supports transactions (see point 3) so I would recommend using it.

3) Basically Transactions are the way to go. You can find some really useful info on the Net.

I liked this article:
http://dev.mysql.com/books/mysqlpress/m ... /ch10.html

4) I haven't had any major headaches yet. Plenty of time for that though.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 29 Aug 2006 11:27

1) MySQL Server does not have any mechanism to notify client applicaion about changes in the database. You should call Refresh or RefreshQuick to keep data set in actual state. Please see MyDAC help for detailed information.
2) Please see this topic of MySQL Reference Manual http://dev.mysql.com/doc/refman/5.0/en/innodb.html
3) Unfortunately we can not answer other questions because they concern characteristics of your project. MyDAC Lock demo shows how to work with row-level lockig.
4) This question is out of MyDAC support scopes. Try to ask this question on a forum dedicated to designing database applications.

Post Reply