You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Øystein Grøvlen (JIRA)" <de...@db.apache.org> on 2006/01/03 16:25:03 UTC

[jira] Updated: (DERBY-789) Usability issue: "Constraints have the same set of columns"

     [ http://issues.apache.org/jira/browse/DERBY-789?page=all ]

Øystein Grøvlen updated DERBY-789:
----------------------------------

    Description: 
Legolas Woodland reported on derby-user that derby return errors like :
org.apache.derby.client.am.SqlException:                    Constraints
'SQL060103004635123'  and 'SQL060103004635121'  have the  same  set of
columns, which is not allowed.

He got this when creating a table like this:
create  table  WEBSITES (USERID  integer  not  null unique,  WEBSITEID
bigint  not  null unique,  DOMAINNAME  varchar(255)  not null  unique,
DESCRIPTION  varchar(255),  PPVIEW   double,  PPCLICK  double,  PPWEEK
double, totalClick bigint,  totalView bigint, active smallint, primary
key (WEBSITEID));

Omitting the unique specifier made things work. 

I think this is a usability issue.   At least, one should not present names to the user, that has been generated internally.  Instead, it would be helpful if the names of the columns involved was mentioned. I see two ways to solve this:

1. Return error that says that  duplicate contraints on the following columns are not allowed.
2. Allow this and use same index for both constraints.  (I guess dropping constraints will be more complicated in this case since one will have to check if other constraints are using the same index.)

  was:
Legolas Woodland reported on derby-user that derby return errors like :
org.apache.derby.client.am.SqlException:                    Constraints
'SQL060103004635123'  and 'SQL060103004635121'  have the  same  set of
columns, which is not allowed.

He got this when creating a table like this:
create  table  WEBSITES (USERID  integer  not  null unique,  WEBSITEID
bigint  not  null unique,  DOMAINNAME  varchar(255)  not null  unique,
DESCRIPTION  varchar(255),  PPVIEW   double,  PPCLICK  double,  PPWEEK
double, totalClick bigint,  totalView bigint, active smallint, primary
key (WEBSITEID));

Omitting the unique specifier made things work. 

I think this is a usability issue.   At least, one should not present boject names to the user, that has been generated internally.  Instead, it would be helpful if the names of the columns involved was mentioned. I see two ways to solve this:

1. Return error that says that  duplicate contraints on the following columns are not allowed.
2. Allow this and use same index for both constraints.  (I guess dropping constraints will be more complicated in this case since one will have to check if other constraints are using the same index.)


> Usability issue: "Constraints have the  same  set of columns"
> -------------------------------------------------------------
>
>          Key: DERBY-789
>          URL: http://issues.apache.org/jira/browse/DERBY-789
>      Project: Derby
>         Type: Improvement
>   Components: SQL
>     Reporter: Øystein Grøvlen
>     Priority: Minor

>
> Legolas Woodland reported on derby-user that derby return errors like :
> org.apache.derby.client.am.SqlException:                    Constraints
> 'SQL060103004635123'  and 'SQL060103004635121'  have the  same  set of
> columns, which is not allowed.
> He got this when creating a table like this:
> create  table  WEBSITES (USERID  integer  not  null unique,  WEBSITEID
> bigint  not  null unique,  DOMAINNAME  varchar(255)  not null  unique,
> DESCRIPTION  varchar(255),  PPVIEW   double,  PPCLICK  double,  PPWEEK
> double, totalClick bigint,  totalView bigint, active smallint, primary
> key (WEBSITEID));
> Omitting the unique specifier made things work. 
> I think this is a usability issue.   At least, one should not present names to the user, that has been generated internally.  Instead, it would be helpful if the names of the columns involved was mentioned. I see two ways to solve this:
> 1. Return error that says that  duplicate contraints on the following columns are not allowed.
> 2. Allow this and use same index for both constraints.  (I guess dropping constraints will be more complicated in this case since one will have to check if other constraints are using the same index.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira