Integrity constraint violation: no parent SYS_FK_xxx

Discuss the database features
Post Reply
AngleWyrm
Posts: 1
Joined: Tue Sep 05, 2017 2:45 pm

Integrity constraint violation: no parent SYS_FK_xxx

Post by AngleWyrm »

Hiya, first post. I have some understanding of relational databases and Normal Forms, so fairly competent. I've been trying unsuccessfully to assemble a database structure for use as information storage so that I can formulate SQL questions about my currently favorite video game, Starbound. My stellar cartography catalog presently looks like so:

Image

The troubles rear their ugly head when I go to insert record into the orbits table. There are only three required fields (the two defining the compound primary key, plus one data element) but attempts at storing that data result in an integrity constraint violation:

Image

The constraint SYS_FK_77 doesn't seem to be visible to me from any of the menus, so I'm not clear on what is specified beyond 'system foreign key,' and don't seem to have the ability to rename it to something that conveys details of the relationship.

My first guess is that it's attempting an INSERT (Orbit, Planet, Star) into a table that has an arrangement (Star, Orbit, Planet), but as mentioned above, I haven't found a way to examine the SYS_FK_77 constraint.

Questions
Is there a way to look at the constraints automatically generated by the system?
Is there a better approach to dealing with the stated 'no parent SYS_FK_77' error?
OpenOffice 3.1 on WinXP
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Integrity constraint violation: no parent SYS_FK_xxx

Post by Villeroy »

1. Assuming that you are running an embedded HSQLDB, you can extract the database/script from the odb file which is a zip actualy.

2. Tools>SQL...

Code: Select all

SCRIPT '/tmp/dbscript.sql'
dumps the DDL script to the specified directory.

3. In the GUI there is an index designer availlable when you open a table in edit mode and call menu:Tools>Index Design.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply