A Simple Database in LibreOffice

I created this simple database in LibreOffice and populated it w/ a little data.

This is the data entered for the Customer and Tech Tables. As you can see each Customer and Tech record has a unique ID. In the Appointment table you see that each appointment besides having it's own unique ID also includes the Customer's and Tech's ID's for that particular appointment and the data specific to an appointment (i.e. the time and date of the appointment).

This mechanism of cross referencing records is used to create normalized databases and ensure referential data integrity. You would NOT want to include the Customer's or Tech's actual data (i.e. name or phone) in the appointment table.

Before I created any records in the appointment table, as a quick test I tried to create an appointment record first w/o having entered any customer or techs yet. So I entered the ID of 1 in the respective fields. And as I should have I got a database error! Which is the purpose of using relational databases that can enforce data integrity.

I don't necessarily recommend LibreOffice Base. Not just yet. I need to use it more and run it through its paces to see if it's reliable and what all you can do to connect to the database w/ other tools. It is "work-alike" to Microsoft Access. I will have to say it worked flawlessly for this tiny example.

I have used Access since the year 2000 and created many databases with it. On a full-time programming job I had I learned a trick from my supervisor who was also a programmer. He would use Access to design the database w/ the data rules and create the relationships and populate it w/ test data for development.

He also had a pattern for naming tables and fields. Use a short database acronym before each table name and use a short acronym for the record and use it before each of field names. This simplifies queries where you do not need to use dot notation to refer to fields w/ the same name. And neither do you have to type out the whole table name which can be lengthy. It’s a practice I have continued to this day.

I will write a blog about LibreOffice someday. I'll compare it to Access and see how much functionality in Access is available in LibreOffice.