Re: Capturing snapshots of content

2006-01-05 Thread Gleb Paharenko
Hello.



 But I will need to parse the dump output to append every single CREATE

 and INSERT statement to be the new table name. Does mysql cater for

 this or will I have to write a parse script to do this for me?



Probaly instead of parsing the INSERT and CREATE statements, it would

be easier to work with plain files (which mysqldump produces with --tab

option). See:

  http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

  http://dev.mysql.com/doc/refman/5.0/en/load-data.html







Jonathan Chong wrote:

 Hi everyone

 

 One of the projects I am working on requires me to take snapshots of

 the Content Management System from certain points in time (usually

 before a change is made).

 

 These snapshots contain everything (not just the page contents), from

 navigation ordering to user permissions to actual content. This is so

 the client can go back in time and see what the CMS looked like then.

 

 I have 10 tables that I need to capture data from.

 

 The way I'm thinking of doing this is to do a dump of those 10 tables.

 When a snapshot is requested, it writes the dump file to a snapshot

 table, whose columns is every single column from those 10 tables.

 

 This is so I can do a select from that one table to get a snapshot of the C=

 MS.

 

 But I will need to parse the dump output to append every single CREATE

 and INSERT statement to be the new table name. Does mysql cater for

 this or will I have to write a parse script to do this for me?

 

 Another option would be to have a snapshot_id column in every table,

 but is slightly more messy from my point of view.

 

 Please let me know your thoughts, thanks.

 

 --

 Jonathan Chong

 

 http://www.arsenal-now.com/

 http://www.arsenal-mania.com/

 http://www.ashburrn.com/

 http://www.jonathan-chong.com/

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Capturing snapshots of content

2005-12-30 Thread Jonathan Chong
Hi everyone

One of the projects I am working on requires me to take snapshots of
the Content Management System from certain points in time (usually
before a change is made).

These snapshots contain everything (not just the page contents), from
navigation ordering to user permissions to actual content. This is so
the client can go back in time and see what the CMS looked like then.

I have 10 tables that I need to capture data from.

The way I'm thinking of doing this is to do a dump of those 10 tables.
When a snapshot is requested, it writes the dump file to a snapshot
table, whose columns is every single column from those 10 tables.

This is so I can do a select from that one table to get a snapshot of the CMS.

But I will need to parse the dump output to append every single CREATE
and INSERT statement to be the new table name. Does mysql cater for
this or will I have to write a parse script to do this for me?

Another option would be to have a snapshot_id column in every table,
but is slightly more messy from my point of view.

Please let me know your thoughts, thanks.

--
Jonathan Chong

http://www.arsenal-now.com/
http://www.arsenal-mania.com/
http://www.ashburrn.com/
http://www.jonathan-chong.com/

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