Re: Database file checkin - Summary

2003-03-11 Thread Daniel Hurtubise
Hi all,

After reading many replies I have concluded that the best thing to do, in my
humble opinion, is to create a .sql script that can build the database
schema from scratch as well as create all the stored procedures. Then I can
take this script and check it into CVS.

Next, any modifications to stored procedures and table definitions (ie.
Modify stored procedure or modify table) will be saved as sql statements and
stored in CVS (possibly as a patch). At the same time, the master creation
script will be modified and committed to CVS.

This will permit me to keep my DB architecture in sync with my web
application for new installs and it will also permit me to keep my existing
sites up to date.

This way, I'm keeping only text format in CVS and I have full control over
the database structure. Technically, if I had to, I could backup a database,
rebuild it from scratch using the master creation script and then restore
the database.

Regards,
Daniel.
On 3/10/03 23:46, Gurpreet Singh (SCM) [EMAIL PROTECTED] wrote:

 Hi 
 
 well, for SQL server - the way (safe) is to be besides the normal way (.BAK
 / .DAT) of the DB itself is to export the SP's or other Data objects of a DB
 as a simple sql / txt format -  The best method to then checkin to a CVS
 repository. 
 
 Regards
 Gurpreet S
 
 -Original Message-
 From: Daniel Hurtubise [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 10, 2003 11:38 PM
 To: Sherzod Ruzmetov; 'CVS-II Discussion Mailing List'
 Subject: Re: Database file checkin
 
 
 Hi. The replies I received to date have been very helpful, thanks.
 I have a follow up question.
 
 What do people typically do with stored procedures?
 
 Or rephrased, do you save the stored procedures to a file and then check it
 into CVS, or do you simply do a backup as I described in my previous email?
 
 Basically, I'm hunting for best practice, having no previous experience in
 this area.
 
 Thanks in advance for your valued wisdom.
 
 Daniel.
 On 3/10/03 11:21, Sherzod Ruzmetov [EMAIL PROTECTED] wrote:
 
   : Has anybody checked in a database backup into CVS? I know
   : this may sound
   : odd, but I was thinking of taking a snapshot of my SQL
   : Server database in a
   : empty data state and then checking it into CVS.
 
 
 I do a similar thing, but I keep ONLY table schemas, since I never
 felt need to Version-Control the whole database. But if you
 have a reason for doing so, and if you think CVS can help you
 with it, give it a shot, and let the list know.
 
   : Will there be any issues with checking that backup out of
   : CVS and restoring
   : a new database from it?
 
 No, there will not be, as long as your database backup is a text/plain
 file (similar to the output of mysqldump utility), which makes more
 sense.
 
 sherzod
 
 
 
 
 
 ___
 Info-cvs mailing list
 [EMAIL PROTECTED]
 http://mail.gnu.org/mailman/listinfo/info-cvs



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Database file checkin

2003-03-10 Thread Mark D. Baushke
Daniel Hurtubise [EMAIL PROTECTED] writes:

 Dear CVS Users,
 
 Has anybody checked in a database backup into CVS? I know this may sound
 odd, but I was thinking of taking a snapshot of my SQL Server database in a
 empty data state and then checking it into CVS.
 
 Basically, I just want to track my stored procedures and table schemas
 because I replicate this database for distinct customers. The database is
 tightly coupled to a Web application which I manage under CVS also and I'll
 like to keep both the database and web application components in sync.
 
 Will there be any issues with checking that backup out of CVS and restoring
 a new database from it? I will test this on my own, but I was wondering if
 anyone else has taken this path before.

Most databases contain binary files and cvs is not optimized well for
dealing with lots of versions of binary files.

If the 'snapshot' you are taking is in plain text, then you will
probably not have a problem using cvs. 

You may wish to tag significant collections of files as being consistent
at a given time to make restoration easier.

Good luck,
-- Mark


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


RE: Database file checkin

2003-03-10 Thread Brian Kowald
Sure, just store the backup file as binary.  Another option is to store the
scripts for creating the tables and stored procedures since they are text
files, which is what cvs was born to work with.  That is how I have seen
DBA's do it.  You could then use the merging capability of cvs. You might
also have upgrade scripts to store when going from one version of your app
to another to store.

Brian


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Daniel
Hurtubise
Sent: Monday, March 10, 2003 11:35 AM
To: CVS-II Discussion Mailing List
Subject: Database file checkin


Dear CVS Users,

Has anybody checked in a database backup into CVS? I know this may sound
odd, but I was thinking of taking a snapshot of my SQL Server database in a
empty data state and then checking it into CVS.

Basically, I just want to track my stored procedures and table schemas
because I replicate this database for distinct customers. The database is
tightly coupled to a Web application which I manage under CVS also and I'll
like to keep both the database and web application components in sync.

Will there be any issues with checking that backup out of CVS and restoring
a new database from it? I will test this on my own, but I was wondering if
anyone else has taken this path before.

Thanks.
Daniel.



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs




___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Database file checkin

2003-03-10 Thread Daniel Hurtubise
Hi. The replies I received to date have been very helpful, thanks.
I have a follow up question.

What do people typically do with stored procedures?

Or rephrased, do you save the stored procedures to a file and then check it
into CVS, or do you simply do a backup as I described in my previous email?

Basically, I'm hunting for best practice, having no previous experience in
this area.

Thanks in advance for your valued wisdom.

Daniel.
On 3/10/03 11:21, Sherzod Ruzmetov [EMAIL PROTECTED] wrote:

   : Has anybody checked in a database backup into CVS? I know
   : this may sound
   : odd, but I was thinking of taking a snapshot of my SQL
   : Server database in a
   : empty data state and then checking it into CVS.
 
 
 I do a similar thing, but I keep ONLY table schemas, since I never
 felt need to Version-Control the whole database. But if you
 have a reason for doing so, and if you think CVS can help you
 with it, give it a shot, and let the list know.
 
   : Will there be any issues with checking that backup out of
   : CVS and restoring
   : a new database from it?
 
 No, there will not be, as long as your database backup is a text/plain
 file (similar to the output of mysqldump utility), which makes more
 sense.
 
 sherzod
 
 



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Database file checkin

2003-03-10 Thread Daniel Hurtubise
I believe this is the best solution.
Thanks.
Daniel.
On 3/10/03 11:55, Brian Kowald [EMAIL PROTECTED] wrote:

 Sure, just store the backup file as binary.  Another option is to store the
 scripts for creating the tables and stored procedures since they are text
 files, which is what cvs was born to work with.  That is how I have seen
 DBA's do it.  You could then use the merging capability of cvs. You might
 also have upgrade scripts to store when going from one version of your app
 to another to store.
 
 Brian
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Daniel
 Hurtubise
 Sent: Monday, March 10, 2003 11:35 AM
 To: CVS-II Discussion Mailing List
 Subject: Database file checkin
 
 
 Dear CVS Users,
 
 Has anybody checked in a database backup into CVS? I know this may sound
 odd, but I was thinking of taking a snapshot of my SQL Server database in a
 empty data state and then checking it into CVS.
 
 Basically, I just want to track my stored procedures and table schemas
 because I replicate this database for distinct customers. The database is
 tightly coupled to a Web application which I manage under CVS also and I'll
 like to keep both the database and web application components in sync.
 
 Will there be any issues with checking that backup out of CVS and restoring
 a new database from it? I will test this on my own, but I was wondering if
 anyone else has taken this path before.
 
 Thanks.
 Daniel.
 
 
 
 ___
 Info-cvs mailing list
 [EMAIL PROTECTED]
 http://mail.gnu.org/mailman/listinfo/info-cvs
 
 
 
 
 ___
 Info-cvs mailing list
 [EMAIL PROTECTED]
 http://mail.gnu.org/mailman/listinfo/info-cvs



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


Re: Database file checkin

2003-03-10 Thread Wayne Johnson
I don't have much experience with DBs, but best practices for binary
files on CVS are fairly straight forward:

CVS will maintain separate copies (within it's one repository file) of
each version of a binary file.  If you have many revisions or large
binary files you will chew up lots of disk space.  You also have no diff
or merge capabilities with binary files.

If it is possible to keep the text for a procedure around for CVS, do it.
 It adds a lot of additional capabilities, like when you ask yourself,
when did I change that and why?  Or, gee, what did I change to break
this?

Coding without CVS is like walking a tightrope without a net.  Sure, you
might be skilled enough to do it, but for how long before your a splat on
the floor.

--- Daniel Hurtubise [EMAIL PROTECTED] wrote:
 Hi. The replies I received to date have been very helpful, thanks.
 I have a follow up question.
 
 What do people typically do with stored procedures?
 
 Or rephrased, do you save the stored procedures to a file and then
 check it
 into CVS, or do you simply do a backup as I described in my previous
 email?
 
 Basically, I'm hunting for best practice, having no previous experience
 in
 this area.
 
 Thanks in advance for your valued wisdom.
 
 Daniel.
 On 3/10/03 11:21, Sherzod Ruzmetov [EMAIL PROTECTED] wrote:
 
: Has anybody checked in a database backup into CVS? I know
: this may sound
: odd, but I was thinking of taking a snapshot of my SQL
: Server database in a
: empty data state and then checking it into CVS.
  
  
  I do a similar thing, but I keep ONLY table schemas, since I never
  felt need to Version-Control the whole database. But if you
  have a reason for doing so, and if you think CVS can help you
  with it, give it a shot, and let the list know.
  
: Will there be any issues with checking that backup out of
: CVS and restoring
: a new database from it?
  
  No, there will not be, as long as your database backup is a
 text/plain
  file (similar to the output of mysqldump utility), which makes more
  sense.
  
  sherzod
  
  
 
 
 
 ___
 Info-cvs mailing list
 [EMAIL PROTECTED]
 http://mail.gnu.org/mailman/listinfo/info-cvs


=
---
Wayne Johnson, | There are two kinds of people: Those 
3943 Penn Ave. N.  | who say to God, Thy will be done, 
Minneapolis, MN 55412-1908 | and those to whom God says, All right, 
(612) 522-7003 | then,  have it your way. --C.S. Lewis

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


RE: Database file checkin

2003-03-10 Thread Gurpreet Singh (SCM)
Hi 

well, for SQL server - the way (safe) is to be besides the normal way (.BAK
/ .DAT) of the DB itself is to export the SP's or other Data objects of a DB
as a simple sql / txt format -  The best method to then checkin to a CVS
repository. 

Regards
Gurpreet S

-Original Message-
From: Daniel Hurtubise [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 11:38 PM
To: Sherzod Ruzmetov; 'CVS-II Discussion Mailing List'
Subject: Re: Database file checkin


Hi. The replies I received to date have been very helpful, thanks.
I have a follow up question.

What do people typically do with stored procedures?

Or rephrased, do you save the stored procedures to a file and then check it
into CVS, or do you simply do a backup as I described in my previous email?

Basically, I'm hunting for best practice, having no previous experience in
this area.

Thanks in advance for your valued wisdom.

Daniel.
On 3/10/03 11:21, Sherzod Ruzmetov [EMAIL PROTECTED] wrote:

   : Has anybody checked in a database backup into CVS? I know
   : this may sound
   : odd, but I was thinking of taking a snapshot of my SQL
   : Server database in a
   : empty data state and then checking it into CVS.
 
 
 I do a similar thing, but I keep ONLY table schemas, since I never
 felt need to Version-Control the whole database. But if you
 have a reason for doing so, and if you think CVS can help you
 with it, give it a shot, and let the list know.
 
   : Will there be any issues with checking that backup out of
   : CVS and restoring
   : a new database from it?
 
 No, there will not be, as long as your database backup is a text/plain
 file (similar to the output of mysqldump utility), which makes more
 sense.
 
 sherzod
 
 



___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs


___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs