Lester and Mark, thank you for your answers. I have a Primary Key on the ID column of those tables and a Unique Key on the Name column.
I want to avoid duplicates forcing the names being different. If a user want to save a duplicate name then he/she will have a a message of advice. So, he/she will take the appropiate means. Greetings. Walter. On Mon, Aug 15, 2011 at 4:06 AM, Mark Rotteveel <[email protected]>wrote: > ** > > > On Mon, 15 Aug 2011 00:03:28 -0300, Alexandre Benson Smith > > <[email protected]> wrote: > > Em 14/8/2011 23:43, W O escreveu: > >> Hello everybody > >> > >> I had unique key restrictions on the column "Name" of tables like: > >> Countries, States, Banks, etc. > > Not sure if it is wise to do that; it really depends on the business rules. > > A politically controversial example: two countries claim to be China (where > at least one denies the existence/independence of the other). > In The Netherlands and Belgium we both have a province called 'Limburg'. > Different banks in different countries can have the same name (for example > in the last century both The Netherlands and Germany had a > 'Rafeissenbank'); or the branches of a single bank in different countries > are actually two distinct legal entities and need to be recorded as such; > there are cooperative banks where each bank is independent, but they do > share the same name (and some of the marketing and backoffice stuff). > > On the other hand, not enforcing some type of rules could mean actual > duplicated data. > > > >> So, I can avoid duplicates. > >> > >> What do you think, is it correct to use unique keys for that job? > >> > >> Greetings. > >> > >> Walter. > >> > > > > It depends on the business rules... > > > > I don't think that a unique constraint on the Field Name of a table of > > people is ok. > > > > We al lknow that there is more than one John Smith in the world. > > Agreed. It can lead to some nice problems if you would enforce that. > > > [Non-text portions of this message have been removed] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
