You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we create a new entity, we can define a column to have a UNIQUE constraint and also to have an explicit Index in Postgres. However, if we use oracle, the code will crash. We can either have a UNIQUE constraint on the column or an explicit Index as Oracle and most of the relational databases automatically create an index for columns with UNIQUE constraints. As PDB is supposed to have the same behavior with all DBs, when we have an Index and UNIQUE constraint defined for the same column, we should fail fast or handle this situation by ensuring that when a UNIQUE constraint is created, then one and only one Index is present for that column.
Another problem that may happen with entity creation is when we have a foreign key (FK) referencing another table and the FK column is a STRING without size defined. This will be a problem in SQL Server. A possible solution here may be to check the column size of the referenced column and add the same size to the FK column. This must be done for all DB Engines.
The text was updated successfully, but these errors were encountered:
When we create a new entity, we can define a column to have a UNIQUE constraint and also to have an explicit Index in Postgres. However, if we use oracle, the code will crash. We can either have a UNIQUE constraint on the column or an explicit Index as Oracle and most of the relational databases automatically create an index for columns with UNIQUE constraints. As PDB is supposed to have the same behavior with all DBs, when we have an Index and UNIQUE constraint defined for the same column, we should fail fast or handle this situation by ensuring that when a UNIQUE constraint is created, then one and only one Index is present for that column.
Another problem that may happen with entity creation is when we have a foreign key (FK) referencing another table and the FK column is a STRING without size defined. This will be a problem in SQL Server. A possible solution here may be to check the column size of the referenced column and add the same size to the FK column. This must be done for all DB Engines.
The text was updated successfully, but these errors were encountered: