Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

You can utilize 3 approaches to store extension data to the database.

  1. New tables can be created to support the data storage 
  2. Existing tables can be altered to add new fields and indexes. 
  3. Dataset tools are offered by AbanteCart to save data without creating or altering database. 


As first two are straight forward, we will cover #3 in more details. 
Dataset aproach offers quick and worry free method to handle data without dealing with SQL and creating specific database tables. Data can be handled via easy dataset class methods.
Good example for dataset usage will be occasionally edited information for products, categories, customers and orders data extension, polls, questioners, etc.

It is not recommended to use dataset for large sets and transactional type of data, since performance might be affected. Eventhough, we tested performance with 500000 rows, and no slowdown noticed, it is still not desired to use this storage for high traffic read and write.

What is Dataset?

Say you need to develop a poll extension and need to store records of poll questions and answers. Normally, you would create and add 2 or more tables to the databases to handle data for the poll. With the dataset, we created an abstraction layer to the database, that allows you to skip database creation and go directly to handling data.
Dataset class will handle all the data storing and management for you with interface of methods provided. It is very easy. You name new dataset (traditionally table) or use existing dataset . Dataset can be created during extension installation from XML file provided in the extension package. It can be also removed with extension uninstall. No direct access to SQL or database is needed. If restriction access required to the dataset, it needs to be handled pragmatically based on AbanteCart permissions. If you decide to use traditional database tables in extension, you will need to create SQL scripts with install, uninstall and disable extension management process.

How does Dataset work?

First you have to recognize namings in dataset class. There are “object”, “datarow”, “fieldset” and their “definitions”.

  • No labels