473,785 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how could mysql copy only inserted data to the central-database?

we are designing a data collecting system, at each site we have a
database and have a central database,we will write data to site's
database, we want the site-database can publish
the data to central-database Asynchronously, how could we do that?

single replication sounds work,but it will replicate all update
,including delete ,we dont want that,we want only inserted data .

Mar 23 '06 #1
1 1948
ro*******@gmail .com wrote:
we are designing a data collecting system, at each site we have a
database and have a central database,we will write data to site's
database, we want the site-database can publish
the data to central-database Asynchronously, how could we do that?

single replication sounds work,but it will replicate all update
,including delete ,we dont want that,we want only inserted data .


This is something I have seen done in many different ways. Basically
your central database is a slave to many masters - unless you also push
something to the remote databases on a regular basis (n-way
replication). I have not read all of the rules and abilities of the
replication options, but so far I do not see how to restrict your
replicated data to just insert/update. Maybe this weekend I will see if
I can dig something up.

Make sure your tables that are to be replicated have an insert timestamp
and an update timestamp. you would then write a process that would
extract records inserted/updated since last update (have an update table
that uses a timestamp to determine the "end of the last period") and
push those records to the central repository.

Now what gets really fun here is any referencial integrity that must be
maintained. Description tables must be uploaded before data tables etc...

Just thought of something...
If you use multi-master replication it might be possible to have a
tablename in the slave (central-server) that has a before-delete trigger
to move the data to a "history" table.

These are all things you will need to consider and I generally charge
big $$$ for creating/designing such databases :)

Mar 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2068
by: John | last post by:
Hi. I am just in the very early stages of learning Php and just need a little help. I have a form which includes values. However when I test it, the values are not added up and carried to the results page. I just wondered if you can spot whats wrong with it?
3
2245
by: hshen | last post by:
Hi All, I have encountered a weird behavoir of embedded MySQL. Through a simple program I made (in Delphi 6), I can insert rows to a table through embedded MySQL and I can retrieve the rows from my program. But using mysql.exe which points to the same table (through 127.0.0.1, with the same basedir and datadir), I cannot see the rows I inserted using my embedded program. Another way around, the rows inserted by mysql.exe can be seen...
0
1341
by: albert | last post by:
Dear, Now i'm trying to install MySQL 4.0.14 through binary source install. I'm using Redhat 7.2 and 8.0 I'm trying like this.. ../configure --prefix=/usr/local/mysql \ --localstatedir=/usr/local/mysql/data \
24
2146
by: Ehud Shabtai | last post by:
Hi, I would like to store samples of data which are gathered from about 500 devices in mysql. Each device has its own data which changes over time. The data may be integer or float. The queries I'm interested in our something like: "show me when the data from device X was greater than 70 and the data from device Y was greater than 90".
5
2926
by: Clodoaldo Pinto Neto | last post by:
Hello, How to make sure COPY TO writes the table lines to the file in the same order they were inserted? I'm producing html pages in pl/pgsql and using COPY TO to write then to file. Occasionaly, about once in 7 or 9, the lines are copied to the file out of the order they were inserted in the table. The lines have one only column of the type text.
2
9001
by: pmz | last post by:
Dear Group, I'm connecting in C# with remote (BSD) MySQL server with ODBC Driver, and I'm trying to find the best sollution in such problem: As I've read on MySQL manual, they have suggested table design including the BLOB-Fieldtype size in UInt64, where they've stored, while inserting, the size of inserted BLOB data. But in the matter of fact, I'm interested if it's necessary to include in table this integer field? Is there any way...
3
3904
by: sp3d2orbit | last post by:
I've read the MySQL licensing material and what I've found online, but I'm still unclear about when I have to pay MySQL for a license. Scenario: I've created an application that stores some data in MySQL 5.0 (InnoDB table types). It connects to MySQL 5.0 via MyODBC. 1.) If I include MySQL 5.0 and MyODBC in the installer, do I have to buy a separate MySQL license for every copy of the installer I sell? 2.) If I include MySQL 5.0 and...
30
2843
by: Einstein30000 | last post by:
Hi, in one of my php-scripts is the following query (with an already open db-connection): $q = "INSERT INTO main (name, img, descr, from, size, format, cat, host, link, date) VALUES ('$name', '$img', '$descr', '$user', '$size', '$format', '$cat', '$host', '$link', '$date')" or die(mysql_error()); And when the query gets executed i get back the following error:
0
3355
by: brianrpsgt1 | last post by:
I am attempting to insert data from a HTML form using a .psp script. I can not find how to link the data that is inserted into the form to the variables in the .psp script to then insert into the MySQL Insert statement. I am familiar with PHP, where you would write $_POST(), however I can not find the equivalent in PSP. I believe that this is the my missing piece. Technically, what is occurring that that when I click the 'Submit'...
4
3571
by: hiitzsdg | last post by:
Hi All, I am completely new to VBA and I am trying to develop a macro in a workbook (Backup.xls). The main functionality of the macro is: 1. It would open another workbook (Source.xls). 2. This workbook is regularly updated. The previously updated rows are replaced with new rows everyday. 3. Copy the newly updated row. 4. Paste the copied row after the previously inserted row. The number of rows that can be present in the source.xls...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8978
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.