Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 9 Question 25 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 25
Topic #: 9
[All PGCES-02 Questions]

A table is defined as below. Select the most suitable description about the foreign key constraint. CREATE TABLE master (id INTEGER PRIMARY KEY, name TEXT); CREATE TABLE record (id INTEGER REFERENCES master (id), count INTEGER);

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Avery
2 hours ago
Haha, good thing the 'record' table doesn't have a column called 'count_of_beers'. That would be a whole different kind of foreign key constraint!
upvoted 0 times
...
Dion
4 days ago
I agree with Stephane. This is a classic example of a foreign key constraint, which prevents orphaned records in the dependent table.
upvoted 0 times
...
Stephane
5 days ago
Option C is the correct answer. The foreign key constraint ensures that the corresponding row in the master table cannot be deleted if there is a reference to it in the record table.
upvoted 0 times
...
Gilbert
9 days ago
Hmm, that makes sense too. It's important to understand the implications of foreign key constraints in database design.
upvoted 0 times
...
Leonida
14 days ago
I disagree, I believe the answer is A. The foreign key constraint prevents any changes to the master table if a row exists in the record table.
upvoted 0 times
...
Gilbert
15 days ago
I think the answer is C. The foreign key constraint ensures that the corresponding row in the master table cannot be deleted.
upvoted 0 times
...

Save Cancel