This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is DAO?  RSS feed

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have gone through this forum about the diff. bet. DAO and Entity Beans. Is it something like a framework so that it gives us the API/methods for doing all kinds of data access?
Then, another qn. came to my mind is that what is the diff. bet. JDBC and DAO?
Your answers pls...
Guru
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/blueprints/patterns/DAO.html

JDBC is a API provided by SUN to access relational database. DAO is defined by the developer. Suppose I want to access Employee info which may be stored in some flat files,RELATIONAL database or some OODMS. I define an interface with methods that will allow me retrieve, update or delete functionlities. My business logic will talk to the interface only.
I could then implement the interface for say, Oracle Database and have SQL code inside the implemented methods.
In case I need to access employee info stored in some other datastore I will be creating another implementation class without touching the business logic.
[ August 14, 2003: Message edited by: Pradeep Bhat ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!