Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is need of DAO? Write one simple DAO example?

Answer Posted / naveen kumar v

DAO: Data Access Object. here the main concept of DAO is to
communicate with the database. DAO mainly contains
1.) DAOFactory: this specifies which kind of database
(wether MySQL or ORACLE or MSSQL etc...).

2.) SQLFactory: which extends the DAOFactory. Here we do
all the connection stuffs.deciding te driver, hostname,
URL, username, password etc and also getting the Connection
object.

3.) AdminDAO: this is a interface where we declare all the
methods which we need in our application to perform all the
database related operation.

4.) SQLAdminFactory: this implements the AdminDAO
interface, all its method. this also gets the connection
from SQLFactory.

5.) TransactionControlDAO: here we keep the commit and
roolback methods.

if required...
6) ConnectionConstant: in this file we can mention the file
name (.properties file) where we keep the connection
detals, like hostname, username, password, etc...

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

1999


What are the main classes of the list interfaces? : java collections

978


What is the use of hashcode in java ?

1054


In hyderabad, which s/w training center is best for java, other than corejava what r the new tools to learn in java,which tool is best & have current requirement,pls give me information about java to learn ?

2100


What are the uses of the set interfaces in the java collections? : java collections

926


Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?

2986


Which interface does java.util.hashtable implement?

1134


What is the difference between comparable and comparator in java.util pkg?

1063


How is hashset maintained in memory by java ?

1092


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

2292


What are the differences between the java collection and the java list? : java collections

1049


What is the enumerator of the java collection framework? : java collections

985


Which java collection class can be used to maintain the entries in the order in which they were last accessed?

995


What are the types of java collections? : java collections

987


What are the types of interface used in the java collections? : java collections

996