database design and refactoring

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема database design and refactoring
Дата
Msg-id 200701031224.12618.fluca1978@infinito.it
обсуждение исходный текст
Ответы Re: database design and refactoring  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-general
Hi all,
in my database I've got a table with a key that is char string, since it was
supposed to support values like strings. Running the database, the users
decided to place numbers as strings, so values like 00110002 and so on.
Now I was wondering to refactor my database and change the char field into a
numeric one but here comes problems: the field is referenced by other tables
and views.
I guess there's not, but you'll never know until you try: is there a tool or a
way to easily do such refactoring or should I write a program on my own to do
this?

And moreover a database design question: is a better idea to choose always
(when possible) numeric keys? I'm thinking about the database portability,
since not all databases support sequences (that can be used with a concat to
provide an automatic string key).

Thanks,
Luca


В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Index Scanning
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: queueing via database table?