0
I have two tables, according to the following logical design:
Person(CPF, RG, Name, Address, City, State, Birth date)
Client(CPF, Telephone) CPF references Person
There are other specializations of the entity person, but it is not convenient to list all of them.
I would like to know how to do an insertion in this structure. It will be two Inserts or there is something more "correct"?
Maybe the right thing to do is not to do this. I don’t know why people are doing modeling like this. I doubt that the person can give a good explanation to do this.
– Maniero
You say generalization/specialization is a bad thing?
– Matheus Antunes
Usually generalization is for abstract thing, not concrete.
– Maniero
What do you want is for a person to have multiple phones? Perhaps you are misusing the term "specialization". Enter a record in "Person" and follow all records in "Customer".
– anonimo
I used phone as an example, what I need to know is how to insert it. Thank you.
– Matheus Antunes
Enter the person. Then insert the phones, with an INSERT for each person’s phone.
– José Diz