Apache Derby Vs SQLite Joseph Sangiorgio Computer Science
Apache Derby Vs. SQLite Joseph Sangiorgio Computer Science Binghamton University President: Theta Tau Professional Engineering Fraternity
Outline � <presentation> � What is Apache Derby? � What is SQLite? ◦ Relevant UMLs � Why? � Comparison Chart � Implementation Differences � Modern Day Uses � Conclusions/Thanks � Funny Pictures � </presentation>
What is Apache Derby? � 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
Relevant UMLs - Derby Implementation in IBM’s “Cloudscape”: Derby embedded in an application http: //www. ibm. com/dev eloperworks/data/library /techarticle/dm 0408 anderson/ Derby acts as a client/server DBMS within a server framework
Relevant UMLs - Derby Implementation in IBM’s “Cloudscape”: Derby embedded in a Web server http: //www. ibm. com/dev eloperworks/data/library /techarticle/dm 0408 anderson/ Flexible application architecture
What is SQLite? � � � � � 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 325 Ki. B fully configured or less than 190 Ki. B 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 (Win 32 and Win. CE) are supported out of the box. Easy to port to other systems. http: //www. sqlite. org/index. h tml
Relevant UMLs - SQLite Implementation everywhere: http: //www. peppertop. co m/blog/? cat=12 http: //www. tedroche. co m/Present/2007/intro 2 d abo/intro 2 dabo. html
Comparison Chart 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. (Hyper. SQL) Doesn’t support Multiversion concurrency control Name Boring Acronym Sounds fun! http: //en. wikipedia. org/
Implementation Differences � 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 Connection conn = Driver. Manager. get. Connection("jdbc: derby: greetdb"); Statement stmt = conn. create. Statement(); Result. Set rs = stmt. execute. Query("SELECT message FROM greetings"); while (rs. next()) { String greeting = rs. get. String(1); System. out. println(greeting); } rs. close(); stmt. close(); conn. close();
Modern Day Uses � There is an extreme need for database engines nowadays… ◦ ◦ Embedded applications Android Java Standalones SQLite Firefox Middleware Skype Adobe Products Opera Solaris All Mobile OS Platforms Apache Derby Cloudscape
Funny Pictures
Special Thanks To… � Professor � Google � CS 328 Steflik � Binghamton University, of course! =D
Thank you For Watching �I would like to thank everyone in attendance today. � Have a fantastic winter break! � </presentation!>
- Slides: 13