Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-02-08 : 20:59:40
|
In my main table I have only codes (example civility code, city code, product code....up to 10 or 20 codes). So the real text associated to the code itself is in a seperate Catalogue Data tables called City_Codes, Product_Codes .... for example.In my form I need to display the text associated to the code (example the code =10 stored in my main table and the text from the City_Codes table is city='Toronto' in Catalogue data table). Those Catalogue Data tables are all different, but the main table includes all the catalogue codes. I think that s called foreign key thing.My question is related to performance and good coding practice. is it better to use many datasets including the text from the Code_Tables ex dataset1 for product catalogue, dataset2 for City catalogue dataset3 for Civility catalogue or should I use INNER JOIN many times in the same request (up to 10 INNER JOINS) or do u recommend other technique.Thanks. |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-02-08 : 21:16:57
|
It is better to join to the tables with the text.If you find it inconvenient to code the JOINs for many different requests, you can create a VIEW with the JOINs in it and then use it like a table that contains the text.CODO ERGO SUM |
|
|
jhermiz
3564 Posts |
Posted - 2006-02-08 : 21:31:15
|
"...I think its called a foreign key..."Better snatch a book if you don't know what a foreign key is. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-02-12 : 01:44:33
|
thanks a lot guys, muchas gracias , i really appreciate |
|
|
|
|
|