Using Libreoffice Base with Firebird as a financial tracker. Originally had a ledger table, including a column for an image. For each entry, I would add the invoice associated with it. However, multiple rows could have the same invoice, and this is the root of the size issues; I could be adding the same invoice image ten times or more to the ledger table, needlessly inflating the size of the database.
I've looked into some solutions, and while dynamic images or linking external images into the database make sense from a file size and practicality perspective, it's a little messier in terms of portability, as I would prefer to keep things all as one file.
I'm currently looking into another alternative, where I have a separate table for invoices, and I simply refer to the appropriate invoice from the ledger table using relationships. I think this is where the 1:1 relationships come into play, but when I attempt to make one, I get an error about a "Foreign key"
At the moment, the table layouts are as follows:
Table: Ledger Columns: EntryID (Primary Key, Integer) | Invoice (Image) | Other unrelated columns
Table: Invoices Columns: InvoiceID (Primary Key, Integer) | Invoice (Image)
So how do I link the two Invoice columns to avoid having duplicate images?