INTRODUCTION TO DB 40 CHAPTER1 3 12 PRESENTED
INTRODUCTION TO DB 40 CHAPTER-1 (3 - 12) PRESENTED BY, KARTHIK ANNAREDDY (#1)
WHAT IS DB 40? • It is an Object-oriented database which is designed for Java and. NET developers • DB 40 is introduced to provide persistence for the objects • Serialization is one of the method used to convert the object into stream of data that can be written and read back from the file • While serialization has few limitations • RDBMS was used since 1970’s which stores the data in the form of tables • Object oriented database stores the data in terms of objects
• We can create a Relational database with objects which is very complex and causes impedance mismatch • We can use JDBC to connect the database with the application and use SQL to insert and select the values • Object oriented mapping is required between the object model and the data model. Relational database does not support few properties of object oriented approach like inheritance • The other reason could be the relation between the object model and the data model
TRANSPARENT PERSISTENCE • Incase we use SQL explicitly using JDBC and SQL INSERT to store the data we have the chances of having errors • To overcome this we use Transparent persistence which uses Object oriented programming rather than SQL • Object oriented mapping is used such as Hibernate, EJB etc.
OBJECT DATABASES
WHAT MAKES DB 40 DIFFERENT? • Better Performance • Zero Administration • Simplicity • Unique ability to store Java and. NET objects • Cross platform portability
DB 40 BASICS • DB 40 is simple where we create a file to instantiate an object container • Object container is the DB 40 API class to encapsulate the database • To store an object we use set method of the object container to store a particular object • There is no need to setup any database with tables to store the data • Objects are stored as it is without mappings • For restoring an object we use address object and returns as object set which is simple
QUERIES IN DB 40 • The basic querying method offered by DB 40 is Query-by-example (QBE) • QBE does not support complex queries for that we use native queries offered by DB 40 • The native queries written in DB 40 are language specific which allows them to benefit from the modern IDE’s • DB 40 has an advantage over other object oriented databases with SODA query API
SODA – SIMPLE OBJECT DATA ACCESS • SODA API provides the classes to perform complex queries on object databases • SODA contains strings which are not type safe • Native queries are recommended for SODA • Object Manager provides a way to get inside a database
Thank You Any Questions?
- Slides: 10