I've got a beginner's question. I'm very new to SQL and relational databases.
I understand the unique identifier, but how do I identify a list of unique id's associated with the first id.
For example, let's say I have an invoice number.
That is the unique identifier that gets me to the table of items purchased. Each of them has a unique identifier.
How do I index this subtable so that when searching for the purchased items, I don't have to search the entire database!
I want to be able to quickly pull up the list of purchased items for that unique invoice.