Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

awfarral's avatar

Single Table for all Lookups or separate tables

I am trying to decide my best approach for code tables (lookups) for my web app

tblLookupCategories
    ID  Category
    1   Title
    2   Nationality
    3   MaritalStatus
    4   Religion


tblLookups
    CategoryID  Value
    1           Mr
    1           Mrs
    4           Buddhist
    4           Christian

OR

A database table ( and therefore model/controller/view) per entity
tblTitles
tblNationality
tblMaritalStatus
tblReligion

I will have some very long categories, what is recommended?

Thanks

0 likes
1 reply
jlrdw's avatar

I will have some very long categories

It depends on what is long. Thousands, then have popup or modal with a search box.

However just 20 to 30, one list may work. But I'd go with separate lookup since it's different types of data.

Please or to participate in this conversation.