I need to clear the following in my head.
When I create a table with no primary key or unique constraint I get a flat file.
When I create a primary key a primary index is created as a result and it is this index that maintains the uniqueness of the primary key, right? So I can not add a duplicate value.
So if I create an index on any column does this enforce the column to have unique values? Or that depends on using the keyword UNIQUE
for the index creation?
Finally every time I declare a column having a UNIQUE
constraint does that mean that an index is created and so these actions are interchangeable?