Integrity constraint violation: no parent SYS_FK_xxx

Discuss the database features

Integrity constraint violation: no parent SYS_FK_xxx

Postby AngleWyrm » Tue Sep 05, 2017 3:05 pm

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
AngleWyrm
 
Posts: 1
Joined: Tue Sep 05, 2017 2:45 pm

Re: Integrity constraint violation: no parent SYS_FK_xxx

Postby Villeroy » Tue Sep 05, 2017 3:28 pm

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   Expand viewCollapse view
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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 4 guests