I have a
User with one or more saved
Documents, but each
Document has specific attributes in Brasil for example we have:
RG(General Register) have the following attributes:
CPF(Like a Social Security Number) have the following attributes:
- A number
CNPJ(Like a National Registry of Legal Entities) have the following attributes:
A Name (of a company)
CNH(Driver's License) have the following attributes:
A Name (Of a person)
Then I designed the following model:
FK Document Type will control what attributes of table will be null, for example if
FK Document Type appoint to
Valid Date attribute will not be used.
That's the correclty way to design a system with more than one type of document? I think that is not good make one table to each document type.