Multiple choice technology databases

Which of the following statements are correct?

  1. Every entity must have a primary key

  2. It is not necessary to define primary key for an Entity

  3. @Primary annotation is used for denoting a simple primary key

  4. All the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In JPA and entity frameworks, every entity MUST have a primary key to uniquely identify each instance. This is a fundamental requirement for entity mapping and database operations. Option B is incorrect because the primary key IS required. Option C is incorrect because @Primary is not a standard JPA annotation for simple primary keys (typically @Id is used). Option D is incorrect since not all statements are valid.