Kentico CMS 7.0 Developer's Guide

Storing data effectively

Storing data effectively

Previous topic Next topic Mail us feedback on this topic!  

Storing data effectively

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

When storing data in Kentico, you should consider whether you want to store it in Documents, Custom tables or Media libraries. Each of the options was created with different use in mind and thus provides various advantages over the others. Refer to the following text to see a comparison of the approaches:

 

Documents

 

Documents offer a hierarchical tree data structure for storing data. You can use them in a workflow or to hold multilingual content without having to use localization macros.

 

Custom tables

 

Custom tables provide you with better performance than Documents when storing data in a flat structure. Consider using custom tables when you need to store a large amount of structured items. To localize custom table data, you need to use localization macros.

 

Learn more about custom tables.

 

Media libraries

 

Media libraries are designed to store large files — not exclusively of media character — such as videos, high-res images or packaged files. You can access media library files without overhead as there is no need to query a database in order to access them.

 

Learn more about Media libraries.

 

Comparing documents with custom tables

 

 

Documents

Custom tables

Can hold traditional data types (int, float, ...)

Approve

Approve

Can hold binary stream data (files)

Approve

Delete

Can hold one-to-many data (radio buttons, drop-down lists)

Approve

Approve

Data can be formatted using transformations

Approve

Approve

Can be used as an E-commerce product

Approve

Delete

Can be displayed by 'Listings' web parts

Approve

Approve

Can be displayed by 'Navigation' web parts

Approve

Delete

Workflow

Approve

Delete

Versioning

Approve

Delete

Multilingual content

Approve

Approve1

Hierarchical data structure

Approve

Delete

Each record has its own URL

Approve

Delete2

Data can be accessed using API

Approve

Approve

Importable / Exportable

Approve

Approve

Performance

Recommended for large data sets when using flat data structure

Delete

Approve

Number of database tables that store the data

3+

1

Recommended for large binary data

Delete

Delete

Binary data can be stored in file system

Approve

Delete

 

1) You can translate custom table data using localization macros only.

2) You can access custom table records via listing web parts and query string URL parameters.

 

Comparing documents with media libraries

 


Documents

Media libraries

Recommended for large binary data

Delete

Approve

Direct access to the data without querying database

Delete

Approve

Number of database tables that store the data

3+

2

Binary data can be stored in file system

Approve

Approve