Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Dec 22, 2021

SQL constraint "FOREIGN KEY DEFERRABLE"

One strength of relational databases is their constant vigilance over data correctness. The user can declare constraints that their data must obey, and then leave it to the database to enforce the rules. This saves a lot of procedural application code and potential errors.

Automatic constraint enforcement is a powerful feature, and should be leveraged whenever possible. However there are times when it is convenient – and even necessary – to temporarily defer enforcement.


Use Case:

This this how it works today - (excpt the DEFERRABLE INITIALLY IMMEDIATE is implicit):

ALTER TABLE foo
ADD CONSTRAINT foo_bar_fk
FOREIGN KEY (bar_id) REFERENCES bar (id)
DEFERRABLE INITIALLY IMMEDIATE;

In some cases we need to change that behaviour so the constraint is not enforced:

SET CONSTRAINTS foo_bar_fk DEFERRED NO ACTION

This might be helpful when :

1) Loading data where the order of insert / updates does not have the same sequence as constraint enforces.

2) Cyclic references

3) And in our case - and most important: when transforming databases from DDS to SQL

The extra "NO ACTION" will actually never enforces the constraint but rather let you specify how the intention of access of the data so i.e. JPA and other tools knows how relations in the system works, but at the same time legacy applications will not break.


Idea priority High
  • Guest
    Reply
    |
    Feb 24, 2022

    The CEAC has reviewed this requirement and recommends that IBM view this as a MEDIUM priority requirement that should be addressed.

    Background: The COMMON Europe Advisory Council (CEAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CEAC has a crucial role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community and has therefore reviewed your RFE.

    To find out how CEAC help to shape the future of IBM i, see CEAC @ ibm.biz/BdYSYj and the article "The Five Hottest IBM i RFEs Of The Quarter" at ibm.biz/BdYSZT

    Therese Eaton – CEAC Program Manager, IBM

  • Guest
    Reply
    |
    Jan 18, 2022

    The CAAC has reviewed this requirement and recommends that IBM view this as a medium priority requirement that should be addressed. This is important as businesses are trying to convert from DDS to SQL Tables. An alternative is to add the constraints later, though it is not as convenient to wait to add them.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community, and has therefore reviewed your RFE.

    For more information about CAAC, see www.common.org/caac

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Jan 3, 2022

    IBM will use this request as input to planning but no commitment is made or implied. This request will be updated in the future if IBM implements it.