user962206
user962206

Reputation: 16127

Java Database with Mapping?

I am going to make a database where I need to make use of mapping, (THIS IS NOT JAVA EE) I am speaking of JavaSE only not EE, I was wondering how would I implement these class I made? (User,Contactinformation,Employee,FinanceTeam,SystemAdmin) how will I transfer the datas of these objects into the database? and how does mapping work? a BASIC Database tutorial will HELP me a lot, Thanks Btw if you are curious I am using MySQL for my database

Upvotes: 2

Views: 4237

Answers (2)

stivlo
stivlo

Reputation: 85496

You need an ORM (Object-Relational Mapping) and Hibernate is the most commonly used, Hibernate can also be used standalone, not only in Java EE environment.

JavaBrains video tutorial is 34 lessons, well explained and easy to understand, I highly recommend you. The author is not a native English speaker, so if you look past the accent, it's a great content.

Upvotes: 5

SplinterReality
SplinterReality

Reputation: 3410

Why not use a JPA like Hibernate or EclipseLink? They work just fine in a J2SE environment, the only difference is how you obtain the EntityManager reference. (By creating the EntityManagerFactory directly as opposed to Container Managed Injection)

factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
EntityManager em = factory.createEntityManager();

Upvotes: 0

Related Questions