How to insert data into a specialized table?

Asked

Viewed 27 times

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.

  • You say generalization/specialization is a bad thing?

  • Usually generalization is for abstract thing, not concrete.

  • 1

    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".

  • I used phone as an example, what I need to know is how to insert it. Thank you.

  • Enter the person. Then insert the phones, with an INSERT for each person’s phone.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.