Joseph Sangiorgio Computer Science Binghamton University President: Theta Tau Professional...

13
Apache Derby Vs. SQLite Joseph Sangiorgio Computer Science Binghamton University President: Theta Tau Professional Engineering Fraternity

Transcript of Joseph Sangiorgio Computer Science Binghamton University President: Theta Tau Professional...

Apache Derby Vs. SQLite

Joseph SangiorgioComputer Science Binghamton University

President: Theta Tau Professional Engineering Fraternity

<presentation> What is Apache Derby?

◦ Relevant UMLs What is SQLite?

◦ Relevant UMLs Why? Comparison Chart Implementation Differences Modern Day Uses Conclusions/Thanks Funny Pictures </presentation>

Outline

Derby has a small footprint -- about 2.6 megabytes for the base engine and embedded JDBC driver.

Derby is based on the Java, JDBC, and SQL standards.

Derby provides an embedded JDBC driver that lets you embed Derby in any Java-based solution.

Derby also supports the more familiar client/server mode with the Derby Network Client JDBC driver and Derby Network Server.

Derby is easy to install, deploy, and use.◦ Source: http://db.apache.org/derby/index.html

What is Apache Derby?

Relevant UMLs - DerbyImplementation in IBM’s “Cloudscape”:

Derby embedded in an application

Derby acts as a client/server DBMS within a server framework

http://www.ibm.com/developerworks/data/library/techarticle/dm-0408anderson/

Relevant UMLs - DerbyImplementation in IBM’s “Cloudscape”:

Derby embedded in a Web server Flexible application architecture

http://www.ibm.com/developerworks/data/library/techarticle/dm-0408anderson/

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.

Zero-configuration - no setup or administration needed. A complete database is stored in a single cross-platform disk file. Supports terabyte-sized databases and gigabyte-sized strings and

blobs. (See limits.html.) Small code footprint: less than 325KiB fully configured or less than

190KiB with optional features omitted. Faster than popular client/server database engines for most

common operations. Simple, easy to use API. Self-contained: no external dependencies. Cross-platform: Unix (Linux and Mac OS X), OS/2, and Windows

(Win32 and WinCE) are supported out of the box. Easy to port to other systems.

What is SQLite?

http://www.sqlite.org/index.html

Relevant UMLs - SQLiteImplementation everywhere:

http://www.peppertop.com/blog/?cat=12

http://www.tedroche.com/Present/2007/intro2dabo/intro2dabo.html

SQL Derby

Usage Widely Used Budding technology;Limited implementation

Languages Can be used with different programming languages

Java-only

Support Base Google-tastic! Examples exist, not as easy to find what you need…

Performance Fast. (HyperSQL) Doesn’t support Multiversion concurrency control

Name Boring Acronym Sounds fun!

Comparison Chart

http://en.wikipedia.org/

There are not that many differences in the code…

They both use the same basic coding pattern, and the same “industry standard” JDBC API

When a client application needs to store or retrieve data in the database, it submits a request through the JDBC API to the Derby engine

Implementation Differences

Connection conn = DriverManager.getConnection("jdbc:derby:greetdb"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT message FROM greetings"); while (rs.next()) { String greeting = rs.getString(1); System.out.println(greeting); } rs.close(); stmt.close(); conn.close();

There is an extreme need for database engines nowadays…◦ Embedded applications◦ Android◦ Java Standalones◦ Middleware

Modern Day Uses

SQLite Apache Derby

Firefox Cloudscape

Skype

Adobe Products

Opera

Solaris

All Mobile OS Platforms

Funny Pictures

Professor Steflik Google CS328 Binghamton University, of course!

Special Thanks To…

=D

I would like to thank everyone in attendance today.

Have a fantastic winter break!

</presentation!>

Thank you For Watching