On Fri, Jul 26, 2013 at 3:19 PM, Alvaro Herrera
wrote:
> JORGE MALDONADO escribió:
>> I guess I am understanding that it is possible to set a unique index or a
>> unique constraint in a table, but I cannot fully understand the difference,
>> even though I have Google some articles about it. I will
JORGE MALDONADO wrote
> And so on. What I see is that it is not a good decision to set a key for
> every possibility because it will have an impact on performance due to
> index maintenance. What would be a good way to define indexes in a case
> like this?
For your specific case, and also more gen
I have a table with fields as follows:
* sag_id
* sag_header
* sag_comments
* sag_date
* sag_section_id (**)
* sag_artist_id (**)
* sag_author_id (**)
* sag_producer_id (**)
As you can see, fields mark with (**) are identifiers that reference
another table (catalog of sections, catalog of artists
JORGE MALDONADO escribió:
> I guess I am understanding that it is possible to set a unique index or a
> unique constraint in a table, but I cannot fully understand the difference,
> even though I have Google some articles about it. I will very much
> appreciate any guidance.
The SQL standard does
I try to explain my point of view, also in my not so good English:
A primary key is defined by dr. Codd in relational model.
The key is used to identify a record. In good practice, you must always
define a primary key. Always.
The unique constraint will simply say: this value (or combination) shou
I guess I am understanding that it is possible to set a unique index or a
unique constraint in a table, but I cannot fully understand the difference,
even though I have Google some articles about it. I will very much
appreciate any guidance.
Respectfully,
Jorge Maldonado
Sorry, but I never thought.
I'm developing this on my server I'm developing it for someone else who wants
it in a WordPress / MySQL environment (I don't know MySQL).
Would this or something similar work in mysql?
(Sorry for going O.T.)
On Thursday 25 July 2013 19:53:06 Marc Mamin wrote:
> >___