Importing from another relational database

I’m very impressed with Tadabase and just about to commit to it. Assuming I do, I’ll want to convert some existing relational apps to Tadabase. I know it’s possible to import, but I’m not quite sure what will happen to relationships (connections) between tables when I do. The existing solution uses a conventional relational design with explicit primary keys and foreign keys. My impression is that Tadabase (like Airtable) hides the keys from users. That may generally be a great idea but if I can’t import the primary keys and the foreign keys that I have already, I’m not sure how I can maintain connections between records in different tables. Anybody able to throw me a clue? Thanks in advance.

William

Hi William and welcome to Tadabase!

You are correct in your impression that we manage the keys behind the scenes. However, we can match the keys based on your existing values.

I’ll show you a simplified example of how we can match records and maintain relationship.

Suppose you have your DB data exported to a CSV and it looks like this for your customers table:
image

Within your database you have another table called customer_jobs which has a customer_id field that references the customer the job is assigned to:

The way you would go about this in Tadabase is:

  1. Create a new table called “Customers”
  2. Add 3 Columns in the Customers table (ID, Customer Name and Status)

Next import the CSV into the newly created tables and be sure to match the id => ID, customer_name => Customer Name etc…)

Next, create a new table called Customer Jobs and add a Connection field from Customer Jobs to Customers (one to one) and make sure you chooe the id as the display field, then add the title and description fields.

Finally, import the Customer Jobs CSV and match the customer_id field to the Customer field. This will create the relationship behind the scenes.

Now when viewing jobs you’ll see the customer_id instead of the customer name. Since we now manage this relationship based on our own keys behind the scenes, you can change the display field from ID to the Customer’s Name.

I hope this helps, let me know if you have any other questions I can assist with.

1 Like

Moe, thanks for the quick and detailed reply!

But I haven’t had a chance to try this out and I’m curious about something. After I import my two tables per your instructions – linking custom_id in JOBS to id in CUSTOMERS – do I need to continue generating keys in my old key fields? Or does Tadabase take over AFTER I’ve done the import?

William

Tadabase takes over after that with custom hidden keys behind the scenes. But, if you are looking to continue importing from your database you’ll need to keep managing it and adding those keys. However, all new records you create inside of Tadabase don’t need to be manually managed.

I hope that answers your questions, if it doesn’t let me know what I can clarify.