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 |
|
neutcomp
Posting Yak Master
111 Posts |
Posted - 2004-02-04 : 04:00:05
|
Hello Everyone! Just a simple question does it mather if you have this OPTION 1:userID key_01 key_02 key_03 key_04 key_05 key_06 ... key_451 3 30 11 3 1 2 76 10 ... 542 3 . 11 . 14 . . 12 ... 33 . . 5 . . . 7 . ... . The . = empty not filled in by the user!or OPTION 2:userId keys1 31 301 111 31 11 21 761 10..1 542 32 32 112 142 122 33 53 7 If you want to search for users with almost the same input. What is the easyest way? Option 1 or 2? And second question what is faster can sql bether search for column or rows?ThanxxBjorn  |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2004-02-04 : 07:34:16
|
| Option 2 definitely. It normalized, and you can have unlimited keys. When you add more keys later in Option 1, you will have to change your INSERT statements. Also, writing a query to find (for example) all keys not filled in by the user is trivial is option 2, but would require 45 WHERE clauses in the first.OS |
 |
|
|
neutcomp
Posting Yak Master
111 Posts |
Posted - 2004-02-04 : 07:46:08
|
quote: Originally posted by mohdowais Option 2 definitely. It normalized, and you can have unlimited keys. When you add more keys later in Option 1, you will have to change your INSERT statements. Also, writing a query to find (for example) all keys not filled in by the user is trivial is option 2, but would require 45 WHERE clauses in the first.OS
Oke thanxx So I know now what structure I have to use OPTION 2.Thanxx againBjorn |
 |
|
|
|
|
|