I hypothetically have a
publicação table that has, by default, the
autores attributes (derived from a relationship table),
ano . However, depending on the type of publication (such as
artigo em periódico ,
artigo em jornal and others) there would be a need to collect additional data.
For example, if
publicação is of type
livro there would be a need to store
quantidade de páginas and
volume . However, a
publicação can be generic and does not have a type.
My question is: what is the best way to handle this situation?
I thought of two possible ways:
- Create a
publicaçãotable with the default attributes.
- Add in
- Create a table for each possible type of publication with its particular attributes
- Relate these new tables to
publicaçãoand form a compound key
- Create a
publicaçãotable and add all possible attributes of the types and make the treatment in the server-side application. (this does not seem like a good solution)
I have little experience in database. I believe there are other solutions. I would like to know which ones?