Should I create new table for every consistent data set or one systemCodes table?

asp.net-mvc entity-framework entity-framework-6 sql-server

Question

When using Microsoft Entity Framework 6, should I construct a separate table for each consistent data collection or just one system-codes table?

The "consistent data set" includes things like:


    +Agent (Table)
    -Id
    -Name
    -Status (consistent data = available | busy | unavailable)
    -Type   (consistent data = reception | delivery | driver)
    -Gender (consistent data = male | female)
    -AddressId

    +Address (Table)
    -Id
    -Description
    -Longitude
    -Latitude
    -City (consistent data = [ .... any city .... ])
    -State (consistent data = [ .... any state.... ])

Should I create separate tables for Status, Type, Gender, etc. and use foreign keys and navigational attributes to connect them to the "Agent" table? OR create a single table like this:

+SystemCodeTable
-CodeId
-CodeParentId
-NameAr
-NameEn
-Description

I place all of my reliable data there before giving the "Status," "Type," "Gender,"...etc. columns the CodeId?

Many thanks

1
0
9/25/2018 10:03:17 AM

Popular Answer

ZZZ_tmp
1
9/25/2018 10:28:23 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow