Base Relations - error 170

In LibreOffice 4.4 Base (OS Windows 7) in relationship window, when attempting to establish relations between 2 tables, both via icon or drag-and-drop, keep getting error report:
“SQL Status: S0011 Error code: -170
Primary or unique constraint required on main table: “category table” in statement [ALTER TABLE “Product Table” ADD FOREIGN KEY (“Category”) REFERENCES “category table” (“Category”)]”

How do I setup a primary or unique constraint?
(cannot find primary or unique constraints in Help index, or any of my database texts)

It does seem to be broken in many instances. Could graphically create primary-to-primary connection, but others failed. Unclear to me so far if the relationships are being created and are not being displayed graphically. Could try to run ALTER TABLE statement directly in ToolsSQL dialog box, hope for a different result.

Hi - If you want to define a relation among the different tables, you should enter a primary key for, at least, one of the two tables involved in the relationship.

In LibreOffice, you define the primary key in the design view of a table, by choosing the relevant command from the context menu of a row header for the selected field.

DesignMode