Click here to Skip to main content
15,884,629 members
Home / Discussions / Database
   

Database

 
AnswerRe: Does Adapter.GetData read all data? (noob) Pin
Mark J. Miller22-Feb-07 3:26
Mark J. Miller22-Feb-07 3:26 
GeneralConditional constraints Pin
Brady Kelly21-Feb-07 8:06
Brady Kelly21-Feb-07 8:06 
GeneralRe: Conditional constraints Pin
Mark J. Miller22-Feb-07 3:19
Mark J. Miller22-Feb-07 3:19 
QuestionMRD Pin
Ryno Burger21-Feb-07 6:43
Ryno Burger21-Feb-07 6:43 
QuestionGrouping data from SQL in ASP Pin
JennGom21-Feb-07 6:16
JennGom21-Feb-07 6:16 
AnswerRe: Grouping data from SQL in ASP Pin
andyharman21-Feb-07 8:15
professionalandyharman21-Feb-07 8:15 
GeneralRe: Grouping data from SQL in ASP Pin
JennGom21-Feb-07 9:27
JennGom21-Feb-07 9:27 
QuestionRetain Benefits of Non-Normalized Table Pin
perlmunger21-Feb-07 4:54
perlmunger21-Feb-07 4:54 
I normalized a table in a database project I'm working on so that instead of having something like this:

Table: entities
-----------------
ID            NAME           RELATED_ITEM_ID_1        RELATED_ITEM_ID_2 ..... RELATED_ITEM_ID_40
1             Entity 1              1                          24                  67
2             Entity 3              14                         NULL                45

I now have something like these two tables:
Table: entities
-----------------
ID            NAME     
1             Entity 1 
2             Entity 3 

Table: entity_items
-----------------
ENTITY_ID        RELATED_ITEM_ID
1                       1
1                       24
1                       67
2                       14
2                       45

I want to return a table that has a summary of the entities table returning the top three entity_items so that it will come back looking like the original (non-normalized) entities table.

I am using a MySQL database, but any help with the basic concepts and SQL here would be appreciated. I'm sure this is a common problem people deal with, but I didn't even know the terminology to use to find an answer on the web.

Thanks.

-Matt


------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall

AnswerRe: Retain Benefits of Non-Normalized Table Pin
Mark J. Miller22-Feb-07 3:00
Mark J. Miller22-Feb-07 3:00 
GeneralRe: Retain Benefits of Non-Normalized Table Pin
perlmunger22-Feb-07 4:50
perlmunger22-Feb-07 4:50 
QuestionWhat is wrong with my SQL string? Pin
JUNEYT21-Feb-07 3:16
JUNEYT21-Feb-07 3:16 
AnswerRe: What is wrong with my SQL string? Pin
Colin Angus Mackay21-Feb-07 3:19
Colin Angus Mackay21-Feb-07 3:19 
GeneralRe: What is wrong with my SQL string? Pin
JUNEYT21-Feb-07 3:36
JUNEYT21-Feb-07 3:36 
GeneralRe: What is wrong with my SQL string? Pin
Colin Angus Mackay21-Feb-07 3:55
Colin Angus Mackay21-Feb-07 3:55 
GeneralRe: What is wrong with my SQL string? Pin
JUNEYT21-Feb-07 4:31
JUNEYT21-Feb-07 4:31 
GeneralRe: What is wrong with my SQL string? Pin
peterchen21-Feb-07 11:51
peterchen21-Feb-07 11:51 
GeneralRe: What is wrong with my SQL string? Pin
Pete O'Hanlon21-Feb-07 4:46
mvePete O'Hanlon21-Feb-07 4:46 
AnswerRe: What is wrong with my SQL string? Pin
kubben21-Feb-07 3:27
kubben21-Feb-07 3:27 
GeneralUpdate Advice - Getting most recent value Pin
Brady Kelly21-Feb-07 2:15
Brady Kelly21-Feb-07 2:15 
GeneralRe: Update Advice - Getting most recent value Pin
andyharman21-Feb-07 2:25
professionalandyharman21-Feb-07 2:25 
GeneralRe: Update Advice - Getting most recent value Pin
Brady Kelly21-Feb-07 2:58
Brady Kelly21-Feb-07 2:58 
Questionsome question Pin
Imran Khan Pathan21-Feb-07 1:04
Imran Khan Pathan21-Feb-07 1:04 
AnswerRe: some question Pin
andyharman21-Feb-07 2:38
professionalandyharman21-Feb-07 2:38 
QuestionAverage of all columns Pin
Sam Heller20-Feb-07 11:11
Sam Heller20-Feb-07 11:11 
AnswerRe: Average of all columns Pin
Krish - KP20-Feb-07 17:01
Krish - KP20-Feb-07 17:01 

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.