Create table by importing

Data are the backbone of your application. They hold all of your data and are the starting point of your application. The first step in creating a database-driven web application is to hook data. Data are represented in the table in rows and columns. Each row is called a ‘record’. Data can be submitted to them through web forms or imported from external files. Data can also be exported.

At the moment of this writing, ZenBase supports importing of comma-separated values (CSV) files only. If you have Excel sheets you’d like to import into ZenBase, you should export these as CSV files from Excel first after which you can import the data into ZenBase.

Note that table name should not contain space or any special characters.

After clicking the button, you should start off by entering a name for your new table. Note that the name should only contain only alphanumeric characters: a-z, 1-9, underscored and dashes, NO SPACES.

Next, you should choose the file you’d like to import. When importing a CSV file, it’s possible that your file contains the column names on the first line of the file, if this is the case, make sure you tick the checkbox labeled “First row contains column names“, this way ZenBase will use those column names to create your new table.

Adding records into an existing table

The second way to use the data import function is by adding records into an existing table. The process of adding new records into an existing database table sometimes is called “append query”. To do this, bring up the table into which you’d like to import data. Next, click the grey button labeled “Import data” which will bring up a popup.

In the Import Data popup, you can choose your CSV file and upload it that would merge with the existing table.

Things to watch out when adding into an existing table – AKA Appending query:

  1. It’s critical to make sure the structure of your CSV files matches with the structure of your table! If the structures don’t match, the import will probably fail and ZenBase will show you an error message.

  2. The number of fields per row in your CSV files matches with the number of columns in the ZenBase table. If you have 10 columns in your table, you’ll need to have 10 values per row in your CSV file.
  3. The values in the primary key fields in your CSV file are unique. If ZenBase detects primary key values which already exist in your table, the import will fail.