Using varchar primary keys.
От | Tim Uckun |
---|---|
Тема | Using varchar primary keys. |
Дата | |
Msg-id | CAGuHJrNUd-34fq0Ee-P6=-DDBa6T1ROthchsj6fuTbuwsGuVVA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Using varchar primary keys.
Re: Using varchar primary keys. |
Список | pgsql-general |
Consider the following scenario.
I have a typical tagging structure. There is a table called tags, there is a table called taggings. The taggings table acts as a many to many join table between the taggers and the tags.
The tags table has two fields id and tag. id is a serial data type.I have a typical tagging structure. There is a table called tags, there is a table called taggings. The taggings table acts as a many to many join table between the taggers and the tags.
Given that you can still set foreign keys and cascade commands to adjust child records either way the tables would be properly normalized so I am wondering what I am gaining by using these serial ID fields.
В списке pgsql-general по дате отправления: