Primary key - CompWisdom
About us  |  Why use us?  |  Press  |  Contact us

 

Topic: Primary key


  
 Primary key - Wikipedia, the free encyclopedia
The primary key should be immutable, meaning that its value should not be changed during the course of normal operations of the database.
The primary key should generally be short to minimize the amount of data that needs to be stored by other relations that reference it.
In database design, a primary key is a value that can be used to identify a unique row in a table.
http://en.wikipedia.org/?title=Primary_key   (483 words)

  
 Primary Key Reengineering Projects: The Solution Part 2 of a Two-Part Series
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).
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.
And if it is, then the other table cannot be made a subtype at all, because the primary keys of its rows could not have the same primary keys of any rows in the supertype table and, therefore, could not be foreign keys of the supertype table.
http://www.dmreview.com/article_sub.cfm?articleId=2004   (4640 words)

  
 AskTom "primary key"
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".
The benefit of a primary key over a NOT NULL and UNIQUE index is mostly semantics.
Dear Tom, If i have one table on that table i have idno field if i create primary key on it or if i create index on it what are the pros and cros of the both.
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1113433570419   (654 words)

  
 Data Modeling: Primary and Foreign Keys
The primary key attribute cannot be optional (i.e., have null values).
Send computing questions to the ITS Help Desk or call (512) 475-9400.
An artificial keyis one that has no meaning to the business or organization.
http://www.utexas.edu/its/windows/database/datamodeling/dm/keys.html   (997 words)

  
 SQL by Design: How to Choose a Primary Key
You use primary key columns for joins (combining data from two or more tables based on common values in join columns), for query retrieval, and for grouping or sorting a query result set.
It is thorough the primary key that we usually query the database.
If a primary key value were allowed a null value, then you couldn't easily retrieve the row associated with the primary key.
http://www.windowsitpro.com/SQLServer/Article/ArticleID/5113/5113.html   (1606 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.
Regardless of the algorithm used to generate the keys, all monotonic key algorithms have similar effects on concurrency and cache hit.
Perhaps the most apparent solution to surrogate primary key generation is to select the max from the data table and to add one to determine the next key value.
http://www.sybase.com/detail?id=860   (2967 words)

  
 Foreign key definition renders primary key irrelevant - Builder - ZDNet Asia
Some developers interpret this to mean a foreign key is simply an indexed column(s) in one table transferred to a related table.
After reviewing these key terms, you can most accurately define a foreign key as the minimum number of columns necessary to uniquely identify each record in one table that occurs in a related table.
The commonly accepted definition of a foreign key is when one table’s primary key occurs in another table.
http://www.asia.cnet.com/builder/architect/db/0,39009328,39105612,00.htm   (1056 words)

  
 Primary Key - Visual FoxPro Wiki
Prefix or suffix the key with a computer generated key (this will prevent Fox from generating a system level PK violation).
For Example, since FOR NOT DELETED() is not optimizable, you would need to create another index that is optimized if you want to use the primary key to JOIN tables and get optimization too.
Finally, let each class know about each of its keys, but do not make the record level key available to the user (only the system -- and even then, don't spread the knowledge far and wide).
http://fox.wikis.com/wc.dll?Wiki%7EPrimaryKey   (1402 words)

  
 Assigning a Primary Key
If a field is set as a primary key, the computer will alert you when you attempt to type duplicate data into that field.
When you create a table originally, Access will ask if it can create a primary key field for you.
We will demonstrate by making the Member Number field the primary key field.
http://www.uic.edu/depts/adn/seminars/access-intermed/primarykey.html   (212 words)

  
 Oracle/PLSQL: Primary Keys
None of the fields that are part of the primary key can contain a null value.
A primary key can be defined in either a CREATE TABLE statement or an ALTER TABLE statement.
The syntax for creating a primary key using a CREATE TABLE statement is:
http://www.techonthenet.com/oracle/primary_keys.php   (259 words)

  
 Relational databases: Defining relationships between database tables
Remember, the primary key in the Authors table is a complex key based on both the first and last name fields.
In addition, foreign key values can be Null, although the recommendation is that you not leave a foreign key Null without a very specific reason to do so.
When you move a field to a new table, you'll probably add that new table's primary key to the original table as a foreign key.
http://builder.com.com/5100-6388-5034792.html   (1470 words)

  
 #2504 : What should I choose for my primary key?
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.
We all know there are very few scenarios where a table in your database should not have a primary key.
There are two fundamental types of primary keys: natural and surrogate / artificial.
http://www.aspfaq.com/2504   (1399 words)

  
 PostgreSQL: Documentation: Manuals: PostgreSQL 8.1: Constraints
because in absence of a column list the primary key of the referenced table is used as the referenced column(s).
If the foreign key references a unique constraint, there are some additional possibilities regarding how null values are matched.
For example, a GUI application that allows modifying row values probably needs to know the primary key of a table to be able to identify rows uniquely.
http://www.postgresql.org/docs/current/static/ddl-constraints.html   (1944 words)

  
 Dummies::Creating a Primary Key in Access 2002
Access 2002 doesn't care where the primary key field is in the table design.
If the first field is an AutoNumber type, Access 2002 anoints it as the primary key without adding anything else to the table.
If you create a new table without a primary key, Access 2002 automatically asks whether you want to add one.
http://www.dummies.com/WileyCDA/DummiesArticle/id-291.html   (629 words)

  
 AskTom "primary key constraint vs non-unique ind..."
Using a non-unique index as a base for the primary key constraint solves this problem and reduces the down-time.
If you have a large number of local bitmap indexes on your fact table and are doing historical corrections it is often much faster to do a delete of the data to be replaced then a sqlloader direct load (as the indexes get deferred).
Hi I have some questions regarding definition of primary keys at database level.
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:8739243362459   (4298 words)

  
 Access 2000 Tutorial · FGCU Technology Skills Orientation
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.
Access will prompt you to create this type of field at the beginning of the table the first time you save the table and a primary key field has not been assigned.
A social security number is an example of a record whose values will only appear once in a database table.
http://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.
attribute should only be used for mapping legacy data where a foreign key refers to a unique key of the associated table other than the primary key.
to be mapped as a component, where the property names refer to keys of the map.
http://www.hibernate.org/hib_docs/reference/en/html/mapping.html   (4173 words)

  
 Candidate keys: Choosing the right primary key
The candidate key can not hold NULLs (NULL is not zero.
As you can see, defining (or choosing) the right primary keys is not neccessarily a simple, straight-forward task.
In post 2, about not null values in a primary key: How can you identify something you don’t know?
http://www.databasedesign-resource.com/candidate-keys.html   (1352 words)

  
 Entity Bean Primary Key Generator
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.
To allocate a key, I get the current VALUE for a specific name ("next-key") and increment it and write it back to the table.
Since posting this pattern, this thread has grown to include many other good idea's about primary key generation strategies, so please read on.
http://theserverside.com/patterns/thread.jsp?thread_id=220   (5353 words)

  
 MySQL types and primary key
create table message_votes (message_id int not null, user_id int not null, vote enum('good', 'bad') not null, primary key (message_id, user_id));
create table messages (id int auto_increment not null, user_id int not null, posting_date datetime not null, comment_body text primary key (id))
In this example, the vote column can contain either the value 'good' or the value 'bad'.
http://www.danchan.com/feature/2000/10/16/mysql/mysql2.htm   (510 words)

  
 MySQL 5.0 Reference Manual :: 13.1.5 CREATE TABLE Syntax
Every key needs one extra byte to indicate how many bytes of the previous key are the same for the next key.
For 3.23.58 using InnoDB, I discovered that if you have a unique index key with multiple optional columns, then it does not apply a unique constraint at all if ANY of your data values for the columns are null.
If all keys are totally different, you use one byte more per key, if the key is not a key that can have
http://dev.mysql.com/doc/refman/5.0/en/create-table.html   (3415 words)

  
 How To Create a Table with Primary Key Through ADOX
The second procedure utilizes the ADOX Key object to add a multiple field key to a table.
When adding a single-field primary key, you do not need to use the ADOX Key object.
The first procedure in the example below creates a new table in an existing Microsoft Access database, creates a new field in that table, then creates a primary key index.
http://support.microsoft.com/default.aspx?scid=kb;en-us;252908   (337 words)

  
 Oracle Constraints Primary Key Foreign Unique Check Referential Integrity
To create a foreign key constraint on an object in a different schema you must have the REFERENCES privilege on the columns of the referenced key in the parent table or view.
A surrogate is totally hidden from users and maintained by the system -- think of how an index works.
Control the amount of free space in the index data block for updating.
http://www.psoug.org/reference/constraints.html   (622 words)

  
 Question of the month: Primary Key Efficiency
"a longer key will require more computation to hash or compare than a shorter primary key" chapter 7 page 234.
They let you query and modify each table row individually without changing other rows in the same table.
There are always lots of new things to find out about Java performance, even for the performance experts.
http://www.javaperformancetuning.com/news/qotm040.shtml   (616 words)

  
 HOWTO - Random character generation for primary key Free discussion
> > environment, you should use integer primary keys.
> environment, you should use integer primary keys.
This should be easy in pgAdmin2 because you can copy table definition
http://www.qaix.com/postgresql-database-development/184-472-howto-random-character-generation-for-primary-key-read.shtml   (2690 words)

  
 Macromedia - ColdFusion TechNote : Getting Auto-Increment Primary Key Values
In many applications it is necessary to know the primary key value of a new record immediately after inserting it so it can be displayed to the client or used in subsequent queries.
This form submits to template.cfm, which inserts the order into the database, queries for the OrderID (the autonumber primary key field), and returns it to the client:
For example (excuse poor DB design), you have a database table called "Orders" with three fields: OrderID, Quantity, and Item.
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17000   (374 words)

  
 PRIMARY KEY
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'primarytest2_pkey' for table 'primarytest2'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'primarytest_pkey' for table 'primarytest'
test=> CREATE TABLE primarytest (col INTEGER PRIMARY KEY);
http://www.postgresql.org/files/documentation/books/aw_pgsql/node130.html   (94 words)

  
 WebDeveloper.com - PHP, mySQL - Can't pull primary key information?
Is there a problem with trying to grab the primary key from a table?
Project Raptor: Oracle's New Tool for DBAs and Developers
Now, the $priv and $user variables display perfectly fine, but the $uid variable won't print anything.
http://webreference.com/r/sf/showthread.php?threadid=55125   (578 words)

  
 James Snape - Uniqueidentifiers as Primary Key Columns
There is a new sequential generation algorithm in Yukon which solves the issue although I can’t think of a reason why you would use a clustered index on a GUID because they are better suited for range queries.
The size of the datatype can add up when used in data warehouse fact tables because each fact may have a large number of dimensions.
Theme design by James Snape with newtelligence dasBlog 1.8.5223.0
http://www.jamessnape.me.uk/UniqueidentifiersAsPrimaryKeyColumns.aspx   (483 words)

  
 creating a new numbered column as primary key in a table Free discussion
QAIX > MS SQL database development > creating a new numbered column as primary key in a table 11 Mar 2005 19:38:03
creating a new numbered column as primary key in a table
There is no point making IDENTITY the *only* key in a table though.
http://qaix.com/ms-sql-database-development/277-631-creating-a-new-numbered-column-as-primary-key-in-a-table-read.shtml   (492 words)

  
 PGP key statistics : Linux Security FAQ Primary Key - Alexander O. Yuriev
input : key id's of length 8, 16 or 32, optionally preceeded by 0x, in upper or lowercase, like
key statistics in the wotsap analysis by Jörgen Cederlöf
key statistics in the key analysis by Jason Harris
http://www.cs.uu.nl/people/henkp/henkp/pgp/pathfinder/stats/ADF3EE95.html   (230 words)

  
 CQ Press: Online: CQ Public Affairs Collection
Subscribe to one of our CQ Electronic Library eNewsletters
CQ Public Affairs Collection features in-depth coverage of vital public policy issues, statistical and historical analyses, and full-text historical documents and primary source materials.
Organized by 22 key public affairs topics - from Advocacy and Public Service to U.S. Congress and Politics - in a fully integrated reference source, the collection provides invaluable context for today's critical debates.
http://www.cqpress.com/product/732.html   (343 words)

  
 UM-Dearborn - Mardigian Library - Research - Databases by Name - Reference Works
Search for information on U.S. based foundations and grants.
A comprehensive reference source for the life sciences, with links to key primary and secondary literature.
Register in order to use RIA Checkpoint off-campus and take advantage of all database features.
http://mardigian.umd.umich.edu/cat.php?cat=Reference_Works   (1088 words)

  
 Primary School (Key Stage 2) Performance Tables 2001
Primary School (Key Stage 2) Performance Tables 2001
The Primary School Performance Tables have been published by individual Local Education Authorities (LEAs) in respect of schools in their area.
All LEAs were required to publish the Key Stage 2 National Curriculum test results of 11-year-old pupils in state schools in England, together with certain background details for each school, on or before Wednesday 5 December 2001.
http://www.dfes.gov.uk/performancetables/primary_01.shtml   (179 words)

  
 [Persistence & CMP/JBoss] - Auto Increment primary key in postgresql: Functional exampl Free discussion
Note that I am creating my DB tables myself, so I don't speak to the table generation.
QAIX > Java Programming > [Persistence & CMP/JBoss] - Auto Increment primary key in postgresql: Functional exampl 29 Feb 2004 02:51:42
[Persistence & CMP/JBoss] - Auto Increment primary key in postgresql: Functional exampl
http://www.qaix.com/java-programming/38-071-persistence-cmp-jboss-auto-increment-primary-key-in-postgresql-functional-exampl-read.shtml   (517 words)

  
 Arbitration - Your Connection to Arbitration Online
provide a window on ICC arbitration procedure and current thinking on key...
International Arbitration Database: A Database on Arbitration in the widest sense of private dispute resolution.
LII: An overview of collective bargaining and labor arbitration law with links to key primary and secondary sources.
http://www.lawyerfinderonline.com/directory/Arbitration   (413 words)

  
 Primary key generation
i read ejb design patterns(Auto generating patterns- sequence block pattern), but the pattern was very confusing and gaps may exists in genrated keys, how should i do this ?
That's very hard to do, particularly if each insert needs a sequence and the sequence has to denote the order of inserts (because block allocation of sequences will not be possible and any new insert has to wait until all pending inserts either commit or roll back!)
i want to write cmp with auto generating primary key, primary keys should begin from 0 and goes up one by one.
http://www.theserverside.com/news/thread.tss?thread_id=18826   (1027 words)

  
 Primary Sources
She attempted to answer her critics point by point by writing "A Key to Uncle Tom's Cabin, Presenting the Original Facts and Documents Upon Which the Story is Founded, Together with Corroborative Statements Verifying the Truth of the Work."
Terms and Conditions of Use, Privacy Statement, and Trademark Information
According to Stowe, why were slaves indifferent to education after a certain age?
http://college.hmco.com/history/us/resources/students/primary/key.htm   (427 words)

  
 Primary Key Pty. Ltd.
This feature is included with every Primary Key web hosting package at no additional charge!
Our unique web site editing system enables you to easily update or edit your web site whenever you want.
Simply log in and make changes from any PC with web access!
http://www.primarykey.net.au   (144 words)

  
 Mayoral primary key for some voters - The Clarion-Ledger
Atkinson's advice: "We all have to unify ourselves and love one another before we can begin to fix these problems."
Mayoral primary key for some voters - The Clarion-Ledger
Earnestine O'Banner, who voted at the Golden Key Activity Center in Ward 3, expressed frustration with the two-term incumbent.
http://www.clarionledger.com/apps/pbcs.dll/article?AID=/20050504/NEWS0103/505040346   (587 words)

Compwisdom
 About us   |  Why use us?   |  Press   |  Contact us

 Copyright © 2006 CompWisdom.com Usage implies agreement with terms.