Location: PHPKode > projects > deltasql > deltasql-1.0.8/faq.php
<html>
<head>
<title>deltasql - Frequently Asked Questions (FAQ)</title>
<link rel="stylesheet" type="text/css" href="deltasql.css">
</head>
<body>
<?php
include("head.inc.php");
include("utils/utils.inc.php");
include("utils/constants.inc.php");

?>
<br>
<a href="index.php">Back to Main Menu</a>
<br>
<h2>Frequently Asked Questions (FAQ)</h2>

<ul>
<li><a href="#about">What is deltasql for?</a></li>
<li><a href="#install">Is it difficult to install?</a></li>
<li><a href="#quick">Is there a Quick Guide?</a></li>
<li><a href="#table">Where is the script that I need to launch in my database, so that deltasql can work?</a></li>
<li><a href="#query">Which is the query I need to launch to retrieve the current schema version?</a></li>
<li><a href="#client">What is the purpose of the client?</a></li>
<li><a href="#branch">How can I create a branch?</a></li>
<li><a href="#duplicatebranch">Is it possible to create a branch of a branch?</a></li>
<li><a href="#modules">Why are there projects and modules?</a></li>
<li><a href="#downgrade">Is it possible to downgrade a database schema to a previous schema?</a></li>
<li><a href="#contribute">How can I contribute?</a></li>
<li><a href="#upgrade">I saw on the webpage that there is a new deltasql version, how do I upgrade?</a></li>
<li><a href="#scripttitle">All scripts are titled "db update". Where can I change this default?</a></li>
<li><a href="#colors">What do the colored rows mean in the 'List scripts' view and on the Google Gadget?</a></li>
<li><a href="#question">I have another question, where to submit it?</a></li>
</ul>


<h3><a name="about"></a>What is deltasql for?</h3>
<p>
deltasql is a tool which is suitable for the "Agile Development" model, where developers often change the data model on the fly.
 deltasql allows to propagate the data model changes to all team members, so that anyone in the development team has a consistent
  database schema that matches the current source code. When the software reaches a stable milestone, deltasql supports the branching
   of the development db schema to a production schema. deltasql is also able to transform a development schema into a production schema 
   and viceversa.
</p>
<p>deltasql is Open Source and licensed under the General Public License, so there aren't any fees or charge for using it.</p>

<h3><a name="install"></a>Is deltasql difficult to install?</h3>
<p>
deltasql is based on the LAMP stack (Linux, Apache, mySQL, PHP). It has the same difficulty as to setup a discussion forum on a webpage.
 deltasql has an automatic install page, though it can be installed step-by-step. Everything should be explained in 
 the <a href="manual.php#install-server">manual</a>.
</p>

<h3><a name="quick"></a>Is there a Quick Guide?</h3>
<p>
Yes, there is one in the <a href="manual.php#quickguide">manual</a>.
</p>


<h3><a name="table"></a>Where is the script that I need to launch in my database schema, so that deltasql can work?</h3>
<p>
You can find the script in the <a href="list_projects.php">List Projects</a> page of deltasql, if for the corresponding project you click on the
 <b>Table</b> link. After that you need to choose your database type, and if your database schema will follow HEAD or stay one of the available
  branches. 
</p>
<p>
  deltasql will then generate for you a) the table TBSYNCHRONIZE, b) the first row of this table and c) an additional stored procedure
   to protect your schema from wrong scripts (c is only for some database types).
</p>

<h3><a name="query"></a>Which is the query I need to launch to retrieve the current schema version?</h3>
<p>
The query is:
</p>
<pre>
select * from TBSYNCHRONIZE where versionnr = (select max(versionnr) from TBSYNCHRONIZE);
</pre>
<p> The most important column is <tt>versionnr</tt> that contains the last version of the executed script.
The interesting columns are <tt>projectname</tt> with the project name and 
<tt>branchname</tt> that contains either <b>HEAD</b> for a development schema, or another name for a production schema.
</p>

<h3><a name="client"></a>What is the purpose of the client?</h3>
<p>
The purpose of the client is to speed up the upgrade of a database schema. The client normally implements two steps:
 1) the lookup of the current version in a given database schema and 2) issuing the request to deltasql for generating the
  upgrade script. The third step of executing the script in the database schema is left to the user.
</p>
<p>
In the manual, you can find instructions <a href="manual.php#install-clients">how to install</a> the available clients.
 Also there, you find <a href="manual.php#write-client">information</a> on how to write your own client. If you wrote one
  and would like to share it, contact please the <a href="mailto:gpu-hide@address.com">mailing list</a>. Thanks!
</p>
<h3><a name="branch"></a>How can I create a branch?</h3>
<p>
Branches are defined at the project level. Therefore you should select the row in <a href="list_projects.php">List Projects</a> and click on the
 <b>Branch</b> link. You then give a name and a description to the branch. The description is just a mnemonic to remember in which circumstances
  you created the branch. 
</p>
<p>  
  From now on, you can use the <a href="dbsync.php">Synchronization Form</a> to transform your current HEAD schema into the branch
   schema (also called the production schema). Remember to choose in the Synchronization Form for the field <i>From:</i> the value HEAD, 
and for the field <i>Update To:</i> the new branch you created in deltasql. 
</p>
<p>
After launching the script generated by the Synchronization Form, the database scripts will be only
    the ones explicitely marked also for the branch.
</p>

<h3><a name="duplicatebranch"></a>Is it possible to create a branch of a branch?</h3>
<p>
Yes, it is possible to do this by duplicating a branch. In the page <a href="list_branches.php">List Branches</a> you can click
on the <b>Duplicate</b> button (if you have rights as a Project Manager or as an Administrator). The duplication
  process will create a new branch that starts at the same point as the old branch. All scripts that are tagged
   with the old branch will be tagged also with the new branch. From now on, when submitting a new script, it is possible
    to decide if it belongs to the old, to the new or to both branches.
 </p>
<p>
To upgrade a production schema from the old branch to the new branch, you should run this query in the schema:
</p>
<pre>
/* substitute NEW_BRANCH with the new branch name */
UPDATE TBSYNCHRONIZE SET BRANCHNAME='NEW_BRANCH' WHERE versionnr= (select max(versionnr) from TBSYNCHRONIZE);
</pre> 
<p>After launching this update to the table TBSYNCHRONIZE the schema will follow the new branch and everything will work as expected.</p>

<h3><a name="modules"></a>Why are there projects and modules?</h3>
<p>
There are both project and modules, and a project contains from one to several modules. Big projects might be splitted in several subprojects, and each subproject (=module) has some particular
 additional functionality that needs to be managed separately. Or in other configurations, companies like to define a module for the utilities common
  to all development done by the company (e.g. tables like TBUSER belong to this module), one module representing the main software itself, and one module
   represented by the customizations on the software done for one particular customer. 
</p>
<p>   
   Adding and removing modules to a project is also done in the
    <a href="list_projects.php">List Projects</a> page.
</p>

<h3><a name="contribute"></a>How can I contribute?</h3>
<p>
deltasql has a project page on <a href="http://sourceforge.net/projects/deltasql">sourceforge</a>. Feel free to check out the code and experiment with it,
 or to submit bug and feature requests. Any contributions (also from newbies) is welcome :-) Open Source is the best way to learn the
  fascinating world of Computer Science!
</p>


<h3><a name="downgrade"></a>Is it possible to downgrade a database schema to a previous schema?</h3>
<p>
No, unfortunately not, as developers submit scripts like "ALTER TABLE ADD" or "INSERT INTO TB..." and they do not provide an SQL script that
 reverts the change. deltasql has not sufficient artificial intelligence to generate scripts that revert the database to the previous state. If reversal is necessary, 
 developers need to provide the reverting scripts by adding them to deltasql.
</p>

<h3><a name="upgrade"></a>I saw on the webpage that there is a new deltasql version, how do I upgrade?</h3>
<p>
First, read through the <a href="http://www.gpu-grid.net/deltasql/docs/ChangeLog.txt">Changelog</a> to see if there is something interesting, or if some
 bug is fixed.  Then, simply download from the <a href="https://sourceforge.net/project/showfiles.php?group_id=212117&package_id=255379">webpage</a> the latest
  deltasql package and unzip (or untar) it at the same place where you installed it. In the ChangeLog, you will also see if it is necessary to upgrade
   the deltasql schema (it will contain the ALTER TABLE commands you will execute on the deltasql schema). The published package will not overwrite
   your <tt>conf/config.inc.php</tt> file, and everything should still work as expected.
</p>
<p>   If not, please contact the <a href="mailto:gpu-hide@address.com">mailing
    list</a> for further support.
</p>

<h3><a name="scripttitle"></a>All scripts are titled "db update". Where can I change this default?</h3>
<p>
You can change the variable <tt>$default_script_title</tt> in the file <tt>config.inc.php</tt> in the directory <tt>conf</tt>.
</p>


<h3><a name="colors"></a>What do the colored rows mean in the 'List scripts' view and on the Google Gadget?</h3>
<p>
The colored rows just show how old the first submission of a script was. The row is green if the script
 was submitted in the last 20 minutes, yellow if it is less than 5 hours old and blue if it is less than one day old.
</p>


<h3><a name="question"></a>I have another question, where to submit it?</h3>
<p>
You can submit your question to the <a href="mailto:gpu-hide@address.com">GPU mailing list</a>.
</p>




<a href="index.php">Back to Main Menu</a>

</body>
Return current item: deltasql