Click here to Skip to main content
15,890,438 members
Home / Discussions / Database
   

Database

 
GeneralRe: Question about from syntax Pin
Jeff Martin28-Mar-05 7:28
Jeff Martin28-Mar-05 7:28 
GeneralRe: Question about from syntax Pin
Esmo200028-Mar-05 7:41
Esmo200028-Mar-05 7:41 
GeneralDatasets/Updating Pin
Nuhn28-Mar-05 3:16
Nuhn28-Mar-05 3:16 
GeneralRe: Datasets/Updating Pin
Suman Singh29-Mar-05 11:04
professionalSuman Singh29-Mar-05 11:04 
GeneralRe: Datasets/Updating Pin
Nuhn7-Apr-05 4:56
Nuhn7-Apr-05 4:56 
Questionhow to get name of all tables in msaccess database Pin
sumit2127-Mar-05 7:07
sumit2127-Mar-05 7:07 
AnswerRe: how to get name of all tables in msaccess database Pin
rwestgraham28-Mar-05 18:25
rwestgraham28-Mar-05 18:25 
GeneralDataRelation question Pin
IlanTal26-Mar-05 21:36
IlanTal26-Mar-05 21:36 
I've got old code in MFC which I've got to update. The old code uses DAO and I'm interested to update to ADO.NET. According to what I've read, it is desirable to have DataSet objects where each DataSet object addresses a single table. Then DataRelation is used to make the connection between tables. (Up until now I made SQL queries which did a join between 2 tables.)
My question now is how do I do things efficiently?
Suppose I have 2 tables, patients and studies. Patients has the name, Patient ID, etc. Studies has Patient ID as a foreign key and other information such as date etc.
To do things efficiently I need to limit the number of records so as not to dump the entire contents of the database. Suppose I look for a patient whose name begins with "abc". Then the query of the patients is efficient because I do something like
SELECT * from patients where name like "abc"
This gives me a list of patients with IDs. This can be a long or short list, which I don't know up front.
The question is: how can I make an efficient query on the studies table, i.e. limit the number of rows?

Also I can ask the opposite question. Suppose I want to query on the basis of date. Then I efficiently query the studies table, but how do I efficiently query the patients table?

Thanks for your help,
Ilan

GeneralRe: DataRelation question Pin
Scott Serl28-Mar-05 10:06
Scott Serl28-Mar-05 10:06 
GeneralRe: DataRelation question Pin
IlanTal28-Mar-05 18:38
IlanTal28-Mar-05 18:38 
GeneralRe: DataRelation question Pin
Scott Serl29-Mar-05 6:44
Scott Serl29-Mar-05 6:44 
GeneralRe: DataRelation question Pin
IlanTal29-Mar-05 7:10
IlanTal29-Mar-05 7:10 
GeneralQuestion about SELECT Pin
_J_26-Mar-05 5:57
_J_26-Mar-05 5:57 
GeneralRe: Question about SELECT Pin
turbochimp26-Mar-05 11:35
turbochimp26-Mar-05 11:35 
GeneralRe: Question about SELECT Pin
Colin Angus Mackay29-Mar-05 1:03
Colin Angus Mackay29-Mar-05 1:03 
GeneralRe: Question about SELECT Pin
_J_29-Mar-05 1:41
_J_29-Mar-05 1:41 
GeneralRe: Question about SELECT Pin
Colin Angus Mackay29-Mar-05 1:48
Colin Angus Mackay29-Mar-05 1:48 
GeneralRe: Question about SELECT Pin
_J_29-Mar-05 1:51
_J_29-Mar-05 1:51 
GeneralRe: Question about SELECT Pin
Colin Angus Mackay29-Mar-05 1:56
Colin Angus Mackay29-Mar-05 1:56 
GeneralRe: Question about SELECT Pin
_J_29-Mar-05 2:02
_J_29-Mar-05 2:02 
GeneralSaving file in SQL Server Pin
dabuskol25-Mar-05 19:48
dabuskol25-Mar-05 19:48 
GeneralRe: Saving file in SQL Server Pin
turbochimp25-Mar-05 20:12
turbochimp25-Mar-05 20:12 
GeneralSELECT TOP Pin
vuthaianh25-Mar-05 12:10
vuthaianh25-Mar-05 12:10 
GeneralRe: SELECT TOP Pin
turbochimp25-Mar-05 17:49
turbochimp25-Mar-05 17:49 
GeneralSimplify a T-SQL Pin
WDI25-Mar-05 7:41
WDI25-Mar-05 7:41 

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.