I'm designing a property management database that will hold - OWNER, CUSTOMER, and STAFF information.
As these use many of the same attributes, I intend to create tables for PERSON, ADDRESS and CONTACT.
The primary key for PERSON (
personID) will be auto-incremented and used as the foreign key for ADDRESS, CONTACT, OWNER, CUSTOMER, and STAFF.
When it comes to adding a new record, is there a way to INSERT into PERSON, ADDRESS, CONTACT, and OWNER/CUSTOMER/STAFF at the same time using a simple statement? Or is there another way to retrieve the generated
personID and use it to insert into the other tables?
I'm testing on Oracle SQL Live 19c.