If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Why can't a primary key be duplicated?
Why can't a primary key be duplicated in Access?
|
#2
|
|||
|
|||
Why can't a primary key be duplicated?
Because a primary key, by definition, identifies a unique record within a
table. If it can be duplicated, then you don't have uniquely identifiable records in your table. -- Ken Snell http://www.accessmvp.com/KDSnell/ "torijoshmom" wrote in message ... Why can't a primary key be duplicated in Access? |
#3
|
|||
|
|||
Why can't a primary key be duplicated?
torijoshmom wrote:
Why can't a primary key be duplicated in Access? For the same reason you can't have the same address referring to two different buildings. Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ Granite Fleet Manager http://www.granitefleet.com/ |
#4
|
|||
|
|||
Why can't a primary key be duplicated?
It's not just Access. No relational database will allow duplicate data in the
primary key field of a table. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "torijoshmom" wrote: Why can't a primary key be duplicated in Access? |
#5
|
|||
|
|||
Why can't a primary key be duplicated?
Maybe if you describe the table, its definition, and the columns in the
table someone might be able to suggest a better data structure and/or a better primary key. As others said, a unique primary key is a requirement in a properly designed data structure. "Jerry Whittle" wrote in message ... It's not just Access. No relational database will allow duplicate data in the primary key field of a table. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "torijoshmom" wrote: Why can't a primary key be duplicated in Access? |
#6
|
|||
|
|||
Why can't a primary key be duplicated?
"torijoshmom" wrote in message
... Why can't a primary key be duplicated in Access? The reason for creating key constraints in a database is to help ensure the integrity of the data. When you create any candidate key constraint you are explicitly specifying a rule that says the DBMS must not allow data for the key attributes to be duplicated. Any update that would cause duplication is therefore rejected as an error. If requirements change and you decide it's no longer appropriate to enforce that rule then you should drop the candidate key constraint and define some other key instead. I recommend you study a book on database basics or take a good introductory course because this is pretty fundamental stuff. -- David Portas |
#7
|
|||
|
|||
Why can't a primary key be duplicated?
thank you for shedding some light on the question. your input is greatly appreciated
--- frmsrcurl: http://msgroups.net/microsoft.public...-be-duplicated |
Thread Tools | |
Display Modes | |
|
|