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 7497375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:04:32+00:00 2026-05-29T19:04:32+00:00

quick question. In my user database I have 5 separate tables all containing different

  • 0

quick question.

In my user database I have 5 separate tables all containing different information. 4 tables are connected by foreign key to the primary key of the first table.

I am wanting to trigger row inserts on the other 4 tables when I do an insert on the first (primary). I thought that with ON UPDATE CASCADE would do this for me but after trying it I realised it did not…I know clue is in the name ON UPDATE!!!!!

I also tried and failed at multiple triggers on the same table but found this was not possible either.

What I am planning on doing is putting a trigger on the first to INSERT on the second and then putting a trigger on the second to insert on the third……etc

Would just like to know if this is a wise thing to do or not or if I am missing a better and simpler way of doing this.

Any help/advice much appreciated.

  • 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-05-29T19:04:33+00:00Added an answer on May 29, 2026 at 7:04 pm

    Based on the given information, it “feels” as if there might be a flaw in the database design if each of the child tables requires a row for every single row in the parent table. There is a reason that “ON INSERT CASCADE” does not exist; it is typically not considered meaningful.

    The first thought that comes to mind is that the child tables should actually be part of the parent table; it sounds as if there is a one-to-one relationship. It still may make sense to have separate tables from an organizational standpoint (and size of records), but it is something to think about.

    If there is not a one-to-one relationship, then the ability to add meaningful data beyond default values to the child tables would imply there might be a bit more normalization of data required. If the only values to be added are NULLs, then one could maybe argue that there is no real point in having the record because a LEFT JOIN could produce the same results without that record.

    Having said all that, if it is required, I would think that it would be better to have a single trigger on the parent table add all the records to the child tables rather than chain them in several triggers. That way the logic would be contained in a single location.

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

Sidebar

Related Questions

Just a quick question: There's the entity (for example User) who is connected with
I have a quick question about active resource. If I have a User resource,
Quick question. If I wanted to say, have a login button if user isn't
Quick question. If I wanted to say, have a login button if user isn't
I have a very quick question about how to utilise Zend_Db_Table with user specific
Quick question about database design. If I have two databases: User_DB and Group_DB, and
Quick question regarding database design; Given I'm storing User data in a database, I
quick question: I have a JTextField for user input, in my focus listener, when
Hey all, kind of new at Kohana and I have a quick question. I
Quick question. What do you think, I have a few sites that use a

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.