To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=99957
                 Issue #|99957
                 Summary|combined primary key containing fields for which Entry
                        | required=no (HSQLDB)
               Component|Database access
                 Version|OOo 3.0.1
                Platform|Other
                     URL|
              OS/Version|Windows 2000
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|none
             Assigned to|dbaneedsconfirm
             Reported by|wimbaetens





------- Additional comments from [email protected] Fri Mar  6 10:19:00 
+0000 2009 -------
Shouldn't it be possible to make a combined primary key where (at least) one of
the fields has 'Entry required=no'? The database type is HSQLDB.

For example:
MessageName (text, VARCHAR 6, entry required=yes)
DataItem (text, VARCHAR 100, entry required=yes)
ConditionOrRule(text, VARCHAR 6, entry required=no)

Imagine the following three records:
MessageName;DataItem;ConditionOrRule;SomeOtherFields
"IE301";"---HEADER.DateAndTime";"C512";...
"IE301";"---HEADER.DateAndTime";"R099";...
"IE301";"---HEADER.DateAndTime";"";...

The last record would mean 'no applicable condition or rule'. I know this is not
a very good default, but this is legacy data, copy-pasted from another database
with a quite messy but usable table design.

When applying this to an existing table and saving the table design, I get an
error: by marking a field as primary key, the field(s) is(/are) made
non-nullable. While that makes sense for a single field acting as primary key,
I'm not sure whether that should be the case when using multiple fields together
as a combined primary key. After all, shouldn't the combination of fields be
unique, rather than the separate fields. In the above example, the third record
(with ConditionOrRule being null) is unique primary key as long as there is no
fourth record introduced with the same field combination.

Thanks in advance for the help!

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to