Can I import data into my database?

How do I import data into a table? Do I need to create the primary keys manually before importing?

Hi Backend_Doctor, thanks for joining, and great question! The answer to your question is yes, you can import data.

Let me break this down into two parts:

1. How do I import data into a table?
Five lets you import CSV files into your database tables, and automatically maps the fields from your CSV onto the database provided that the column names inside your CSV and the field names inside your table are the same.

2. Do I need to create primary keys?
The answer is it depends. Five can automatically create the primary keys for you. You can also select not to import primary keys, or make another column in your CSV the primary key.

Here’s a video to demonstrate the process:

Thank you @Dom_Five.Co and how do you add a new field to the database & what are the options?

Hi Backend_Doctor,

you can add new fields to an existing database table inside Five. Here’s a video demonstrating the process:

I’m also outlining the steps below:

  1. Simply navigate to Tables,
  2. Select the table you would like to add a field to,
  3. Click on Fields,
  4. Click on Add Field,
  5. Fill in the required information (field ID, data type, size and display type),
  6. Click on Save,
  7. Click on Save again,
  8. Five will now prompt you to select from one of four options for all previous records inside your table: you can assign a fixed value, refer to another field, write a query or simply leave your new field empty for all existing records.
  9. Click Save again.
1 Like