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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:41:11+00:00 2026-05-19T12:41:11+00:00

Sorry for weird title, don’t know how to name the Q better. So: I

  • 0

Sorry for weird title, don’t know how to name the Q better. So:

I have 3 tables. EntityA, EntityB, AB. The classical many-to-many implementation.

Is there any possibility to create constraint that mandates ALWAYS to have at least one relation between A and B.

Example workflow:

a) Insert A, Insert B, insert relation, commit; SUCCESS
b) Insert A, Insert B, commit; FALSE

So the question is: is there any on commit trigger? Or something similar to.

  • 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-19T12:41:11+00:00Added an answer on May 19, 2026 at 12:41 pm

    There is no such thing as an ON COMMIT trigger. However, you can generally simulate the behavior of an ON COMMIT trigger using materialized views. In your case, you could

    • create materialized view logs on the three tables
    • create a fast-refreshable materialized view that joins the three tables
    • create a constraint on the materialized view that raises an exception if there are any rows that fail the validation

    When you commit, the materialized view refresh takes place. If a constraint on the materialized view fails, the commit fails.

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

Sidebar

Related Questions

Sorry about the weird question title, but I don't really know what to call
Sorry for the weird title, but well, that's exactly what I need. I know
Sorry for the weird title, I could't think of anything better! Anyways, I'm half
Sorry about the weird title... all will be explained. Basically I have an array/dictionary
Sorry, I know this question is easy, but I don't know how to get
Sorry for the bad title - I simply do not know what to call
Sorry about the weird title, I'm currently playing around with WinForms and I'm wondering
Sorry if my question sounds weird lol I'll try to explain. I have 4
Sorry about the wierd title, feel free to come up with a better one
Sorry, weird title. Anyway, I add a div and some text to a Control

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.