Operations
January 9, 2023

No-code Databases 101

Using relationships to connect data

Gill O'Leary
Head of Partnerships at Noloco

In a relational database, relationships are used to connect different tables and establish links between different pieces of data. There are three types of relationships that can exist between tables: one-to-one, one-to-many, and many-to-many.

One-to-one relationships:

A one-to-one relationship occurs when one record in a table is related to only one record in another table. For example, you might have a table of employees and a table of login information, where each employee has a unique login. In this case, the employee and login tables would have a one-to-one relationship.

To create a one-to-one relationship between tables, you would typically use a foreign key. A foreign key is a field in one table that contains the primary key of another table. The primary key is a unique identifier for each record in a table. For example, you might have a primary key field called "ID" in your employee table and a foreign key field called "employee_id" in your login table. This would allow you to link each login to a specific employee.

Here's an example of a one-to-one relationship between the employee and login tables:

Employee table:

Customer ID Customer Name Contact Information
1 John Smith john@example.com
2 Jane Doe jane@example.com

Login table:

ID Employee_ID Username Password
1 1 jsmith abc123
2 2 jdoe def456
3 3 bjohnson ghi789

One-to-many relationships:

A one-to-many relationship occurs when one record in a table is related to multiple records in another table. For example, you might have a table of customers and a table of orders, where each customer can place multiple orders. In this case, the customer and order tables would have a one-to-many relationship, with the customer table being the "one" side and the order table being the "many" side.

To create a one-to-many relationship between tables, you would use a foreign key in the "many" side table that references the primary key of the "one" side table. For example, you might have a primary key field called "ID" in your customer table and a foreign key field called "customer_id" in your order table. This would allow you to link each order to a specific customer.

Here's an example of a one-to-many relationship between the customer and order tables:

Customer table:

ID Name Address
1 John Smith 123 Main St
2 Jane Doe 456 Maple Ave
3 Bob Johnson 789 Oak St

Order table:

ID Customer_ID Order_Date Total
1 1 2021-01-01 100
2 1 2021 5

Many-to-many relationships:

Many-to-many relationships occur when multiple records in one table are related to multiple records in another table. For example, you might have a table of students and a table of courses, where each student can take multiple courses and each course can have multiple students. In this case, the student and course tables would have a many-to-many relationship.

To create a many-to-many relationship between tables, you would typically use a linking table that has foreign keys that reference the primary keys of the other two tables. The linking table is used to establish the relationship between the other two tables, and it typically contains additional fields that provide more information about the relationship.

Here's an example of a many-to-many relationship between the student and course tables:

Student table:

ID Name Address
1 John Smith 123 Main St
2 Jane Doe 456 Maple Ave
3 Bob Johnson 789 Oak St

Course table:

ID Course_Name Instructor
1 Mathematics 101 Professor X
2 Physics 201 Professor Y
3 History 301 Professor Z

Enrollment table:

To establish a many-to-many relationship between the student and course tables, we can add foreign keys to the enrollment table that reference the primary keys of the student and course tables:

ID Student_ID Course_ID Grade
1 1 1 A
2 1 2 B
3 2 2 A
4 2 3 C
5 3 1 B
6 3 3 A

Author

Gill O'Leary
Head of Partnerships at Noloco

Gill is Head of Partnerships at Noloco, where she’s building a thriving partner ecosystem to help businesses unlock the power of no-code and drive digital transformation. With a career spanning product, solutions engineering, and partnerships, she’s worked with both fast-moving startups and global tech leaders. Gill is passionate about making technology accessible to everyone—especially those without a technical background. On the blog, she writes about strategic partnerships, the evolving no-code landscape, and how businesses can leverage AI and automation to scale smarter.

Your most common
questions—answered!

Who is Noloco best suited to?
+
-

Noloco is perfect for small to medium-sized businesses in non-technical industries like construction, manufacturing, and other operations-focused fields.

Do I need tech experience to use the platform?
+
-

Not at all! Noloco is designed especially for non-tech teams. Simply build your custom application using a drag-and-drop interface. No developers needed!

Is my data secure?
+
-

Absolutely! Security is very important to us. Our access control features let you limit who can see certain data, so only the right people can access sensitive information

Do you offer customer support?
+
-

Yes! We provide customer support through various channels—like chat, email, and help articles—to assist you in any way we can.

My business is growing fast—can Noloco keep up?
+
-

Definitely! Noloco makes it easy to tweak your app as your business grows, adapting to your changing workflows and needs.

Is there any training or support available to help my team get up to speed?
+
-

Yes! We offer tutorials, guides, and AI assistance to help you and your team learn how to use Noloco quickly.

Can I make changes to my app after it’s been created?
+
-

Of course! You can adjust your app whenever needed. Add new features, redesign the layout, or make any other changes you need—you’re in full control.

Ready to boost
your business?

Build your custom tool with Noloco