Database Upsize Genie Feature Pack

To purchase this Feature Pack, please click here.

 

The Database Upside Genie is for developers who have developed a Desktop Application in Alpha Five that uses Alpha Five's native .dbf tables for data storage. The Genie allows you to 'upsize' your application to use a SQL database for data storage.

There are many benefits to using a SQL database for the data storage in your application. These benefits include:

 

Watch Video - Part 1

Watch Video - Part 2

Watch Video - Part 3

 

 

What Does the Upsize Genie Do?

The Upsize Genie:

It is important to note that the Upsize Genie does not modify your existing Application in any way at all. The Upsize Genie creates a new database (i.e. an Alpha Five .adb file). This means that there is no risk in using the Upsize Genie.

However, keep in mind that (obviously) if you continue to use the native table version of your Application after you have upsized it, any edits to records that you make in the old version of your Application will not be reflected in the Upsized tables!

 

Before the Upsize Genie can actually start creating tables in the SQL database, or exporting data, it must first analyze your existing native tables to see if they comply with all of the necessary pre-requisites.

For example, assume that your application has two tables: 'Invoices' and 'Customer'. The 'Customer' table has an auto-increment field called 'Customer_Id' and this field contains values such as 'AAAA', 'AAAB', 'AAAC' etc. The 'Invoices' table has a field called 'CustID' which contains linking values to the 'Customer' table. By analyzing the structure of the Sets in your application Alpha Five will deduce that the 'Customer_id' field in the 'Customer' table is related to the 'CustID' field in the 'Invoices' table. When it changes the data type of the 'Customer_Id' field to numeric, it will therefore also change the data type of 'CustID' to numeric. When the value of 'AAAA' in the first 'Customer' record is changed to a numeric value (say '1'), then Alpha Five will automatically find all records in the 'Invoices' table with a value of 'AAAA' in the 'CustID' field (there could be many records) and change these values to '1' as well so that the relationship between records in the two tables is kept intact.

 

Limitations of the Upsize Genie

The Upsize Genie does an excellent job of upsizing your application to use a SQL database. In many cases the upsized Application will just work without the need for any additional changes.

However, there are some things in your upsized Application that might need to be adjusted before they work as expected.

If you have any Xbasic code in your application that explicitly opens a table and set the primary index of the table, this will no longer work on an upsized table. This is because active-link tables do not have indexes. You should change your code to use server side queries instead.

For example, here is some  old style code that sets an index and then finds a record:

dim t as p

t = table.open("customer")

dim i as p

i = t.index_primary_put("Lastname")

t.fetch_find("Smith")

 

If 'customer' is now an active-link table, you would change this code to:

dim t as p

t = table.open("customer")

t.ServerSideQueryRun("lastname = 'Smith'")

 

Note that the filter expression passed to the .ServerSideQueryRun() method uses SQL syntax.

 

Using the Database Upsize Genie

To launch the Database Upsize Genie select the Tools, Database Upsize Genie command.

If you do not see this command, then you must install the latest Alpha Five update. Go to the Help, Download Patches menu command.

The Genie appears:

Follow all of the steps in the Genie and then when you are done, Alpha Five will upsize your Application.

Before the Genie actually starts to create tables in the SQL database it will give a summary of the work that is necessary to fix your application.

 

 

 

 

 

 

'