Click here to Skip to main content
16,006,341 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database best practice - large tables. Pin
Colin Angus Mackay12-Oct-06 7:13
Colin Angus Mackay12-Oct-06 7:13 
AnswerRe: Database best practice - large tables. Pin
Eric Dahlvang12-Oct-06 4:22
Eric Dahlvang12-Oct-06 4:22 
GeneralRe: Database best practice - large tables. Pin
MY120112-Oct-06 6:10
MY120112-Oct-06 6:10 
GeneralRe: Database best practice - large tables. [modified] Pin
Eric Dahlvang12-Oct-06 6:51
Eric Dahlvang12-Oct-06 6:51 
GeneralRe: Database best practice - large tables. Pin
Colin Angus Mackay12-Oct-06 7:14
Colin Angus Mackay12-Oct-06 7:14 
GeneralRe: Database best practice - large tables. Pin
MY120112-Oct-06 7:33
MY120112-Oct-06 7:33 
GeneralRe: Database best practice - large tables. Pin
Colin Angus Mackay12-Oct-06 11:21
Colin Angus Mackay12-Oct-06 11:21 
GeneralRe: Database best practice - large tables. Pin
Eric Dahlvang12-Oct-06 8:03
Eric Dahlvang12-Oct-06 8:03 
Colin Angus Mackay wrote:
That won't fix that part of the problem. Making FactoryId the primary key or putting a unique constraint on it will.


Wow, I can really be stupid sometimes.  What was I thinking?  Thanks for pointing that out.
CREATE TABLE [Pollution] (
    [PollutionID] [int] IDENTITY (1, 1) NOT NULL ,
    [FactoryID] [int] NOT NULL ,
    [PollutionDesc] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    CONSTRAINT [PK_Pollution] PRIMARY KEY  CLUSTERED 
    (
        [PollutionID]
    )  ON [PRIMARY] ,
    CONSTRAINT [IX_FactoryID] UNIQUE  NONCLUSTERED 
    (
        [FactoryID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_Pollution_Factory] FOREIGN KEY 
    (
        [FactoryID]
    ) REFERENCES [Factory] (
        [FactoryID]
    ) ON DELETE CASCADE 
) ON [PRIMARY]
GO



--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

GeneralRe: Database best practice - large tables. Pin
MY120112-Oct-06 8:36
MY120112-Oct-06 8:36 
AnswerRe: Database best practice - large tables. Pin
Akhilesh Yadav15-Oct-06 23:53
Akhilesh Yadav15-Oct-06 23:53 
Questionnavigation bar Pin
m.m._200712-Oct-06 1:36
m.m._200712-Oct-06 1:36 
AnswerRe: navigation bar Pin
Colin Angus Mackay12-Oct-06 2:40
Colin Angus Mackay12-Oct-06 2:40 
Questionget value from Gridview Pin
sbao00411-Oct-06 23:32
sbao00411-Oct-06 23:32 
AnswerRe: get value from Gridview Pin
Jay_se12-Oct-06 1:11
Jay_se12-Oct-06 1:11 
GeneralRe: get value from Gridview Pin
sbao00412-Oct-06 2:29
sbao00412-Oct-06 2:29 
GeneralRe: get value from Gridview Pin
Jay_se12-Oct-06 21:26
Jay_se12-Oct-06 21:26 
QuestionHow do I link a variable to DefaultValue in dataset? Pin
dy1311-Oct-06 21:56
dy1311-Oct-06 21:56 
QuestionReporting Services 2005 issue Pin
rajaragothaman11-Oct-06 21:43
rajaragothaman11-Oct-06 21:43 
QuestionHow to create transaction log Pin
toink toink11-Oct-06 20:54
toink toink11-Oct-06 20:54 
AnswerRe: How to create transaction log Pin
Mike Dimmick12-Oct-06 5:51
Mike Dimmick12-Oct-06 5:51 
QuestionSQL Server 2005 BackUp Pin
dikshit0511-Oct-06 20:03
dikshit0511-Oct-06 20:03 
QuestionHow to backup data for sql server 2000 in sql server 2005? Pin
neo_605311-Oct-06 16:44
neo_605311-Oct-06 16:44 
QuestionStored Procedure Return Value HELP! Pin
Lisana11-Oct-06 6:25
Lisana11-Oct-06 6:25 
AnswerRe: Stored Procedure Return Value HELP! Pin
Private_Void11-Oct-06 7:47
Private_Void11-Oct-06 7:47 
Questionplz answer for this question Pin
Ravi Shankar4311-Oct-06 3:27
Ravi Shankar4311-Oct-06 3:27 

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.