5
I have a table Livros and I know that the specialization/generalization of books are Livros de Ficção, Livros de Drama and Livros de Suspense, for example.
However, in the logical model, I don’t know if I create a table Livros relationship 1:N Tipos de livros with each type registered or if I create a table for each specialization (livro_drama, livro_ficção)!
I know it would be impractical to create a table for each Tipo, because if I needed new types of books I would always have to create a new table. But if I use the other way, each type of book registered would have its specific business rules, even registering each type, I would have to program the associated rules.
Something is bothering me in both solutions! How do I resolve this impasse?
I see it like this: a table for books, and one only containing genres (suspense, drama, science fiction, etc). There an associative table holding the information that a book may have one or more genres.
– Piovezan
@Piovezan This is exactly what I saw at first, but with a closer analysis I saw the following case: what if for example the suspense books need some specific rule in the application, being it a genre? And the new genres that were added to the system, I would constantly have to remodel the system with "possible" rules in the application.
– Temístocles Arêa