The purpose of databases is to store data and create information without duplicating data as this can lead to multiple records being included in the data set that are the same and have an impact on the data intgrity.
So far in our practice example we have one collection called customers, which includes all the information about the customer. We now would like to record job quotes for customers. This is where relationships can be introduced into the database.
In traditional single file databases if one customer had many job quotes recorded we would need to store there personal details multiple times. This can lead to errors, extra storage requirements etc. If we add another collection called jobs we can record just the information about the job and link it back to the customer using the customers primary key. This linking key is called a foreign key.
The benefits include updating details of the customer once and all jobs would be updated.
In locabase there is no built in feature like MongoDB or SQL which can easily integrate these relationships and keep the data integrity enforced. Read more about SQL database relationships.