Subject: data from multiple tables
Posted By: keyvanjan Post Date: 1/24/2006 4:55:51 AM
Hi,
I have a general question.
Is it a good practice to get the data from multiple tables like the following.Does it affect the performance?IF yes what way should I use to get data from multiple tables:
what sql query for ex?

Rs.open "SELECT * FROM layout",Conn,3,3
Rs2.open "SELECT * FROM config",Conn,3,3
Rs3.open "SELECT * FROM cards where cards.cardid=" & intCardID &"  and cards.active=1",Conn,3,3
Rs4.open "SELECT * FROM bg where active=1",Conn,3,3
Rs5.open "SELECT * FROM music where active=1",Conn,3,3
Rs6.open "SELECT * FROM effects where active=1",Conn,3,3
Rs7.open "SELECT * FROM poems where active=1",Conn,3,3


Reply By: mat41 Reply Date: 1/24/2006 5:32:07 PM
Yes and no.  

Yes - If the data base you are using is not relational
No - If the database you are using is relational

;;;Does it affect the performance?
The more you ask the server to do the more resources you will use.  If you MUST do it this way you could put your recordsets into arrays, Set them to nothing and close your connection in the head of the page - this will help performance.

;;;IF yes what way should I use to get data from multiple tables
Research the following and it will become clear how to build a datastore that allows you to write smart queries:
- Whats a relatioanl datastore
- Normalize tables
- Use primary and foreign keys

Then look at:
- SQL Joins

After looking at these subjects it will become clear

Wind is your friend
Matt

Go to topic 39090

Return to index page 386
Return to index page 385
Return to index page 384
Return to index page 383
Return to index page 382
Return to index page 381
Return to index page 380
Return to index page 379
Return to index page 378
Return to index page 377