Performance Concerns

Results 1 to 2 of 2

Thread: Performance Concerns

  1. #1
    Rob Bleile Guest

    Default Performance Concerns

    I am probably considered a novice, when it comes to ASP and Databases. Currently my database resides in Access 200, but will move it to SQL Server once I finish designing it. I will try to explain my concerns. I have a table set up that list events going on. Rather than list the 2 people that are in charge of the event in that table I created a separate table to join the people to the event. For example:<BR><BR>tblEvents<BR> fldID<BR> fldDate<BR> fldTime<BR> fldLocation<BR><BR>tblEventsPersons<BR> fldID<BR> fldEventsID<BR> fldPersonID<BR><BR>tblPeople<BR> fldID (fldPersonID)<BR> fldName<BR> ..more info about person<BR><BR>This was my idea, not sure if it would be efficient. My goal is to create a list of events a particular person has, what they are, and who their co-worker is. To continue what i was thinking:<BR>select eventID from tblEventsPersons where fldPersonID = given ID from querystring<BR>I was going to run that through a loop and then<BR>select all(*) from tblEvents and PersonID from tblEventsPersons where eventID = the results of the loop. <BR><BR> I also need to get the name of the person from which I have listed there ID. Any help whatsoever would be greatly appreciated. Just tell me what to use and/or how to rearrange my tables appropriatly, and I will figure it out from there. Thanks Again - Rob<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Performance Concerns

    Your tables seem to be arranged just fine. The only thing that may be unneccessary is the fldID column in tblEventsPersons. You could lose that and make the combination of fldEventsID and fldPersonID the primary key. Also your names are a bit confusing: if people and persons are the same thing you should call them the same.<BR><BR>But you can query your database more efficient, with just one query to get all the info you need:<BR><BR>SELECT tblPeople.fldName, tblEvents.* FROM tblPeople, tblEventsPersons, tblEvents WHERE tblPeople.fldID = givenIDfromQueryString AND tblPeople.fldID = tblEventsPersons.fldPersonID AND tblEventsPersons.flsEventsID = tblEvents.fldID

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts