|
||
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 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 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 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, ...) |
||
Can hold binary stream data (files) |
||
Can hold one-to-many data (radio buttons, drop-down lists) |
||
Data can be formatted using transformations |
||
Can be used as an E-commerce product |
||
Can be displayed by 'Listings' web parts |
||
Can be displayed by 'Navigation' web parts |
||
Workflow |
||
Versioning |
||
Multilingual content |
||
Hierarchical data structure |
||
Each record has its own URL |
||
Data can be accessed using API |
||
Importable / Exportable |
||
Performance |
||
Recommended for large data sets when using flat data structure |
||
Number of database tables that store the data |
3+ |
1 |
Recommended for large binary data |
||
Binary data can be stored in file system |
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 |
||
Direct access to the data without querying database |
||
Number of database tables that store the data |
3+ |
2 |
Binary data can be stored in file system |