Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Primary key


Related Topics

In the News (Fri 13 Nov 09)

  
  Encyclopedia: Primary key   (Site not responding. Last check: 2007-10-08)
In the relational model of data, a primary key is a candidate key chosen as the main method of uniquely identifying a tuple in a relation.
The primary key should be immutable, meaning that its value should not be changed during the course of normal operations of the database.
A foreign key (FK) is a field or group of fields in a database record that point to a key field or group of fields forming a key of another database record in some (usually different) table.
www.nationmaster.com /encyclopedia/Primary-key   (1414 words)

  
 Data Modeling: Primary and Foreign Keys
Candidate keys which are not chosen as the primary key are known as alternate keys.
Once the keys have been identified for the model, it is time to name and define the attributes that have been used as keys.
Foreign keys are formed in dependent and subtype entities by migrating the entire primary key from the parent or generic entity.
www.utexas.edu /its/windows/database/datamodeling/dm/keys.html   (997 words)

  
 Primary Key Reengineering Projects: The Solution Part 2 of a Two-Part Series
Suppose that the primary key of employee is a two-attribute key consisting of: a) date of hire and b) sequence number.
Since the primary keys of all its subtypes - in our examples, person and its two subtypes and related-organization and its two subtypes - must be foreign keys back to this root class table, all primary keys in all tables are necessarily unique across all those tables.
The only solution is to change one of the colliding primary keys (in the first case) or change the syntax and value of all of the primary keys (in the second case).
www.dmreview.com /article_sub.cfm?articleId=2004   (4640 words)

  
 Primary Key Reengineering Projects: The Problem
The cost of these reengineering projects is often very high, and for one "key" reason: when the primary keys of a table are changed, all their foreign key instances must be changed, too.
Ideally, a change to a primary key value should be done as one atomic transaction; but this usually isn't possible when large, physically distinct databases are involved.
Basically, the problem is that both intelligent and unintelligent keys satisfy the entity integrity constraint, but neither satisfy the constraint of "object integrity." Entity integrity is the constraint that the primary key values in a relational table must be unique across all of its rows.
www.dmreview.com /article_sub.cfm?articleId=1866   (2412 words)

  
 Primary Key - FoxPro Wiki   (Site not responding. Last check: 2007-10-08)
A primary key is a field or group of fields that unambigously identifies a specific record within a table.
Primary keys can be either a NaturalKey or a SurrogateKey.
Specifically, an attempt to recall a record who's primary key is used by another causes error #1884 "Uniqueness of index /tag/ is violated.", and the recall fails.
fox.wikis.com /__snapshot/PrimaryKey.htm   (1117 words)

  
 Assigning a Primary Key   (Site not responding. Last check: 2007-10-08)
Although it is not a requirement, it is a good idea to assign a primary key to one of the fields in your database.
Setting a field as a primary key serves as insurance against it.
If a field is set as a primary key, the computer will alert you when you attempt to type duplicate data into that field.
www.uic.edu /depts/adn/seminars/access-intermed/primarykey.html   (212 words)

  
 Foreign key definition renders primary key irrelevant - Builder - ZDNet Asia   (Site not responding. Last check: 2007-10-08)
A foreign key is a column or set of columns in one table that matches a candidate key in another table.
An alternate key is a candidate key not chosen as the primary key.
As long as the key preserves the data’s integrity, building relationships on a candidate key seems to be just as valid as the long-accepted practice of using a primary key as the foreign key in related tables.
www.asia.cnet.com /builder/architect/db/0,39009328,39105612,00.htm   (1056 words)

  
 AskTom "primary key"   (Site not responding. Last check: 2007-10-08)
I have a table test(a varchar2(256) primary key,.......); also i have serveal table contain "a" if i modified it to test(b number primary key, a varchar2(256),.....); and assign each "a" a unique number b.
A primary key just happens to create a not null constraint and an index on the data (may be unique or non-unique index) in order to enforce itself -- but a not null constraint and index does not imply "primary key".
Not every table *needs* a primary key but if it has one, it would be best to use "primary key".
asktom.oracle.com /pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1113433570419   (654 words)

  
 The great primary-key debate
By definition, a relational database must contain normalized tables, and to be properly normalized, a table must contain a primary key.
In this sense, the primary key is a simple pointer between related records in different tables.
As soon as you have two employees with the same name, the primary key must be expanded to at least three fields, and you find yourself breaking a rule.
builder.com.com /article.jhtml?id=u00320020327ssh01.htm   (573 words)

  
 Primary Key - Visual FoxPro Wiki
Primary keys can be either a Natural Key or a Surrogate Key.
Specifically, an attempt to recall a record whose primary key is used by another causes error #1884 "Uniqueness of index /tag/ is violated.", and the recall fails.
Another problem is if the primary key is used as the foreign key in child records.
fox.wikis.com /wc.dll?Wiki%7EPrimaryKey   (1402 words)

  
 The great primary-key debate
Before we enter the debate, we define the term primary key.
The primary key must remain stable—you can’t change the primary-key field(s).
The primary key must be compact and contain the fewest possible attributes.
builder.com.com /5100-6388-1045050.html   (573 words)

  
 Sybase Inc - How Surrogate Primary Key Generation Affects Concurrency and the Cache Hit Ratio
An insert with a primary key value of 101 is directed to the last data page of the table, as is an insert of the row with a primary key of 102.
The first part of the key is used to control the spread of the inserts throughout the data table and the second part is used to ensure uniqueness.
As previously mentioned, one of the primary reasons for using a surrogate primary key is to have a small key that results in a small index.
www.sybase.com /detail?id=860   (2967 words)

  
 #2504 : What should I choose for my primary key?   (Site not responding. Last check: 2007-10-08)
A quick google on the subject demonstrates why you should choose your primary key(s) at the outset, rather than in retrospect; without a primary key or other unique constraint, you will certainly be going back at some point to clean up your data.
A natural key is a piece of data (one or more columns of an entity) that uniquely identify that entity, and distinguish it from any other row in the table.
Ideally, a primary key is implemented using a natural key; however, this is rarely practical.
www.aspfaq.com /2504   (1399 words)

  
 Candidate keys: Choosing the right primary key
With wrong candidate key decisions, chances are high that you will have a worse job in normalizing the database model, as well as achieve a high performing database in the end.
Likewise, the horizontal bar over the crow-foot in the drawing of the relationship between departments and accounts is a sign that the primary key from departments is also a part of the primary key in the accounts entity.
A primary key is, as stated earlier in post 1, a column, or a collection of columns, that together give us the ability to uniquely read one single row from a table, no matter how many rows that exists in that table.
www.databasedesign-resource.com /candidate-keys.html   (1352 words)

  
 SQL by Design: How to Choose a Primary Key   (Site not responding. Last check: 2007-10-08)
A primary key is a table column that serves a special purpose.
If a primary key value were allowed a null value, then you couldn't easily retrieve the row associated with the primary key.
It is thorough the primary key that we usually query the database.
www.windowsitpro.com /SQLServer/Article/ArticleID/5113/5113.html   (1606 words)

  
 Oracle/PLSQL: Primary Keys   (Site not responding. Last check: 2007-10-08)
A primary key is a single field or combination of fields that uniquely defines a record.
None of the fields that are part of the primary key can contain a null value.
The syntax for disabling a primary key is:
www.techonthenet.com /oracle/primary_keys.php   (259 words)

  
 Relational databases: Defining relationships between database tables
You can use any candidate key in the table, but using the primary key is the accepted standard.) You learned about primary keys in Part 2—a primary key uniquely identifies each record in a table.
The only consideration is that a foreign key field must be of the same data type as the primary key.
Remember, the primary key in the Authors table is a complex key based on both the first and last name fields.
builder.com.com /5100-6388-5034792.html   (1470 words)

  
 PostgreSQL: Documentation: Manuals: PostgreSQL 8.1: Constraints
A primary key indicates that a column or group of columns can be used as a unique identifier for rows in the table.
A foreign key constraint specifies that the values in a column (or a group of columns) must match the values appearing in some row of another table.
Finally, we should mention that a foreign key must reference columns that either are a primary key or form a unique constraint.
www.postgresql.org /docs/current/static/ddl-constraints.html   (1944 words)

  
 AskTom "primary key constraint vs non-unique ind..."   (Site not responding. Last check: 2007-10-08)
That does not mean "don't use non-unique indexes for primary keys" for the benefits seem to outweigh the above by a long shot in your case.
The primary key sometimes does not include the date and hence it is unpartitioned or globally partitioned (e.g.
Using a non-unique index as a base for the primary key constraint solves this problem and reduces the down-time.
asktom.oracle.com /pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:8739243362459   (4298 words)

  
 Entity Bean Primary Key Generator   (Site not responding. Last check: 2007-10-08)
Posted by: Floyd Marinescu on July 13, 2000 @ 08:31 PM A simple solution to the primary key generation problem is to use an entity bean that increments an internal counter.
Since this primary key generator is an entity bean, it is distributed, transactional, and persistent.
To me the primary problem with the HIGH/LOW scheme is that the object which dispenses the actual UID has to be "alive" for long enough to use quite a few LOW values, otherwise the approach reverts back to the brute-force "hit the database for an id everytime" algorithm.
theserverside.com /patterns/thread.jsp?thread_id=220   (5353 words)

  
 Dummies::Creating a Primary Key in Access 2002   (Site not responding. Last check: 2007-10-08)
A table's primary key is a special field in your tables.
Most of the time, the primary key is a single field, but in very special circumstances, two or more fields can share the job.
Access 2002 doesn't care where the primary key field is in the table design.
www.dummies.com /WileyCDA/DummiesArticle/id-291.html   (629 words)

  
 Access 2000 Tutorial · FGCU Technology Skills Orientation   (Site not responding. Last check: 2007-10-08)
Every record in a table must have a primary key that differentiates it from every other record in the table.
In some cases, it is only necessary to designate an existing field as the primary key if you are certain that every record in the table will have a different value for that particular field.
The primary key field will be noted with a key image to the left.
www.fgcu.edu /support/office2000/access/tables.html   (1664 words)

  
 Chapter 5. Basic O/R Mapping
(optional) specifies that a foreign key constraint on the primary key of the mapped table references the table of the associated class.
Primary key associations don't need an extra table column; if two rows are related by the association then the two table rows share the same primary key value.
It is impossible to specify a foreign key constraint for this kind of association, so this is most certainly not meant as the usual way of mapping (polymorphic) associations.
www.hibernate.org /hib_docs/reference/en/html/mapping.html   (4173 words)

  
 MySQL types and primary key   (Site not responding. Last check: 2007-10-08)
The constraint imposed on a primary key is that each row must have a unique value for the key.
The primary key directive specifies two columns to "file" by.
Since primary keys are by definition unique, (message_id, user_id) as a value pair must be unique.
www.danchan.com /feature/2000/10/16/mysql/mysql2.htm   (510 words)

  
 Question of the month: Primary Key Efficiency
One point she made was that long primary keys were bad for performance.
Back she came with a detailed listing of the performance effects of primary keys, and I'm delighted to share these details with you.
If you're using a character data type, the primary key should exclude differential capitalization, spaces, and special characters, which might be difficult to remember.
www.javaperformancetuning.com /news/qotm040.shtml   (616 words)

  
 James Snape - Uniqueidentifiers as Primary Key Columns   (Site not responding. Last check: 2007-10-08)
The question was about the utility and performance of unique identifier columns as primary keys.
A unique identifier or GUID is a 16 byte data type; four times the size of an integer normally used for primary keys.
At Exony we hardly ever create a clustered index on the primary key as it’s normally reserved for datetime or date key columns.
www.jamessnape.me.uk /UniqueidentifiersAsPrimaryKeyColumns.aspx   (483 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.