Click here to Skip to main content
15,886,664 members
Home / Discussions / Database
   

Database

 
QuestionINSERT Query Pin
nadinekamal1-Apr-07 4:47
nadinekamal1-Apr-07 4:47 
AnswerRe: INSERT Query Pin
Bernard Aoun1-Apr-07 5:57
Bernard Aoun1-Apr-07 5:57 
QuestionSelect Query Pin
Girish48131-Mar-07 18:57
Girish48131-Mar-07 18:57 
AnswerRe: Select Query Pin
jijoaresseriljose31-Mar-07 23:15
jijoaresseriljose31-Mar-07 23:15 
AnswerRe: Select Query Pin
Girish4811-Apr-07 3:34
Girish4811-Apr-07 3:34 
AnswerRe: Select Query Pin
Krish - KP6-Apr-07 4:42
Krish - KP6-Apr-07 4:42 
QuestionBest practice in large tables Pin
Nader Elshehabi31-Mar-07 10:10
Nader Elshehabi31-Mar-07 10:10 
AnswerRe: Best practice in large tables Pin
Colin Angus Mackay31-Mar-07 10:23
Colin Angus Mackay31-Mar-07 10:23 
Nader Elshehabi wrote:
I have a SQLTable that contains 293 columns, and may even contain thousands of rows. Such a massive table could be a source of performance issues.


Absolutely - But, it really depends on how you want to use the table.


Nader Elshehabi wrote:
Is it satisfactory to keep the table this way, or should it be better if I divide the table on more than one tables, and link them using Foreign Key constraints?


To me that suggests that the table is not normalised. All data in the table must be dependent on the primary key. If you have repeating data in a table that suggests that a separate table needs to be created. For example:

A table Family: MotherName, FatherName, Child1Name, Child2Name, Child3Name, Child4Name

This has some limitations. First a maximum of 4 children are permitted. It assumes everyone lives in a perfect home and all siblings share the same parents.

So, if you have repeating columns (often characterised by the need to include a digit) then that needs to be separated out into a new table.


Nader Elshehabi wrote:
For example each Table containing 50 columns or so?


You should search for useful relationships rather than splitting at an arbitrary number of columns. By splitting at every 50th column you run the risk of splitting related data (or data that is often used together) into separate tables which will slow down any query.

If there is no way to normalise the data then consider what groups of columns tend to be used together. Then split it that way ensuring that each table maintains a one-to-one relationship with the others. This will cause some issues during an insert where some rows won't exist yet. So, design it to accept a zero-to-one relationship - that way missing rows in other tables don't affect the whole. You might also find that there a groups of columns where if one column isn't filled, neither are others in the group. You can then use this knowledge to eliminate the need to store a row where no information is used.




GeneralRe: Best practice in large tables Pin
Nader Elshehabi31-Mar-07 10:36
Nader Elshehabi31-Mar-07 10:36 
AnswerRe: Best practice in large tables Pin
kubben31-Mar-07 14:41
kubben31-Mar-07 14:41 
GeneralRe: Best practice in large tables Pin
Nader Elshehabi31-Mar-07 21:58
Nader Elshehabi31-Mar-07 21:58 
QuestionSQL Stored Procedure Column Pin
Lea Hayes31-Mar-07 9:24
Lea Hayes31-Mar-07 9:24 
AnswerRe: SQL Stored Procedure Column Pin
Colin Angus Mackay31-Mar-07 10:09
Colin Angus Mackay31-Mar-07 10:09 
GeneralRe: SQL Stored Procedure Column Pin
Lea Hayes31-Mar-07 10:17
Lea Hayes31-Mar-07 10:17 
GeneralRe: SQL Stored Procedure Column Pin
Colin Angus Mackay31-Mar-07 10:24
Colin Angus Mackay31-Mar-07 10:24 
Questionself join Pin
zizu9096@gmail.com31-Mar-07 5:31
zizu9096@gmail.com31-Mar-07 5:31 
AnswerRe: self join Pin
Colin Angus Mackay31-Mar-07 10:13
Colin Angus Mackay31-Mar-07 10:13 
AnswerRe: self join Pin
DQNOK2-Apr-07 6:55
professionalDQNOK2-Apr-07 6:55 
QuestionHow to calll Oracle stored procedures from Microsoft Reporting Services Pin
maskor ma31-Mar-07 1:36
maskor ma31-Mar-07 1:36 
QuestionError: DataBinding: 'System.Data.DataRowView' [modified] Pin
nothingbutcat30-Mar-07 16:25
nothingbutcat30-Mar-07 16:25 
QuestionComplex Select Query Pin
Girish48130-Mar-07 7:48
Girish48130-Mar-07 7:48 
AnswerRe: Complex Select Query Pin
DQNOK30-Mar-07 8:12
professionalDQNOK30-Mar-07 8:12 
GeneralRe: Complex Select Query Pin
Girish48130-Mar-07 8:28
Girish48130-Mar-07 8:28 
GeneralRe: Complex Select Query Pin
DQNOK30-Mar-07 8:39
professionalDQNOK30-Mar-07 8:39 
GeneralRe: Complex Select Query Pin
Jerry Hammond30-Mar-07 15:16
Jerry Hammond30-Mar-07 15:16 

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.