1

Does Java have support for any form of databases natively? That is, does Java have a set of API or library that allows me to create and use databases such as MS Access or SQLite, etc?

It seems like I must download a third-party wrapper library or driver before I can use any database. IS there a native standard library in Java that allows me to do databases without third-party classes?

jww
104k107 gold badges454 silver badges975 bronze badges
asked Oct 16, 2011 at 2:17

4 Answers 4

2

No. Java's database functionality (JDBC) is composed of a set of interfaces (plus a few utility classes) in the standard library and third-party implementations of those interfaces that let you connect to all the various databases out there. You'll have to find and use at least a driver library for any database you'd like to connect to.

answered Oct 16, 2011 at 2:26
Sign up to request clarification or add additional context in comments.

Comments

1

This link is a quick overview of them

  • JavaDB - a Java-based database
  • JDO - Java DataObject Objects - an abstraction for persistence
  • JDBC - Java Database Connectivity - which has drivers for many vendor DBs (MySQL, MSSQL, SQLite, etc.)
answered Oct 16, 2011 at 2:23

Comments

1

There are many 100% Java databases. Start with Apache Derby.

Obviously, if you want to talk to a database that is, itself, not written in Java, you'll have to use some sort of connector.

In many cases, for databases typically spoken to over a network (e.g. Oracle, mysql, postgresql) the connector is a 'type 4' JDBC driver, which is a slug of 100% Java code that implements the same network protocol as gets used for all other programming languages.

For embedded non-Java databases, 'some glue required'.

answered Oct 16, 2011 at 2:29

Comments

0

The standard class library doesn't have any thing like that built in. See this answer for information on getting SQLite going with minimum fuss. That's as good as it's going to get, I'm afraid.

answered Oct 16, 2011 at 2:25

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.