Duplicate key value error message on a database for a writing groups scenario
The problem is in the books insert

INSERT INTO books VALUES('GroupName1','title 1 ','P1','1994',50);


You have a foreign key constraint, books_pub_fk1, referencing publishers, but you don't have a publisher P1, it is P01.

This is for referential integrity.

You will also have the same problem once this is fixed with WritingGroups_Books_fk as you don't have a group record in WritingGroup named GroupName1