Search Postgresql Archives

database design and refactoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux