Start page / Tutorials / First project / Using databases

Managing highly structured data in databases

 

In FirstSpirit, highly structured content is recorded and managed in the Data Store. Product catalogs or address lists, for instance need to be identified as having highly structured content. This content is not only highly structured, but it is also frequently subject to changes. This type of data is typically stored in databases.

To use databases, a database schema with the associated table templates must first be added to the Template Store. It will then be possible to add data to the Data Store based on this schema. This data, known as data sources, can then be added to a page in the Page Store and then referenced in the Site Store. Dataset display settings can be configured on this page reference in the Site Store. If, for instance, only a certain section of the database table is to be displayed, the queries defined in the Template Store can be called at this point.

Now a structured data source will be added to the test project. The objective is to construct a simple data model in which each product is assigned to a corresponding product category. This should provide for a clearer presentation of product information on the website.

To do this, we will add a database schema with two tables in the steps that follow: one table for the product information and a second table for the product categories.
Each table in the database schema will then require its own table template, which is placed below the database schema. In the table templates, input components are defined that are used to transfer content to the columns of the database table. The associated data sources are then added to the Data Store based on these table templates.

The following provides a brief overview of the work steps:

  • Create a new database schema. More...
  • Add two tables to the database schema that define the related table columns and create a foreign key relationship between the two tables. More...
  • Add a table template for each database table. More...
  • Define input components in the table templates that the editor can use to enter content. Products... / Product categories...
  • Using mapping, each input component will be assigned a table column into which the value of the input component is to be transferred. More...
  • Use the “HTML” template set to specify what the individual datasets will look on the website. More...
  • Add two data sources with the respective table templates to the Data Store and populate with content. More...
  • Output the content of the data source to the website.More...
  • Use queries to influence how the datasets are output. More...

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.12 | Data privacy