KonaKart Logo Documentation
Search
Create a Database

Create a Database

KonaKart needs a JDBC-compliant database. For the downloadable osCommerce-compatible version of KonaKart you must use either MySQL (with the InnoDB engine to get support for transactions), PostgreSQL, Oracle, DB2 or MS SQL Server but if you would like KonaKart to be supported on any other database please contact us. MySQL works well with KonaKart and is free so this makes a popular choice. You can obtain MySQL from http://www.mysql.com/.

Check the specific notes for each database to verify that the database you plan to use is fully supported (see below in this FAQ) or whether you might have to take a few additional manual steps to load the database objects.

Since KonaKart is compatible with the osCommerce database, if you already have an osCommerce database you can use that for KonaKart. If this is the case you only need to run a small supplementary SQL script for KonaKart (see below). (If you wish to keep the data in your existing osCommerce database (as you probably will do) take care not to run the full database initialization script which will re-create all your tables).

Once the database is installed, create a new database user for KonaKart then either run the installation wizard which will (optionally) load up the database ready for using KonaKart, or if you prefer, execute the SQL script appropriate for your chosen database manually. The database initialization scripts are provided for all supported databases under the database directory under your KonaKart installation directory.

If you already have an osCommerce database

If you are already an osCommerce user you can use the database that you have already created. The advantage of doing this is that you will not have to load up all of your configuration parameters again (especially the product catalog!). All that you have to do in this case is run a small supplementary SQL script, appropriate for your database platform (this will almost certainly be MySQL as osCommerce is currently only supported on MySQL). The supplementary script can be found under the database/MySQL directory under the KonaKart home directory (i.e. where you installed KonaKart).

Note that executing this supplementary script should not break your current osCommerce system from working, but we only recommend that you run it on a test database and not a production database. The SQL run for KonaKart does not change any osCommerce database values, it merely adds a few configuration parameters, specific to KonaKart.

Note that if you wish to keep the data in your existing osCommerce database (as you probably will do) take care not to run the full database initialisation script which will re-create all your tables.

Upgrading the Database between releases of KonaKart

Starting with the upgrade from KonaKart v2.2.0.0 to v2.2.0.1 there will always be an upgrade script provided that can be run on your database without risking the loss of your existing data (although it is always recommended to backup your database on a regular basis). The upgrade script will apply all the database changes that are required to upgrade a database being used for a specified KonaKart version to the next.

As an example a script called upgrade_2.2.0.0_to_2.2.0.1.sql is provided that will upgrade your database being used on a KonaKart v2.2.0.0 system to one suitable for a KonaKart v2.2.0.1 system.

If you chose to skip KonaKart releases for whatever reason, you will have to apply the upgrade scripts for all intermediate releases - all upgrade scripts are planned to be shipped with all future releases.

Another option is to run the full database creation script (see above) which is always provided for every release. Note that this has the disadvantage of clearing away all of the data you may have set up for your KonaKart store (eg. your special configuration data, your catalogs etc) so will probably not be the preferred option for existing storekeepers.