JPA annotations and operations reviewed
Quiz by Jordi Gual
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
7 questions
Show answers
- Q1What is the annotation used to indicate that a class is represented in the data base with a table?@Transient@Table@Persistent@Entity30s
- Q2How do we define the name of the table wich will represent a class in the data base?With the @Entity annotationWith the @Table annotation.With the @Alias annotationWith the @Name annotation30s
- Q3Which annotation has to be used in the class "Alumne" to define the relationship that we can see in the class diagram?@OneToMany@JoinTable@ManyToOne@ManyToMany45s
- Q4What is the difference between @NamedQuery and @NamedQueries annotations?@NamedQuery is used to define single result queries and @NamedQueries for multiple result ones.@NamedQuery is used to define a single query to the database and @NamedQueries is used to group several queries defined with @NamedQuery.@NamedQuery is used to define queries with a single name and @NamedQueries is used to define multiple names to each query.@NamedQuery is used to define single field result queries and @NamedQueries for multiple field result ones.30s
- Q5The four basic JPA persistence operations are...insert(), update(), delete() and select()add(), set(), remove() and get()insert(), modify(), remove() and query()persist(), merge(), remove() and createNamedQuery()30s
- Q6What kind of query is the one we can see above if "id" is an attribute annotated as @Id?A multiple result parametric query.A multiple result non-arametric query.A single result parametric query.A single result non-parametric query.45s
- Q7What is the language used to define object oriented queries in JPA?SQLJPQLJavaEL45s