Search

I have been playing with the hello world tutorial and modifying it to test my app concept, and I am a bit confused about the way the data is being stored.

I have for example a Contact screen with the following fields, BusinessName, Addressline1, Addressline2, City, PostCode, Contactname1, etc.

Now it appears that in the DB it is creating a separate table for each Field, so we have a sym_entries_data_23 for the Business Name, sym_entries_data_24 for the Address line 1, etc.

Is this the way that Symphony creates it Db Schema?

I would expect a single table with fields for each of the Contact columns.

or I am missing something?

Is this the way that Symphony creates it Db Schema?

It is. This extra level of normalisation means it’s much easier to create/destroy aspects of the schema at will.

Remember that “fields” are not a single value in Symphony. Fields require more than one column. For example a Text Input field uses two data columns, value and handle; the Map Location field stores several values for each entry, such as an address, latitude longitude and so on.

In this way, the “data type” of a field in Symphony go beyond standard MySQL data types (varchar, boolean, text etc) — they can be defined in their entirety and we are not limited to a single column for each field.

What you lose in performance/simplicity, you gain in flexibility.

Thanks Nick,

I suppose it’s taking normalisation to it’s ultimate, and thinking about it there may be lots of tables but they will be small in size.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details