Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can utilize 3 approaches to store extension data to the 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 ocasionaly occasionally edited information for products, categories, customers and orders data extension, polls, questioners, etc.

Note

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”.

Image Added