Logical M:N Relation with Delete Rule:"NO ACTION" creates "CASCADE" FK

I think I've detected a bug in the generation of FK when we have"N: N" relations, give me idea that the delete rule that is defined in the relationship of logical model is ignored.
So I give you a small example to reproduce it:
I've a simple example of 2 entities:
Logical Model:
Entity_A(#id_a, desc)
Entity_B(#id_b, desc)
M:N Relation between Entity_A and Entity_B (REL_A_B) with Delete Rule: "NO ACTION".
When apply "Engineer to Relational Model" I've as result 3 tables:
Relational Model:
Entity_A(#id_a, desc)
Entity_B(#id_b, desc)
REL_A_B(#id_a, #id_b) but the generated foreign keys are defined using Delete rule "CASCADE".
Is not supposed to have been generated with delete rule "NOT ACTION"?
As result the generation of DDL scripts is creating FKs with the clause " ON DELETE CASCADE", which was not originally intended.
I try to change this value in logical model but I've seen not effect on result.
I hope I have helped!

Hi Ariel,
thanks for reporting the problem. I assume it's for Data Modeler 3.3.
I logged a bug for that.
Philip

Similar Messages

  • Delete rule from logical to relational model

    hello!
    I use data modeler Version 3.1.0.700 and I have some problems with delete rule.
    I have set delete rule in logical model on every relation (NO ACTION) but when i engineer it to relational there is everything randomized.
    How do i change this to be as it is in logical model?
    Thank you for your answer in advance!
    Grega

    as I explained in previous post "delete rule"in logical model is used in only one case:
    the setting in logical model is used only when relationship will be transformed into optional foreign key with non mandatory FK columns.Settings in compare/copy options" tab are used to exclude some properties from compare and engineer process.
    Philip

  • Identifying relations to simulate M:N relation with attributes

    Hi,
    I'm always using 3.1.4
    In this version, M:N relations don't support attributes. In 3.3 it is supported. But sometimes, it's necessary in a logical model to have an entity which represent the relation. So I can add another relation between this "associative entity" and another entity. Like in Oracle Designer, if i want to create a M:N relation with attributes, I have to create an entity with two identifying relations
    So I created :
    Student, Registration and Stage entities
    Identifying relation between Student and Registration
    Identifying relation between Stage and Registration
    Registration with several attributes. So Registration is an "associative entity".
    But when I do this in DM :
    In Registration entity, there are two unique identifiers
    the first one (which is PUID) is correct, it references the two relations
    The second is incorrect. It should not to exist.
    is it right ?

    3° create entity Registration, with one column : dateRegistration (NOT primary UID)I assume there is a UID created (not set as PK) and it's over dateRegistration attribute
    2° create entity Stage, with 2 columns : Numero (primary UID), code, descriptionyou write 2 columns, but 3 are listed, the number is not important just to confirm that Primary UID is created on Numero attribute.
    So entity Registration has one UID before identifying relationships are created. You need to check setting in "Preferences>Data Modeler>Model>Logical>Use and set first unique key as primary key"
    One Primary UID only exists in Registration in case it's checked, and there is one Primary UID (over both relationships) and one UID over dateRegistration attribute in case it's not checked.
    Philip

  • Delete Rules between Logical Model and Relational Model are different

    Relation Properties in Logical model has three Delete Rules: "RESTRICT", "NO_ACTION", "SET NULL".
    1. "RESTRICT" and "NO_ACTION" are same
    2. "CASCADE" is missing.
    However, Foreign Key Properties in Physical model has three Delete Rules: "RESTRICT", "NO_ACTION", "CASCADE".
    1. "RESTRICT" and "NO_ACTION" are same
    2. "SET NULL" is missing in this case.
    They are supposed to have "NO_ACTION or RESTRICT", "SET NULL", and "CASCADE".
    Please fix this ASAP. It is really annoying in Engineering process. Modeler creates duplicate wrong relationships while it engineers.
    Thanks.
    Edited by: hayangae on Oct 9, 2012 1:01 PM
    Edited by: hayangae on Apr 3, 2013 4:08 PM

    Hi,
    it seems you are not using the latest version 3.3. In earlier versions - delete rule set on relationship was used only in some cases to set delete rule on related foreign key. Now delete rule is transferred to FK as it's defined on relationship.
    I assume you are using Oracle database - "Restrict" doesn't appear anymore for Oracle.
    2. "SET NULL" is missing in this case.Most likely the foreign key is set as mandatory thus you cannot use "set null" as option.
    Modeler creates duplicate wrong relationships while it engineers.Can you elaborate on that - example?
    Philip

  • How to set Delete Rule to SET NULL while designing relational model .

    Dear All,
    Am new to SQL Developer Data Modeler and was doing some relational and logical design using Data modeler and i want to generate DDL script, while doing i was struck up with this issue.
    I have two table and tried to give Primary key and Foreign key relationship, in foreign key table i want to set the Delete rule has SET NULL, but it is not found. I have other three options like CASCADE, RESTRICT,NO ACTION. Whereas in logical design i can find SET NULL, NO ACTION and RESTRICT....
    But the DDL script is getting generated based on Relational design , i want to set foreign key has SET NULL in delete rule how to accomplish that?
    Please help me......
    Thanks in Advance
    Ramkumar.S

    Hi Ramkumar,
    If you unset the Mandatory property on the Foreign Key, you should then be able to set the Delete Rule to SET NULL.
    David

  • My Notes are missing since upgrading to iOS 6. I don´t delete anything.  Can it have relation with iCloud?

    My Notes are missing since upgrading to iOS 6. I don´t delete anything.  Can it have relation with iCloud?

    This worked for me, when asked to purchase program you don't need to, got copies of all missing notes. Hope it helps
    http://www.askdavetaylor.com/any_way_recover_iphone_notes_windows_pc.html

  • Delete rule not being generated in DDL

    Hi,
    I've only recently started using SQL Developer Data Modeler (coming from the Designer world), and it's been a good learning experience. There's a piece that I can't seem to figure out though, and it's related to the generation of DDL for foreign keys. In all my models (logical, relational, physical, I have the Delete Rule set to "Restrict". This isn't just the default preference I'm talking about, when I actually drill down to the properties of the FK, it says that the delete rule is restrict. However, when I generate the DDL, no delete rule is generated. The only option generated is NOT DEFERRABLE.
    There are two issues with this:
    1) The rule isn't going into the DB unless I manually alter the DDL, and
    2) Every time I re-import the DB to generate ALTER statements, the comparison detects that the rule in the DB (NO ACTION) is different than the rule in the model (RESTRICT), so it deletes and re-generates the FK. However, it re-generates it still not having the delete rule set, so it doesn't fix the problem.
    Is this a known bug, or is there some way of telling the program to generate the delete rule in DDL that I'm missing? I should add I'm using version 3.1.1.703.
    Thanks in advance for your help.
    Mike
    Edited by: user10832262 on Apr 12, 2012 9:53 AM

    I did some more research and I think I was completely misunderstanding Oracle's implementation of delete rules. Now I believe that Oracle implements the "RESTRICT" option in SQL Developer Data Modeler as "No Action", which is the default option, hence why no DDL option is generated. However, it would still be nice if Data Modeler could detect this fact when comparing two models. What I mean it, if comparing an Oracle DB to a model, treat Restrict and No Action as the same, and thus don't attempt to re-generate the DDL for this "difference". For now, I'll just change the action on my models to No Action, and this should resolve the issue.

  • How do you handle update and delete rules for fact tables?

    I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
    to the date dimension.
    What is the proper way to set up FK relationships in fact tables with SSMS when  you have composite keys as most fact tables do?

    Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
    records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
    modeling enough such that they would know that they had to blow away the fact record first.
    My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
    of them cascade delete SSMS has an issue with it.
    The error I get is:
    Unable to create relationship '[relationship name]'
    Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
    I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
    Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
    Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records?

  • Program with Mail Rule script

    I am trying to develop a Mail run script and I am running into problems. The Rule is being trigger because I have a change my color rule action and a script action. The color changes but the script does not appear to trigger at all. His is the script.
    using terms from application "Mail"
    on perform mail action with messages theMessages
    tell application "Finder" to set pathToAttachments to (path to desktop folder as string)
    tell application "Mail"
    repeat with theMessage in theMessages
    set theText to content of theMessage
    if theMessage's mail attachments is not {} then
    repeat with theAttachment in theMessage's mail attachments
    set theFileName to pathToAttachments & theAttachment's name
    try
    save theAttachment in theFileName
    on error errnum
    end try
    tell application "Preview" to open file theFileName
    tell application "Finder" to delete file theFileName
    end repeat
    end if
    end repeat
    end tell
    end perform mail action with messages
    end using terms from
    tell application "Mail"
    set myMessages to selection
    tell me to perform mail action with messages myMessages
    end tell
    Notice the tell block at the end. If I uncomment that, select a mail message and execute that in a script editor, all is fine.
    With that block commented out and try to execute it using the *Apply Rules* nothing seems to happens. Even if I put a Beep statement inside the "on perform mail action with messages theMessages" block, That does not even sound off.
    Anyone see why this would execute as a rule?

    Camelot wrote:
    The logic of whether to invoke the rule is not within the script.
    You tell Mail.app to run the script when certain conditions are met (e.g. sender address, recipient address, or one of several other conditions). Once Mail.app has decided the messages matches the conditions it calls your script.
    I realize that is the theory behind mail.app, but it has been my experience with Rule settings that they do NOT run "automagically" when conditions in them are met.
    This is clearly illustrated by a number of cases I have where by simply "adding a rule," any rule, that says anything, and then clicking the resulting "apply" button (which only is available when you add or subtract a rule), all the existing rule(s) are processed and mail is sorted according to those rules which had previously been sitting in the inbox. (In my case they are a bunch of "junk" filters).
    There is either some bug in mail's triggering mechanism, or some inherently "different" mechanism in use when "auto triggered" vs when "applied." In either case, there is no documentation about it.

  • Error with Statement Rule: Reference is ambiguous

    Hello,
    Hopefully someone will be able to help me out with this inquiry. I have a configurator model where the BOM has been imported. Within this model, there are two BOM nodes of the same name (Item Number) but they are unique in the model by their effective dates. Basically, I have the following:
    Model
    __Feature1
    ____Option1 Eff_In: 1/1/2009 Eff_Out: 9/20/2011
    ____Option1 Eff_In: 12/21/2011 Eff_Out: 9/21/2090
    If I create say a CONTRIBUTE statement rule referencing node 'Option1', I get an error that reads "The reference Option1 is ambiguous". I understand that I am getting this error because Configurator cannot determine which instance of this Option1 I am referring to. Can anyone tell me how I can specify the specific node required? I would have expected that Configurator would always look at the structure effective dates, but it would appear not. I have looked at using full path or properties as part of my node reference, but the effective dates don't appear to be a standard system property that can be referenced (unless I missed something).
    Any help would be appreciated.
    Thanks,
    Paul Wentink

    From: Veerendra Singavarapu <veerendra.singavarapu@...>
    Sent: Sun Aug 15, 2010 12:50 am
    To: [email protected]
    RE: [configsig] ambiguity error
    Hi Lauree,
    As Carole rightly pointed out, this issue has been recently fixed in 11.5.10 branch. This happens only when the ECO change brings one or more item’s attribute changes. i.e. for instance an OC undergone an ECO change, with {min=0 and max=null} prior to ECO change and {min=0 and max=1} after ECO change can cause this issue.
    With regards,
    Veerendra S.
    ==========
    From: Lauree Swihart [mailto:lswihart@...]
    Sent: Friday, August 13, 2010 10:52 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Thanks a bunch Carole!
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Landgrebe, Carole
    Sent: Friday, August 13, 2010 1:21 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Hi Lauree-
    This is a known issue, and I had them create a fix for it in 11.5.10 when we were on 25-43A. Now the issue exists in 12 and I haven’t yet logged the TAR for that. We have exactly the same issue as we force all bom changes through ECOs, and even putting effectivity dates on the rules that match the effectivity dates of the BOM does not resolve the issue. Fix was produced off of TAR 7619362.994, looks like bug number was 8737252….not sure what release it was part of, we applied it as a manual fix, a jar file and an update to package body for cz_model_util_pvt.
    Holler if you need more info.
    Thanks!
    Carole
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Reinsch, Ted A (GE Energy)
    Sent: Friday, August 13, 2010 1:09 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Have you refreshed the model since this change?
    The only time I have received this error was if I was using the same component in more than 1 option class or option feature and it tells me that I need to further define the path to the object in the rule such as
    'ATO Model Name'.'Option Class 1'.'8003-518.8003-519.8003-502.029-4572-03' or
    'ATO Model Name'.'Option Class 2'.'8003-518.8003-519.8003-502.029-4572-03'
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Lauree Swihart
    Sent: Friday, August 13, 2010 10:45 AM
    To: [email protected]
    Subject: [configsig] ambiguity error
    I have a component that is currently in a logic rule. When this component is in a logic rule it works.
    This same component was changed out on an ECO, causing 2 records in the BOM. One with an end effective date and another with a begin effective date. When I convert my rule to a statement rule, I receive this error. I’ve received this error in the past and normally I thought I’d just changed the effectivity range associated with the rule and that resolved the issue. But, it’s not resolving the issue today.
    Is there any other way for me to resolve this without deleting the component in the bom that has been effectively end dated? I don’t want that route because that defeats the purpose of using an ECO and general foundation of why we use ECO’s for our healthcare products.
    The reference 8003-518.8003-519.8003-502.029-4572-03 is ambiguous.
    Thanks,
    Lauree Swihart

  • Engineer between Logical Model and Relational Model

    I am trying to update changes from one model to the other but there are dublicate entries generated instead of updates.
    The Logical Model was imported from Oracle Designer, the Relational Model was imported from data dictionary.
    Our rule is, that the name of Entities/Tables and Attribute/Columns are identical.
    So I changed the Naming Standard of the Logical Model in Preferences
    from Separator = Space to Separator = Character with char = Underline.
    If the entity is not existing, it is created with the correct name.
    If the entity exists, a new entity is created with Namev1.
    The same happens when I try to update changes in the other direction.
    How can I achieve that the existing entity (or table) is updated and not a new one is created?
    Or in other words, is there a way to link entities to corresponding tables?
    Walter

    Hi Walter,
    The Logical Model was imported from Oracle Designer, the Relational Model was imported from data dictionaryit's good to import entities and related tables from Designer repository together. Data Modeler will import the link between them and use that link in synchronization between logical and relational model. After that you can import details for physical model from database.
    If you don't have tables in Designer repository and keep the same names for entities, attributes, tables and columns then you can engineer logical model to relational and import details from database.
    Philip

  • List Tile View not working with include rule on iOS?

    hi Expert,
    I used the List Tile View with include rule in Agentry 6.0 on WinCE before to generate "selected" object list upon different conditions, e.g., assigning tasks based on scenarios.
    Currently, I am experimenting the same function on iOS tablet.
    On the start screen which is a detailed screen for main object, there is a List Tile View and an include rule. However, the objects in the tile list are not updated correctly when the output of the rule changes. Note that the same include rule works perfectly with a List View for the same collection.
    To my observation, the problem seems to associated with "update" of the tiles when result of include rule changes. For example, in scenario 1, there are 5 objects in the list; switching to scenario 2, there are 10 objects. From the No.6 to No.10, the objects are correct. The No.1 to No.5 are still the original 5 objects for scenario 1.
    When the user clicks on tiles, it makes the situation worse. Normally, a single object's tile will always be shown in the selected tile regardless which tile is selected from the list.
    My development environment is 6.0.40 and the client is 6.0.40 on iPad (iOS 7.1). I would like to know whether this is a known issue before I provide more details.
    Thanks.
    -Yang

    hi experts,
    When I asked the question on this list tile view refreshing issue, my dev environment is Agentry 6.0.38.
    In Agentry 6.0.40.1's release note, there is a fixed
    AG-25821  iOS 7 refresh issue with iPad tile list
    However, I currently have Agentry 6.0.42.1 on iPad (iOS 7.1.2). And my editor/server is 6.0.42.0. I still have the list tile view refreshing issue. The same rule can be used on list without any problem. But the list tile still has trouble on display the right set of objects.
    My question is is that fix related to the problem I saw?
    Thx.
    -Yang

  • Something interesting with check rule for VAT registration no.

    Hi Guys,
    I found something weird in sap with check rule for VAT registration no.
    If I set any of check rules for US and save(tcode oy17), then change the country of a customer from DE to US and save(not change the VAT registration no), the system post error messages "ISO code DE is not correct in the VAT registration number". But if I set rule for AU(australia) with same rule as US, and change the customer's country from DE to AU(not change the VAT no), no error happens and customer can be saved successfully. So anybody can give any explanation on this problem?
    Thanks in advance, point will be rewared. Waiting for the comments.
    Regards,
    Alex

    <TABLE align=center border=0 cellPadding=1 cellSpacing=1 width="95%"><tr><td width="15px"><input type="image" src="wwv_flow_file_mgr.get_file?p_security_group_id=1046425373323359&p_fname=add2d1.jpg" name="add_QTB_5174" id="add_QTB_5174" onclick="javascript:addRowToTable('QTB_5174',4,22.5);return false;"/></td><td width="15px"><input type="image" src="wwv_flow_file_mgr.get_file?p_security_group_id=1046425373323359&p_fname=delete2d.gif" alt="delete" name="delete_QTB_5174" id="delete_QTB_5174" onclick="javascript:removeRowFromTable('QTB_5174');return false;"/></td><td><input type="image" src="wwv_flow_file_mgr.get_file?p_security_group_id=1046425373323359&p_fname=edit2d.jpg" alt="edit" name="edit_QTB_5174" id="edit_QTB_5174" onclick="javascript:updateTableRow('QTB_5174',22.5);return false;"/></td></tr></table>
    <input type="hidden" value="QTB_5174" id="5174"><TABLE align=center border=0 cellPadding=1 cellSpacing=1 width="95%" id="QTB_5174" name="QTB_5174">
    this a sample code. I have marked the name attrib in bold.

  • Master-Child relations with ODP??

    I don't understand why I am having problems trying to build a simple master-child table relation with cascade delete using ODP .NET. With microsoft's providers, in the FILL command, you can specify the relationship in the fill command - Fill(dataset_name,relation_name). But in ODP .NET, it doesn't accept the relation_name as the second parameter, just the datatable. Why is that? are there any good examples out there that show working with Master-Child relations populated with Fill()? Any help would be greatly appreciated.

    bump

  • Delete rule not generated in DDL

    Hello,
    I am using SQL Developer Data Modeler (Version 3.1.1.703) and experience the following issue:
    I have a table with a foreign key and a delete rule "SET NULL". However if I generate the DDL for "SQL Server 2005" then the rule is not there. Only if I change the rule to "CASCADE" then it is generated properly. Is that a bug or am I missing something?
    Thanks in advance for your help,
    Michael

    Hi Philip,
    when can we expect a fix for that since it is kind of an important function for us because without it we can't export a valid database structure.
    Thanks in advance,
    Michael

Maybe you are looking for