Skip to content

Cphdat3sem2018f/week4-ORM-JPA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

ORM (Object Relational Mapping) with JPA (Java Persistence API)

Business Competences

Be able to work with databases through an Object Relational Mapping Framework. The focus is on java/JPA, but the core concepts are widely applicable in almost all technologies "out there".

Day 1 (Tuesday) Introduction to ORM

What/why is an ORM, install eclipselink+mysql dependencies, generate tables, generate classes (reverse JPA), the persistence unit, the Entity class, the EntityManager.

Readings

ORM. Only read the first section, to get an overall idea about ORM. This is a concept you will find in almost all modern technologies (Java, .Net, JavaScipt, PHP etc..)

Java Persistence (Wikibook). This should be your main reference for most of you JPA-related questions.

Important when you read the Wiki In most of the "technical" sections, you will find two examples. One, who specifies the mapping with annotations and another (the old way) who does it via XML-mappings We will ONLY use annotation based mappings, so you can ALWAYS skip the XML-parts. Don't be scared about "all" the links in the following. They are all just small sections in the same (wiki) book.

Read the following for day-1

Day 2 (Wednesday) - Relationships

Relationships, cardinality, directionality and Inheritance (only red students)

Readings

From this chapter in the wikibook you should read:

Relationships. Make sure to follow and skim these links in this section :

Day 3 (Thuersday) - Quering with JPQL

JPQL-queries Read in this section of the wikibook

  • 1.1 (skip 1.1.2)
  • 1.2.1
  • 1.4 parameters
  • 1.5 Query Results
  • 1.6 Common Queries Skim all sections to see what you can do. You will need this for the exercises.
  • for your reference JPQL This is an extra ?? section in the wiki, which is kind of a complete referende to JPQL

Day 4 (Friday) - Friday Exercises

Friday

Extra Material for this week

The following tutorial from netbeans, as well as a couple videos Christian made, may help you through the JPA setup process if you forget it after the lecture. These are not useful learning resources. I recommend only using them if you forget how to setup the persistence unit, and do table/class generation with JPA.

Exercises

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages