RE: UPDATE from one server to another

2006-06-06 Thread Peter Lauri
I am not that clever, but I would just create a Web Service (WS) on the
Server that the Laptop call whenever the laptop want to push the date into
the server database.

I heard something about something called rsync, but I think that is
restricted to Linx, Unix.

/Peter

-Original Message-
From: Jason Dimberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: UPDATE from one server to another

I am working on an application where data will be collected on laptops 
and then uploaded to a central database once the laptop is able to 
connect to the network after being in the field.  I was initially 
thinking of using MS Access as a front end with linked tables through 
MySQL ODBC.  I am now considering running WAMP on each machine with a 
web interface because there will be no interoperability issues if MySQL 
is the db server on both ends, but I am 1.) looking for any 
recommendations for the laptop interface (MS Access/WAMP or whatever 
other options might be available) and 2.) want to know what is the 
actual command for updating a table across two servers (this is NOT 
replication, but merely updating new data to an existing table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities 
that need to be added to the main Server.  Laptop 2 might have 30 rows 
of data that need to be added to the main Server.  Neither laptop needs 
to have the data from the other, but the Server will contain data from 
both Laptops at the end of the day.  The Server will then offer the data 
through a web interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2

Thank you.
-- 
Jason


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: UPDATE from one server to another

2006-06-06 Thread Tim Lucia
rsync is a *nix utility that synchronizes two file systems, one local and
one remote (typically).  It is used to produce mirrors / backups / etc.  You
would not want to use it to synchronize database (raw) files via the file
system.

If you include a timestamp field, you can use that to copy across all
records that are newer then the last time you uploaded, or, greater then the
most-recent date in the main database.

Tim

rsync(1)  - faster, flexible replacement for rcp

DESCRIPTION
  rsync  is  a  program that behaves in much the same way that rcp does,
  but has many more options and uses the rsync remote-update protocol to
  greatly  speed  up  file  transfers when the destination file is being
  updated.

  The rsync remote-update protocol allows rsync  to  transfer  just  the
  differences  between  two sets of files across the network connection,
  using an efficient checksum-search algorithm described in the  techni-
  cal report that accompanies this package.


-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 05, 2006 10:17 PM
To: 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

I am not that clever, but I would just create a Web Service (WS) on the
Server that the Laptop call whenever the laptop want to push the date into
the server database.

I heard something about something called rsync, but I think that is
restricted to Linx, Unix.

/Peter

-Original Message-
From: Jason Dimberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: UPDATE from one server to another

I am working on an application where data will be collected on laptops 
and then uploaded to a central database once the laptop is able to 
connect to the network after being in the field.  I was initially 
thinking of using MS Access as a front end with linked tables through 
MySQL ODBC.  I am now considering running WAMP on each machine with a 
web interface because there will be no interoperability issues if MySQL 
is the db server on both ends, but I am 1.) looking for any 
recommendations for the laptop interface (MS Access/WAMP or whatever 
other options might be available) and 2.) want to know what is the 
actual command for updating a table across two servers (this is NOT 
replication, but merely updating new data to an existing table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities 
that need to be added to the main Server.  Laptop 2 might have 30 rows 
of data that need to be added to the main Server.  Neither laptop needs 
to have the data from the other, but the Server will contain data from 
both Laptops at the end of the day.  The Server will then offer the data 
through a web interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2

Thank you.
-- 
Jason


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: UPDATE from one server to another

2006-06-06 Thread Peter Lauri
Can you run rsync on Windows environment?

-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 6:32 PM
To: 'Peter Lauri'; 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

rsync is a *nix utility that synchronizes two file systems, one local and
one remote (typically).  It is used to produce mirrors / backups / etc.  You
would not want to use it to synchronize database (raw) files via the file
system.

If you include a timestamp field, you can use that to copy across all
records that are newer then the last time you uploaded, or, greater then the
most-recent date in the main database.

Tim

rsync(1)  - faster, flexible replacement for rcp

DESCRIPTION
  rsync  is  a  program that behaves in much the same way that rcp does,
  but has many more options and uses the rsync remote-update protocol to
  greatly  speed  up  file  transfers when the destination file is being
  updated.

  The rsync remote-update protocol allows rsync  to  transfer  just  the
  differences  between  two sets of files across the network connection,
  using an efficient checksum-search algorithm described in the  techni-
  cal report that accompanies this package.


-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 05, 2006 10:17 PM
To: 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

I am not that clever, but I would just create a Web Service (WS) on the
Server that the Laptop call whenever the laptop want to push the date into
the server database.

I heard something about something called rsync, but I think that is
restricted to Linx, Unix.

/Peter

-Original Message-
From: Jason Dimberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: UPDATE from one server to another

I am working on an application where data will be collected on laptops 
and then uploaded to a central database once the laptop is able to 
connect to the network after being in the field.  I was initially 
thinking of using MS Access as a front end with linked tables through 
MySQL ODBC.  I am now considering running WAMP on each machine with a 
web interface because there will be no interoperability issues if MySQL 
is the db server on both ends, but I am 1.) looking for any 
recommendations for the laptop interface (MS Access/WAMP or whatever 
other options might be available) and 2.) want to know what is the 
actual command for updating a table across two servers (this is NOT 
replication, but merely updating new data to an existing table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities 
that need to be added to the main Server.  Laptop 2 might have 30 rows 
of data that need to be added to the main Server.  Neither laptop needs 
to have the data from the other, but the Server will contain data from 
both Laptops at the end of the day.  The Server will then offer the data 
through a web interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2

Thank you.
-- 
Jason


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: UPDATE from one server to another

2006-06-06 Thread Tim Lucia
Ask our mutual friend, Google.  It has lots of answers for you. 

-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 10:09 AM
To: 'Tim Lucia'; 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

Can you run rsync on Windows environment?

-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 06, 2006 6:32 PM
To: 'Peter Lauri'; 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

rsync is a *nix utility that synchronizes two file systems, one local and
one remote (typically).  It is used to produce mirrors / backups / etc.  You
would not want to use it to synchronize database (raw) files via the file
system.

If you include a timestamp field, you can use that to copy across all
records that are newer then the last time you uploaded, or, greater then the
most-recent date in the main database.

Tim

rsync(1)  - faster, flexible replacement for rcp

DESCRIPTION
  rsync  is  a  program that behaves in much the same way that rcp does,
  but has many more options and uses the rsync remote-update protocol to
  greatly  speed  up  file  transfers when the destination file is being
  updated.

  The rsync remote-update protocol allows rsync  to  transfer  just  the
  differences  between  two sets of files across the network connection,
  using an efficient checksum-search algorithm described in the  techni-
  cal report that accompanies this package.


-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Monday, June 05, 2006 10:17 PM
To: 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another

I am not that clever, but I would just create a Web Service (WS) on the
Server that the Laptop call whenever the laptop want to push the date into
the server database.

I heard something about something called rsync, but I think that is
restricted to Linx, Unix.

/Peter

-Original Message-
From: Jason Dimberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 06, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: UPDATE from one server to another

I am working on an application where data will be collected on laptops and
then uploaded to a central database once the laptop is able to connect to
the network after being in the field.  I was initially thinking of using MS
Access as a front end with linked tables through MySQL ODBC.  I am now
considering running WAMP on each machine with a web interface because there
will be no interoperability issues if MySQL is the db server on both ends,
but I am 1.) looking for any recommendations for the laptop interface (MS
Access/WAMP or whatever other options might be available) and 2.) want to
know what is the actual command for updating a table across two servers
(this is NOT replication, but merely updating new data to an existing
table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities that
need to be added to the main Server.  Laptop 2 might have 30 rows of data
that need to be added to the main Server.  Neither laptop needs to have the
data from the other, but the Server will contain data from both Laptops at
the end of the day.  The Server will then offer the data through a web
interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2

Thank you.
--
Jason


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: UPDATE from one server to another

2006-06-06 Thread Daniel da Veiga

On 6/6/06, Jason Dimberg [EMAIL PROTECTED] wrote:

I am working on an application where data will be collected on laptops
and then uploaded to a central database once the laptop is able to
connect to the network after being in the field.  I was initially
thinking of using MS Access as a front end with linked tables through
MySQL ODBC.  I am now considering running WAMP on each machine with a
web interface because there will be no interoperability issues if MySQL
is the db server on both ends, but I am 1.) looking for any
recommendations for the laptop interface (MS Access/WAMP or whatever
other options might be available) and 2.) want to know what is the
actual command for updating a table across two servers (this is NOT
replication, but merely updating new data to an existing table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities
that need to be added to the main Server.  Laptop 2 might have 30 rows
of data that need to be added to the main Server.  Neither laptop needs
to have the data from the other, but the Server will contain data from
both Laptops at the end of the day.  The Server will then offer the data
through a web interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2



Don't use ACCESS to deal with MySQL Data, you'll probably meet
inconsistencies, along with bugs and problems with field types,
besides, MS sucks...

To sync the laptop with the actual database, you can use a Web
Interface, or simply upload data via ftp or any other protocol (check
for security) and write a script to add this data to MySQL. Are you
sure you're not better served using the filesystem to store the data
and simply indexing names, sizes, maybe a hash for security reasons
(md5 or whatever) and timestamps so you can use the database to
quickly search or organize files but offer them via HTTP or FTP? A
simple app can get info about the file, upload it to the server and
add a row to MySQL with the info and the location of the file in the
filesystem.

You would get something like:

filesystem:
/home/ftp/file1.bin

mysql:
name: file1.bin
location: /home/ftp
size: 1024 bytes
hash: 78687hhg89686578h786
uploaded: 06/06/2006 14:30
from: laptop1

A simple web interface written in PHP or whatever can search this
database, filter data, sort stuff and simply offer links to the ftp
site...


Just a suggestion...

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: UPDATE from one server to another

2006-06-06 Thread Jason Dimberg

Daniel da Veiga wrote:

On 6/6/06, Jason Dimberg [EMAIL PROTECTED] wrote:

I am working on an application where data will be collected on laptops
and then uploaded to a central database once the laptop is able to
connect to the network after being in the field.  I was initially
thinking of using MS Access as a front end with linked tables through
MySQL ODBC.  I am now considering running WAMP on each machine with a
web interface because there will be no interoperability issues if MySQL
is the db server on both ends, but I am 1.) looking for any
recommendations for the laptop interface (MS Access/WAMP or whatever
other options might be available) and 2.) want to know what is the
actual command for updating a table across two servers (this is NOT
replication, but merely updating new data to an existing table).

Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities
that need to be added to the main Server.  Laptop 2 might have 30 rows
of data that need to be added to the main Server.  Neither laptop needs
to have the data from the other, but the Server will contain data from
both Laptops at the end of the day.  The Server will then offer the data
through a web interface.

Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2



Don't use ACCESS to deal with MySQL Data, you'll probably meet
inconsistencies, along with bugs and problems with field types,
besides, MS sucks...

To sync the laptop with the actual database, you can use a Web
Interface, or simply upload data via ftp or any other protocol (check
for security) and write a script to add this data to MySQL. Are you
sure you're not better served using the filesystem to store the data
and simply indexing names, sizes, maybe a hash for security reasons
(md5 or whatever) and timestamps so you can use the database to
quickly search or organize files but offer them via HTTP or FTP? A
simple app can get info about the file, upload it to the server and
add a row to MySQL with the info and the location of the file in the
filesystem.

You would get something like:

filesystem:
/home/ftp/file1.bin

mysql:
name: file1.bin
location: /home/ftp
size: 1024 bytes
hash: 78687hhg89686578h786
uploaded: 06/06/2006 14:30
from: laptop1

A simple web interface written in PHP or whatever can search this
database, filter data, sort stuff and simply offer links to the ftp
site...


Just a suggestion...


Daniel,

Thanks for the on-topic response! Binary data will be a small portion of 
the data collected in the field (it will be checklists and data entry, 
mostly), but I am glad to hear what you said about Access.  I have some 
fears about integrating it with MySQL and I think I am going to set up 
MySQL on each laptop to avoid those issues altogether and work in an 
environment I am familiar with (PHP/MySQL).


Thanks for your suggestion.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: UPDATE from one server to another

2006-06-06 Thread Daniel Kasak
Jason Dimberg wrote:

 I am working on an application where data will be collected on laptops
 and then uploaded to a central database once the laptop is able to
 connect to the network after being in the field.  I was initially
 thinking of using MS Access as a front end with linked tables through
 MySQL ODBC.  I am now considering running WAMP on each machine with a
 web interface because there will be no interoperability issues if
 MySQL is the db server on both ends, but I am 1.) looking for any
 recommendations for the laptop interface (MS Access/WAMP or whatever
 other options might be available) and 2.) want to know what is the
 actual command for updating a table across two servers (this is NOT
 replication, but merely updating new data to an existing table).

 Data transfered will include binary objects and possibly GIS data.

 For example, Laptop 1 might have 10 rows of data from todays
 activities that need to be added to the main Server.  Laptop 2 might
 have 30 rows of data that need to be added to the main Server. 
 Neither laptop needs to have the data from the other, but the Server
 will contain data from both Laptops at the end of the day.  The Server
 will then offer the data through a web interface.

I'll start with the syncing records.

You can script this in PHP or Perl very relatively. Your main issue is
going to be dealing with primary keys.

Here's how I'd do it.

Each table has a number of fields for tracking changes, eg:
  - inserted
  - edited
  - deleted

These would be boolean fields that your application sets when inserting
/ editing / deleting data.

When the laptops return home to sync with the server, your script would
select all the flagged records and take appropriate action. For example:

- inserts: If you have related records ( ie primary key / foreign key
relationships ), you'll have to do some shuffling of data around, eg
insert record into server, fetch created primary key ( auto_increment ),
then select 'child' relationship stuff from the laptop, and insert this
into the server, using the newly created primary key, and NOT the
primary key from the laptop. If you don't have relationships set up, you
won't have this trouble.

- edits: Just update the entire table with fresh data from the client

- deleted: Delete :)

After you've updated all data, you should probably dump everything (
drop tables, maybe even drop database ), and then import fresh data from
a mysldump ( after you've imported data from the other laptop as well ).

For the interface, let me push my own wheelbarrow for a second ... I've
made a  nifty set of libraries to help you create rich database
front-ends ( using Gtk2 ) that you might be able to make use of instead
of doing your stuff in PHP. They're written in Perl, but if you're doing
simple data entry, you will hardly have to do any code at all. You
create your GUI in Glade, create DBI database handle, and then use my
libraries to connect your database to your GUI. Inserting, deleting, and
applying records are all one-liners, and everything else is taken care
of :) Everything is open-source and cross-platform, and there is even a
module for creating PDF reports. Trust me - it's a LOT less work ( and
trouble ) than doing it in PHP. If you're interested, have a look at:

http://entropy.homelinux.org/axis_not_evil

And also please send feature requests, bug reports, and contributions :)

Dan

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



UPDATE from one server to another

2006-06-05 Thread Jason Dimberg
I am working on an application where data will be collected on laptops 
and then uploaded to a central database once the laptop is able to 
connect to the network after being in the field.  I was initially 
thinking of using MS Access as a front end with linked tables through 
MySQL ODBC.  I am now considering running WAMP on each machine with a 
web interface because there will be no interoperability issues if MySQL 
is the db server on both ends, but I am 1.) looking for any 
recommendations for the laptop interface (MS Access/WAMP or whatever 
other options might be available) and 2.) want to know what is the 
actual command for updating a table across two servers (this is NOT 
replication, but merely updating new data to an existing table).


Data transfered will include binary objects and possibly GIS data.

For example, Laptop 1 might have 10 rows of data from todays activities 
that need to be added to the main Server.  Laptop 2 might have 30 rows 
of data that need to be added to the main Server.  Neither laptop needs 
to have the data from the other, but the Server will contain data from 
both Laptops at the end of the day.  The Server will then offer the data 
through a web interface.


Server:
Linux/MySQL 5.0

Laptops
MS Access 2003 OR
MySQL 5.0/ PHP 5/ Apache 2

Thank you.
--
Jason


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]