I'm trying to populate a new SQLite database with rows based on a set of data, but I'm having trouble with avoiding duplicate rows. I could accomplish this in Python, but there certainly must be a design option in SQLite to handle this.
I need each row to exist for only a unique combination of three text fields. If I make each text field constrained with UNIQUE, then all three must be unique. But I would instead like a unique combination of the three strings.
In other words, these records should all be able to exist: (a, a, a) (a, a, b) (a, b, b) (b, b, b)
If I make all three fields UNIQUE and insert those rows, only (a,a,a) and (b,b,b) are inserted. I could concatenate fields 1-3 in Python and use that as a primary key, but it seems like extra work.