Ask Your Question

Can I add a primary key after I have imported a spreadsheet into base

asked 2017-10-21 10:07:44 +0200

kimee17 gravatar image

I have just stared using Libre base after needing to use a database at work and only having a Mac. I used to use Access years ago so I am a bit rusty. So far I have imported my excel spreadsheet into a table and now I want to set up a primary key as a unique identifier for each record. As this will be used as a mailing list long term I will also be (trying) to tweek it for forms and reports. We have 5 different ‘catagories’ my customers fall into but going forward I would like to add new fields. Is there a way to change the format of an existing field and add new fields to existing tables. I can’t seem to see the design view for the tables.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-10-21 16:42:03 +0200

Ratslinger gravatar image


Yes you can set the Primary key after the import but it should be one of the first things done. Can't do much without the key.

As for changing/adding fields, yes for the default DB (HSQLDB Embedded v1.8). This is what comes with Base. You may be interested in the documentation - click here. On that page, also scroll up & you will find the Base Getting Started guide.

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more


It is important that any database be split into a front-end and a back-end. The actual database is the back-end. The front-end is NOT a "real" database, but the program to access the back-end. The tutorial referenced below is somewhat old now, so you may want to do additional searching.

Splitting an "embedded HSQL database"

Steve R. gravatar imageSteve R. ( 2017-10-21 17:50:57 +0200 )edit

@Steve R. The tutorial still applies (recently reviewed) but for a new DB being created, I prefer this process - Create a new 'split' HSQL 2.x database. The instructions are simpler because it only deals with creating an empty split DB.

Ratslinger gravatar imageRatslinger ( 2017-10-21 19:06:00 +0200 )edit

@Ratslinger Thanks. Also better suggestion since it promotes the use of the HSQL 2.x database. Any thoughts concerning Firebird? Base: Firebird vs HSQLDB embedded database?

Steve R. gravatar imageSteve R. ( 2017-10-21 19:34:03 +0200 )edit

As long as we're here, Originally had in my answer but didn't want to add confusion for someone new to Base. @Steve R. your link really deals with the same as mine but discusses converting an existing DB. To me the process is meticulous & overwhelming for someone new. In my answer here I include instructions to use the "new split" AND a different way to transfer data from an embedded DB.

Ratslinger gravatar imageRatslinger ( 2017-10-21 19:44:35 +0200 )edit

As for Firebird, I won't deal with it for now since it has problems with copying DATE data from outside sources. How can you move over to this DB when you can't transfer necessary data? Firebird itself is good - used it originally way back when it came out under Borland umbrella.

Ratslinger gravatar imageRatslinger ( 2017-10-21 19:48:21 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-10-21 10:07:44 +0200

Seen: 411 times

Last updated: Oct 21 '17