Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:51:57+00:00 2026-06-03T20:51:57+00:00

I have a IS-A relationship between actor and person. I understand how to write

  • 0

I have a IS-A relationship between actor and person.

I understand how to write an insertion statement for PERSON. But how would I connect that
to ACTOR?

EDIT: To clarify, is there a way to do this besides setting the relationship manually?

CREATE TABLE person
(
  person_id     INT,
  person_name   VARCHAR(20),
  birth_year    CHAR(4),
  gender        CHAR(1),
  PRIMARY KEY(person_id)
);

CREATE TABLE actor
(
  actor_id      INT NOT NULL REFERENCES person(person_id),
  PRIMARY KEY(actor_id)
);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:51:59+00:00Added an answer on June 3, 2026 at 8:51 pm

    That depends how you are determining who is an actor. If you already know this at the time of insertion into the person table, then you can just use another INSERT statement to insert the row into the actor table as well.

    If you already have the person table defined and want to identify particular people and tag them as actors (i.e. by name), you could do something like:

    INSERT INTO actor (actor_id) 
      SELECT person_id    
      FROM person
      WHERE person_name = 'Will Smith';
    

    http://sqlfiddle.com/#!2/ce898/9

    Either way, as long as the actor_id in actor matches a valid person_id in person, the INSERT will be valid. If no corresponding person_id exists, the INSERT will fail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ManyToMany relationship between person that I'm trying to describe with Hibernate
Ok, I have a relationship between People, Users and Employees such that All Employees
I have a HABTM relationship between Publications and Categories. In the new and edit
I have a oneToMany relationship between Post and PostVote. I would like to be
I have a simple has_one/belongs_to relationship between two models. This is a new association
I have a many_to_many relationship between ImageShells and Users. I need to find all
I have a one way @OneToMany relationship between a Team and Player class. I
I have a many-to-many relationship between two tables, let's say Friends and Foods. If
I have a many-to-many relationship between users and groups and I have a table
I have a Hash Map (many-to-one relationship between texts and boolean values): name flag

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.