Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 45429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:48:29+00:00 2026-05-10T15:48:29+00:00

Right now I’m making an extremely simple website- about 5 pages. Question is if

  • 0

Right now I’m making an extremely simple website- about 5 pages. Question is if it’s overkill and worth the time to integrate some sort of database mapping solution or if it would be better to just use plain old JNDI. I’ll have maybe a dozen things I need to read/write from the database. I guess I have a basic understanding of these technologies but it would still take a lot of referring to the documentation. Anyone else faced with the decision before?

EDIT: Sorry, I should’ve specified JNDI to lookup the DB connection and JDBC to perform the operations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:48:29+00:00Added an answer on May 10, 2026 at 3:48 pm

    Short answer: It depends on the complexity you want to support.

    Long answer:

    First of all, ORM ( object relational mapping – database mapping as you call it – ) and JNDI ( Java Naming and Directory Interfaces ) are two different things.

    The first as you already know, is used to map the Database tables to classes and objects. The second is to provide a lookup mechanism for resources, they may be DataSources, Ejb, Queues or others.

    Maybe your mean ‘JDBC’.

    Now as for your question: If it is that simple may be it wouldn’t be necessary to implement an ORM. The number tables would be around 5 – 10 at most, and the operations really simple, I guess.

    Probably using plain JDBC would be enough.

    If you use the DAO pattern you may change it later to support the ORM strategy if needed.

    Like this: Say you have the Employee table

    You create the Employee.java with all the fields of the DB by hand ( it should not take too long ) and a EmployeeDaO.java with methods like:

    +findById( id ): Employee +insert( Employee )  +update( Employee ) +delete( Employee )  +findAll():List<Employee> 

    And the implementation is quite straight forward:

    select * from employee where id = ? insert into employee ( bla, bla, bla ) values ( ? , ? , ? ) update etc. etc  

    When ( and If ) your application becomes too complex you may change the DAO implementation . For instance in the ‘select’ method you change the code to use the ORM object that performs the operation.

    public Employee selectById( int id ) {       // Commenting out the previous implementation...       // String query = select * from employee where id = ?        // execute( query )          // Using the ORM solution         Session session = getSession();        Employee e = ( Employee ) session.get( Employee.clas, id );        return e; } 

    This is just an example, in real life you may let the abstact factory create the ORM DAO, but that is offtopic. The point is you may start simple and by using the desing patterns you may change the implementation later if needed.

    Of course if you want to learn the technology you may start rigth away with even 1 table.

    The choice of one or another ( ORM solution that is ) depend basically on the technology you’re using. For instance for JBoss or other opensource products Hibernate is great. It is opensource, there’s a lot of resources where to learn from. But if you’re using something that already has Toplink ( like the oracle application server ) or if the base is already built on Toplink you should stay with that framework.

    By the way, since Oracle bought BEA, they said they’re replacing Kodo ( weblogic peresistence framework ) with toplink in the now called ‘Oracle Weblogic Application Server’.

    I leave you some resources where you can get more info about this:


    In this ‘Patterns of Enterprise Application Architecture’ book, Martin Fowler, explains where to use one or another, here is the catalog. Take a look at Data Source Architectural Patterns vs. Object-Relational Behavioral Patterns:

    PEAA Catalog


    DAO ( Data Access Object ) is part of the core J2EE patterns catalog:

    The DAO pattern


    This is a starter tutorial for Hibernate:

    Hibernate


    The official page of Toplink:

    Toplink


    Finally I ‘think’ the good think of JPA is that you may change providers lately.

    Start simple and then evolve.

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer InnoDB uses a shared table space. That means that per… May 11, 2026 at 12:12 pm
  • added an answer Instead of this: label { font-size: 10px; line-height: 12px; vertical-align:… May 11, 2026 at 12:12 pm
  • added an answer In my experience, ShouldAddProjectItem only gets called for folders in… May 11, 2026 at 12:12 pm

Related Questions

Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
Right now I have an SSIS package that runs every morning and gives me
Right now I'm making an extremely simple website- about 5 pages. Question is if
Right now I'm working with an ASP.NET website that automatically generates images and stores
Right now I have the following in my .vimrc : au BufWritePost *.c,*.cpp,*.h !ctags
Right now I'm working on a web application that receives a significant amount of
Right now I have a few new applications being developed against an Oracle Database,
Right now I'm developing mostly in C/C++, but I wrote some small utilities in
Right now I'm developing a small canvas oriented 2D graphics engine for a game,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.