One Resource Table
Using one resource table method is similar to many lookup tables. The difference is this one resource table actually combines all lookup tables by adding just one more field. Of course, this one resource table will be much larger because it combines all lookup tables.
Using back the same lookup tables at previous blog, let’s create one resource table to replace all lookup tables.
Type | Code | Desc |
State | JH | Johor |
State | KH | Kedah |
State | KT | Kelantan |
State | MK | Melaka |
State | NS | Negeri Sembilan |
State | PH | Pahang |
State | PG | Pulau Pinang |
State | PK | Perak |
State | PS | Perlis |
State | SB | Sabah |
State | SW | Sarawak |
State | SL | Selangor |
State | TG | Terengganu |
State | KL | W.P. Kuala Lumpur |
State | LB | W.P. Labuan |
State | PJ | W.P. Putrajaya |
Country | CN | China |
Country | HK | Hong Kong |
Country | IN | India |
Country | MY | Malaysia |
Country | SG | Singapore |
That’s it. Use both type and code field to make the primary/unique key.
2 replies on “One Resource Table”
[…] Finding « Best Resources for Web Usability One Resource Table […]
Hi, I realize that someone has commented on having this one table. So sorry, I have accidentally deleted your comment. I thought of just deleting all the spam comment only.