Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Primary Key columns converted to nullable columns in DDL script.

EAmezMay 9 2017

Hi all,

I hope anyone can explain me this. I've imported a table from my database into a model. In DB it has 2 columns defined as Not Null. They can be used as PK but physically are not defined as PK, so in my model I create a PK with these columns. When generating DDL, I can see a sentence that tries to change this columns to admit Null values. I don't understand this behaviour, maybe I'm missing something.

This is my table. It has 2 columns that are Primary Key and also Foreign Key to another table.

pastedImage_0.png

And here you can find the column details. I only put the first column, as the second one is defined the same, with the "Mandatory" filed checked and disabled ("Obligatorio" in spanish)

pastedImage_1.png

This is what appears when clicking the arrow button to synchronize Data Dictionary. It finds a difference in these columns, because in relational model they seem to be nullable, althought "Mandatory" check was activated.

pastedImage_3.png

This ends up with this DDL script:

ALTER TABLE plazosfamilia MODIFY (

codprodu NULL

);

ALTER TABLE plazosfamilia MODIFY (

codfamilia NULL

);

Am I misunderstanding the meaning of "Mandatory" check? Is there any other way to define these columns as Not Null? I've seen that if I edit columns individually I can set a name to Not Null Constraint, is this the way to set a NN column?

Also, I supposed red asterisk in relational model meant that the column is not nullable, is this right? If so, and with these columns being the PK I'm a bit confused.

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 6 2017
Added on May 9 2017
0 comments
342 views