2. 4. Identifying data structures
Choose the right data structure for different requirements to make data management simple for business users, and data re-purposing easy for developers.
Data design process
- Define data structure (e.g., fields, field types, etc.) for each data object (e.g., news, products).
- Define relationships between your data objects (e.g., related articles).
- Identify functional requirements of data objects (e.g., workflow, versioning, security).
- Identify which data objects to use (e.g., page type, custom tables, custom modules).
Structured vs Unstructured Content
Use structured content when you have data that can be expressed as a discrete set of fields. These fields make it easier for content editors to enter content reliably. They also allow developers to digest the content more easily and reuse it throughout the web site. This type of content is dynamically added to a page through various means such as transformations or macros.
Use unstructured content when the data cannot be expressed as a discrete set of fields. This kind of content is generally entered directly by content editors as HTML or assembled from web parts or widgets.
Storing data in Kentico
Kentico allows you to store data in:
- Built-in page types in the content tree
- Custom page types in the content tree
- Custom tables
- Custom modules
- System objects (e.g. user)
A partner was building a college web site and needed to allow faculty members to update their own bio. The client also required that the updates be approved by the marketing team.
The partner used a custom page type for the data since there were discrete fields and they needed a workflow for the bios. They stored the pages in folders by departments and used tags to associate them with courses they were teaching.
A college client needed to manage a complex course catalog. They needed to relate the courses to one another as prerequisites, link them to degree programs, and associate them to semesters in which they would be offered.
As the relationships required many-to-many and one-to-many relationships, the partner building this web site decided to implement this as a custom module. This allowed them to create the necessary relationships while still making the data fairly easy to manage in the administration interface. They configured search indexes to allow students to search the courses and defined templates with wildcard URLs to handle content display.
A college client needed to display a staff phone directory. The data came from an active directory, but they wanted to make the directory searchable by name.
The partner created a custom table to store the data, set up a scheduled task to regularly update the information, and added a smart search index for this table to provide searching capability.