Click here to Skip to main content
15,912,897 members
Home / Discussions / Database
   

Database

 
AnswerRe: Binding Controls Problem Pin
cbhkenshin12-Mar-06 22:25
cbhkenshin12-Mar-06 22:25 
GeneralRe: Binding Controls Problem Pin
nata200612-Mar-06 22:46
nata200612-Mar-06 22:46 
Questionselect command.. Pin
dansoft10-Mar-06 22:33
dansoft10-Mar-06 22:33 
AnswerRe: select command.. Pin
Mike Dimmick11-Mar-06 23:59
Mike Dimmick11-Mar-06 23:59 
AnswerRe: select command.. Pin
albCode12-Mar-06 6:26
albCode12-Mar-06 6:26 
AnswerRe: select command.. Pin
turbochimp12-Mar-06 19:57
turbochimp12-Mar-06 19:57 
QuestionForeign Key Pin
Waldermort10-Mar-06 21:30
Waldermort10-Mar-06 21:30 
AnswerRe: Foreign Key Pin
Mike Dimmick12-Mar-06 0:32
Mike Dimmick12-Mar-06 0:32 
Let's start with the primary key. The primary key is any combination of values which uniquely identify a particular row in the table. To have the database engine enforce this, you can define a primary key constraint, defining the column or combination of columns which will contain the values which make up the key. The word 'constraint' is often missed off, making the term 'primary key' mean both the collection of columns and the actual values of the row.

If the key is made up from the values of multiple columns, that's often referred to as a compound key. Sometimes compound keys can be unwieldy, so to simplify queries and/or improve performance, a replacement identifier column is defined - often simply a number - which may be referred to as a surrogate key.

A foreign key is basically wherever the values of a primary key for one table appear in another table, hence foreign. By defining a foreign key constraint you can have the database engine enforce the requirement that a matching row (with matching primary key values) exists in the referenced table when inserting or updating data into the table with the constraint. A table can have multiple foreign key constraints. With some database engines, you can also have the database engine automatically delete or update related rows when a row in the referenced table is deleted or updated or, conversely, prevent rows being updated or deleted if those rows are referenced.

See the CREATE TABLE documentation for how to create these constraints if you're creating your tables in SQL. If you're using Enterprise Manager on SQL Server 2000, select 'Relationships' from the context menu in the Design Table window.

Stability. What an interesting concept. -- Chris Maunder
AnswerRe: Foreign Key Pin
HimaBindu Vejella13-Mar-06 18:40
HimaBindu Vejella13-Mar-06 18:40 
QuestionT-SQL Help Pin
WDI10-Mar-06 20:16
WDI10-Mar-06 20:16 
AnswerRe: T-SQL Help Pin
Dave Kreskowiak11-Mar-06 17:45
mveDave Kreskowiak11-Mar-06 17:45 
QuestionADO.NET transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 6:29
sponsorJudah Gabriel Himango10-Mar-06 6:29 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:00
Jörgen Sigvardsson10-Mar-06 10:00 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:34
sponsorJudah Gabriel Himango10-Mar-06 10:34 
GeneralRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:52
Jörgen Sigvardsson10-Mar-06 10:52 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:04
Jörgen Sigvardsson10-Mar-06 10:04 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:29
sponsorJudah Gabriel Himango10-Mar-06 10:29 
AnswerRe: Transactions affect performance? Pin
Rob Graham10-Mar-06 12:21
Rob Graham10-Mar-06 12:21 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango11-Mar-06 15:29
sponsorJudah Gabriel Himango11-Mar-06 15:29 
AnswerRe: Transactions affect performance? Pin
Rob Graham10-Mar-06 12:26
Rob Graham10-Mar-06 12:26 
QuestionConnect to a remote SQLServer via local proxy Pin
MatthysDT10-Mar-06 1:50
MatthysDT10-Mar-06 1:50 
QuestionSELECT and SET Pin
Brendan Vogt10-Mar-06 1:03
Brendan Vogt10-Mar-06 1:03 
AnswerRe: SELECT and SET Pin
Colin Angus Mackay10-Mar-06 6:04
Colin Angus Mackay10-Mar-06 6:04 
GeneralRe: SELECT and SET Pin
Brendan Vogt12-Mar-06 19:03
Brendan Vogt12-Mar-06 19:03 
QuestionExtract data from MSDE through ADO.NET Pin
smadan10-Mar-06 0:43
smadan10-Mar-06 0:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.