Setup an SQL database

Setup an SQL database

Start database service from the XAMPP control panel

  1. Start the services from the XAMPP Control Panel.

Create a database

  1. Select Databases from the horizontal menu.
  2. Enter Database name, for example: euph_[Number of the dataset]_[Short title of the project in lowercase letters].
  3. Select collation type. By default uft8mb4generalci is selected.
  4. Select Create.

Create a table

  1. Select Databases from the horizontal menu.
  2. Go to section Create new table.
  3. Enter Table name, for example: use the corresponding worksheet of the preparatory file, if it exists, as table name.
  4. Enter the Number of columns in the corresponding worksheet of the preparatory file, if it exists, as number of columns considering the limit of columns per table (4.096).
  5. Select Create.

Define columns

  1. Name: Enter the name of the column in the corresponding worksheet as column name. Colum names are written in lowercase letters, with the exception of the first letter of a column name or the first letters of compound terms, which are capitalised. Maximum length is 64 characters.
  2. Type: Use the most precise type of the column considering the maximum length of data contained in a column and the maximum row size limit (65.535 bytes).
    • For a column containing exclusively integer values use one of the data types, which equals or exceeds the maximum requirement ever to be expected for this column: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT
    • For a column containing fixed-point and floating-point numbers use one of the data types which equals or exceeds the maximum requirement ever to be expected for this column: FLOAT, DOUBLE, DECIMAL
    • For a column containing alphanumerical types use one of the data types which equals or exceeds the maximum requirement ever to be expected for this column: VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT
    • For a column containing exclusively date and/or time use one of the data types which equals or exceeds the maximum requirement ever to be expected for this column: DATE, TIME, DATETIME, YEAR
  3. Length/Values: If necessary enter the length of the values which equals or exceeds the maximum requirement ever to be expected for this column.
  4. Default: Select one of the proposed standard values (None, NULL, CURRENT_TIMESTAMP) which equals or exceeds the maximum requirement ever to be expected for this column.
  5. Collation: Select one of the collations, if it is different from the collation of the database which equals or exceeds the maximum requirement ever to be expected for this column (none if it is not different from the collation of the database).
  6. Attributes: Select one of four attributes which equals or exceeds the maximum requirement ever to be expected for this column (none if no attribute applies): BINARY, UNSIGNED, UNSIGNED ZEROFILL, on update CURRENT_TIMESTAMP
  7. Null: Check if Null values cannot be excluded.
  8. Index: Select one of the following index types: ---, PRIMARY, UNIQUE, INDEX, FULLTEXT, SPATIAL
  9. A_I: Check if an ascending sequence of values should be automatically added to the column. Typically used for the record identifier.
  10. Repeat all previous steps of this paragraph (1 through 13) for all columns contained in the table.
  11. Collation: Select collation for the table. By default uft8mb4generalci is selected
  12. Storage engine: Select the storage engine. By default InnoDB is selected.
  13. Save the settings.

Linked columns

  1. Ensure to select the same settings for columns that will be linked.

See also