# Can I import data into my database?

**URL:** <https://www.five.org/t/can-i-import-data-into-my-database/111>\
**Category:** How do I?\
**Tags:** how-to\
**Created:** [November 1, 2022, 3:21am UTC](https://www.five.org/t/can-i-import-data-into-my-database/111 "2022-11-01T03:21:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Backend\_Doctor](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@Backend\_Doctor](https://www.five.org/u/Backend_Doctor)\
**Post date:** [November 1, 2022, 3:21am UTC](https://www.five.org/t/can-i-import-data-into-my-database/111/1 "2022-11-01T03:21:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dom\_Five.Co](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/dom_five.co/32/38_2.png) [@Dom\_Five.Co](https://www.five.org/u/Dom_Five.Co)\
**Post date:** [November 1, 2022, 6:30am UTC](https://www.five.org/t/can-i-import-data-into-my-database/111/2 "2022-11-01T06:30:03Z")

</div>

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:

[![](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/3cc225be667b5feb535a53bd851b6ef65eedd47c.jpeg "Importing a CSV Into Your MySQL Database | Low-Code For Real Developers | Five.Co") ](https://www.youtube.com/watch?v=osHF98vJO0o)

---

<div class="post-metadata">

**Author:** ![Backend\_Doctor](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@Backend\_Doctor](https://www.five.org/u/Backend_Doctor)\
**Post date:** [November 2, 2022, 1:32am UTC](https://www.five.org/t/can-i-import-data-into-my-database/111/3 "2022-11-02T01:32:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dom\_Five.Co](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/dom_five.co/32/38_2.png) [@Dom\_Five.Co](https://www.five.org/u/Dom_Five.Co)\
**Post date:** [November 3, 2022, 4:38am UTC](https://www.five.org/t/can-i-import-data-into-my-database/111/4 "2022-11-03T04:38:19Z")

</div>

Hi Backend\_Doctor,

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

[![](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/abea05b79e7ce0d9bf491cdc52cd0bdff19251da.jpeg "Adding A New Field To Your MySQL Database | Low-Code For Real Developers | Five.Co") ](https://www.youtube.com/watch?v=oWIyJL7uEMw)

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.
