Click here to Skip to main content
15,910,787 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Server 2008 - Replication without a primary key in the publisher ? Pin
obarahmeh3-Feb-09 19:57
obarahmeh3-Feb-09 19:57 
GeneralRe: SQL Server 2008 - Replication without a primary key in the publisher ? Pin
Wendelius4-Feb-09 7:49
mentorWendelius4-Feb-09 7:49 
QuestionSSIS - How to transform data and push transformed data into Destination database Pin
CodalcoholicNBrainy2-Feb-09 23:12
CodalcoholicNBrainy2-Feb-09 23:12 
AnswerRe: SSIS - How to transform data and push transformed data into Destination database Pin
Giorgi Dalakishvili3-Feb-09 0:03
mentorGiorgi Dalakishvili3-Feb-09 0:03 
Questionprotect sql server database Pin
Any_India2-Feb-09 22:17
Any_India2-Feb-09 22:17 
AnswerRe: protect sql server database Pin
Wendelius3-Feb-09 1:48
mentorWendelius3-Feb-09 1:48 
QuestionTree structre table performance problem Pin
sepel2-Feb-09 22:12
sepel2-Feb-09 22:12 
AnswerRe: Tree structre table performance problem Pin
Paddy Boyd3-Feb-09 2:16
Paddy Boyd3-Feb-09 2:16 
You have two problems here, first off storing the city, state & country on the post table. What happens if you find you have data issues and have to move a city to another state - will require update to the post table. Second problem is performance of your query.

I would suggest three tables, Country, State, City, with city having a foreign key of state etc.

Then just keep the city location id on the post table and join to the other two tables to get your state and country.

Either that or keep the parent child relationship in location and use a CTE (common table expression) to recursively query the table to get the parent relationships for a particular location. Then just store a single location id as the foreign key on the post table. This has the possible advantage of a post being able to be logged against a country or a state instead of just a city.
AnswerRe: Tree structre table performance problem Pin
Wendelius3-Feb-09 2:17
mentorWendelius3-Feb-09 2:17 
QuestionWhich version of SqlServer is better for my work Pin
VisualLive2-Feb-09 22:02
VisualLive2-Feb-09 22:02 
AnswerRe: Which version of SqlServer is better for my work Pin
Wendelius3-Feb-09 1:51
mentorWendelius3-Feb-09 1:51 
GeneralRe: Which version of SqlServer is better for my work Pin
VisualLive3-Feb-09 5:04
VisualLive3-Feb-09 5:04 
GeneralRe: Which version of SqlServer is better for my work Pin
Wendelius3-Feb-09 6:59
mentorWendelius3-Feb-09 6:59 
GeneralRe: Which version of SqlServer is better for my work Pin
VisualLive3-Feb-09 14:28
VisualLive3-Feb-09 14:28 
GeneralRe: Which version of SqlServer is better for my work Pin
Wendelius3-Feb-09 18:22
mentorWendelius3-Feb-09 18:22 
GeneralRe: Which version of SqlServer is better for my work Pin
VisualLive3-Feb-09 20:47
VisualLive3-Feb-09 20:47 
GeneralRe: Which version of SqlServer is better for my work Pin
Wendelius4-Feb-09 7:54
mentorWendelius4-Feb-09 7:54 
GeneralRe: Which version of SqlServer is better for my work Pin
VisualLive4-Feb-09 15:20
VisualLive4-Feb-09 15:20 
Questionaudit trail Pin
NidhiKanu2-Feb-09 18:58
professionalNidhiKanu2-Feb-09 18:58 
AnswerRe: audit trail Pin
N a v a n e e t h2-Feb-09 19:06
N a v a n e e t h2-Feb-09 19:06 
GeneralRe: audit trail Pin
NidhiKanu2-Feb-09 19:18
professionalNidhiKanu2-Feb-09 19:18 
QuestionSQL For selecting consecutive rows with time difference Pin
pratap19802-Feb-09 13:11
pratap19802-Feb-09 13:11 
AnswerRe: SQL For selecting consecutive rows with time difference Pin
Wendelius2-Feb-09 18:19
mentorWendelius2-Feb-09 18:19 
Questioncount total records and (number of records based on a condition) for same column in single sql query Pin
chandrubngit2-Feb-09 5:28
chandrubngit2-Feb-09 5:28 
AnswerRe: count total records and (number of records based on a condition) for same column in single sql query Pin
Colin Angus Mackay2-Feb-09 5:52
Colin Angus Mackay2-Feb-09 5:52 

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.