Latest Final Report

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Page 1 of 16

RavStore ----- Application using an


Object-oriented Database Management
System

Ravpreet Kaur

Comp 519, Fall 2009


Penn State Harrisburg

1
Page 2 of 16

Contents

1 Introduction…………………………………………………..….3
2 Problem statement and Objective……..…………………..…....3
2.1Specifications……………………………………….….…..4
2.2Phases………………………………………………...…….4
3 Implementation…………………………………………..……....4
3.1 Hardware/Software specifications………………..……..….….5
4 Milestone to be Achieved……………………………….………..5
5 Analysis and Design………………………………….……………7
5.1 Use Case Diagram…………………………….…………....7
5.1.1 Login Screen……………………..…………….....8
5.1.2 Add Information................................................…...8
5.1.3 Modify Information…………….……………….....9
5.1.4 Delete Item……………………….…….………….9
5.1.5 Search Item……………..…….……………………9
5.2 Class Diagram………………………………………11
6 Test Cases……………………………………………...…………12
7 Lessons Learned ………..………...……………………….……12
8 Conclusion ……………….………………..……...……………..15
9 References ………………….……………..……...………….….16

Introduction

2
Page 3 of 16

The db4o library is a newest library in the OODBMS world, pure object storage for a new
generation of object developers. To get an idea of what it's like to use db4o, consider basic class
representing an individual human being. “An OODBMS is the result of combining object-
oriented principles with database management principles. It is clear from the name that object-
oriented database is able to store data element as data objects. Object is an entity. Object-
oriented concepts such as encapsulation, polymorphism and inheritance as well as Database
Management concepts such as Atomicity, Consistency, Isolation and Durability (ACID) are
enforced in such systems” [2]

Problem Statement and Objective


The main purpose of this project is to implement an application using an object-oriented database
system. With the help of this project we will try to show that the OODBMS is better in
sometimes than RDBMS. One reason is that in RDBMS we have to use the join operations to
gain access the data from multiple tables that makes the performance poor. But in ODBMS that
will be carried out by using pointers. As the performance problem that is the major issue in any
kind of database, I removed from my project using OODBMS. Object oriented database is not
only good because of its design but it can also handle complex data or relationships.
This project involves created on a RavStore application based on object – oriented database
management system. Where I will store my data as of objects instead of rows and columns as in
relational database. This project will cover all the aspects like storing the books and cd’s,
updating, searching, deleting the books and cd’s but using OODBMS techniques. In this project I
will mix the Inheritance and polymorphism to make parent –child relational relationships, which
is the common feature of both OODBMS and OOPS languages and not exist in any RDBMS
that uses constraints and keys for doing so. Moreover as I am using OODBMS there is no
database design so classes and their relationship should be proper so that application performs
optimally.

Specifications
The following are the specifications:
• The application must allow a user to add new Book

3
Page 4 of 16

• The application must allow a user to modify Book Information


• The application must allow a user to delete Book Information
• The application must allow a user to retrieve Information
• The application will allow a user to view all Books
• The application must allow a user to add new CD
• The application must allow a user to modify CD Information
• The application must allow a user to delete CD Information
• The application must allow a user to retrieve CD by Type or Artist Name
• The application will allow a user to view all CD’s.

Phases
Functionality and construction of object, classes and attributes will be shown in analysis and
design phase.
 Test cases will be used to do testing.
 Test cases will be in construction phase to construct data for testing.
 Documentation will explain the overall working of software.

Implementation
I will use Visual Studio 2008 , C#.NET/ VB.NET for project implementation and the operating
system will be used either Windows vista or Windows XP. The database to be used is DB4o.
Microsoft Vision 2003 will be used to design the system.

Hardware/Software Specifications:

 Processor : Celeron or later

4
Page 5 of 16

 Disk space : Minimum 40 MB


 RAM : Minimum 1 GB
 OS : Windows XP or Windows Vista
 Software : NET 3.5 Framework
: Visual Studio 2008
: C# or VB.NET
: DB40 – 7.8

Milestone to be achieved:

A detailed schedule of project is given below. Tasks are defined in bold letters and subtasks are
defined in non bolded letters:

 Proposal :
Start Date : 12-Sep-09
End Date : 17-Sep-09
Status : Completed

 Installation of Software :
a) Download visual studio 2008
b) Download DB40
c) Install Visual Studio 2008
d) Install DB40 on PC
e) Decide Standards Document
Start Date : 20-Sep-09
End Date : 27-Sep-09
Status : Completed

Different Levels of Analysis and Design:


a) Identification of Use Cases Done
b) Preparation of Use Case Diagrams

5
Page 6 of 16

c) Identification of Objects
d) Identification of classes
e) Identification of attributes
f) Relationships
g) Preparation of Class Diagrams
h) Tactics for Test Data upload

Start Date : 28-Sep-09


End Date : 12-Oct-09
Status : Completed

Implementation:
Create database:
a) Add/Modify/Delete Book Store Information
b) Progress Report
c) Add/Modify/Delete Book Store Information
d) Retrieve Rav Store Information based on some criteria
e) Test Data uploading
Start Date : 13-Oct-09
End Date : 24-Nov-09
Status : Not Completed

Final Report:

Start Date : 25-Nov-09


End Date : 30-Nov-09
Status : completed

6
Page 7 of 16

Analysis and Design:

Use Case Diagram [2]

Add Book/CD Save Book/ CD Database


information

Modify Book/ CD
information

Delete Book/ CD
information

Retrieve item
Search Book/ CD
information
information

Verify user/pass Retrieve User


information

The diagram shows that users are allowed to


 Add Book or CD information
 Modify Book or CD information
 Delete Book or CD information

7
Page 8 of 16

 Search Book or CD based on some criteria


 Display all Books or CDs

Login Screen:
User name and password are mandatory fields. If user name and password matches then this
page is redirected to next page. Otherwise it will show message that username and password
does not match.

Add Information:
This screen allows user to add new book or new CD. There are some fields those are required for
new entry of book or CD.
For Book :
 Author Name
 Publisher
 Title
 Price
For CD:
 Artist Name
 Title
 Type
 Price

Modify Information:
With this use case user is allowed to modify existing information. User can edit information and
change price, author name, publisher. Fields required to modify information are given below.
For Book :

8
Page 9 of 16

 Publisher
 Author name
 Title
 Price
For CD:
 Title
 Artist Name
 Type
 Price

Delete Information:
User is allowed to delete existing information about book or CD. After deletion user can sees
updated screen immediately.

Search Item:
With help of this use case user can search item by different ways. It includes the following:
For Book:
 Search book by author name.
 Search book by title.
For CD
 Search CD by artist name
 Search CD by type

The data that are displayed for Book include:


 Author Name
 Publisher
 Title

9
Page 10 of 16

 Price

The data that are displayed for CD includes:


 Artist Name
 Type
 Title
 Price

Class Diagram:

The base services class represents the starting point, the abstract factory pattern to create having
particular set of general properties. Both author and artist have a name. Both author and artist
have a property called price. Both of them have the publisher or procedure to represent their
work. The work of author is a book and work of artist is musical album. Therefore we have
created a common class called Base Services which basically represent both objects called author
and artist.
We have taken Inheritance that is Generalization as know that attributes represent the essential
part of an object where as properties help us to modify these essential parts using getter and
setter methods. Therefore abstract class having declaration of all the properties representing the
artist as well as the author has been created as follow:
 Name (which represent the name of the author as well as artist)
 Author ( somebody who write book , novels)
 Title (the title of music album or books)
 Price( the price of CD and book)
 Type (type of CD or book)
 Artist ( somebody who name album)

10
Page 11 of 16

Class Diagram fig 3.

Test Cases:

11
Page 12 of 16

Ravstore application shows how data can be saved, deleted and retrieved. The various test cases
are:
1. Authentication of user
2. Filter the information based on some criteria
3. Modify item information and save
4. Delete existing item information
5. Add new item into the database by entering the valid data
6. Display all the item

Best lessons I learned:


Benefits of Object oriented database management system:
There are many benefits of object oriented database management system are:

In Development side:
When we use OODBMS, we write less code as compare to RDBMS. The reason for this is
that we do not need to translate it into sub language. Objects are directly stored into the database.

In Production Side:
Performance depends on the complexity of data. So if we are using complex data speed
will be ten to a thousand times more than RDBMS. Because no translation from database to
application programming is needed.

There are no primary keys required:


If we are using RDBMS then we have to worry about that no two tuples should have
same key value. If it is so it will give an error. In OODBMS each object has unique object
identifier (OID) that uniquely identifying particular tuple. So unlimited values can be stored into
object.[3]
Persistence Programming:
Persistence programming can be defined as programming that can manipulates data in a
database. It means that no translation is needed the diagram shows that. Moreover OODBMS
hide database from the programmer.

12
Page 13 of 16

Application

Object - Oriented
Database

Fig : 1 showing how object oriented database is working[8]

Otherwise in the relational database translation is needed.

Application

Translation

Relational
Database

Fig 2 showing relational database’s working [8]

Normalization:

13
Page 14 of 16

Normalization ensures that the structure of database is suitable for queries and is independent
of unwanted anomalies as – insert, deletion and updating. These are the anomalies which lead
to damage the data integrity.

Normal forms are used to make the database free from these anomalies. They find the degree
of vulnerability. Normal forms and vulnerability are reciprocal of one another. If one is higher
other will be low. The available normal forms are described as follows:

1 1NF (Redundancy removal )


2 2NF (Functional Dependency )
3 3NF (Non-transitively dependency )
4 BCNF (Non-trivial functional dependency on super key )
5 4NF (Multivalve dependency)
6 5NF (Join dependency )
7 6NF (recently discovered )

Goal of Normalization:- The two main goal of normalization are as follows-

1 To remove redundant data from database.


2 Dependencies can exist in database if they make some sense.

Normalization in OODBMS

Because object – oriented database store data as objects or classes and saving is done by the
database server as a complete. This is the reason that Normalization is not required in object
oriented database. OODBMS has it own paradigm that is different from RDBMS. Because if we
implement normalization in our database that degrade the performance by increasing response
time. But in RDBMS we can normalize the relation (table) to remove duplicity of data.

So in short we can say that in relation database if does not normalize the database then
anomalies occurs, but if we perform normalization then performance degrades. So always we
have to make balance among normalization and performance. This kind of problem does not
come when we are using object oriented database. [9]

14
Page 15 of 16

Comparison:

Object relational database is also good in some ways.


First, if we want to modify data schema we just update, delete or create table or rows. So
database schema is not related to original application at all. But on other side changes in one
class will effect other classes too. Because there is parent-child relationship in classes or we use
one class as instance of other class.
In industry there are more people who have experienced in ORDBMS. Almost 94% work is done
in ORDBMS.
So if we compare OODBMS, ORDBMS, RDBMS. Then we can say that relational database is
good where data types are simple. ORDBMS and OODBMS are good where data types are
complex but former is also good in security side and later is good for its high performance.

Conclusion:

To develop a project using object oriented language with object oriented database is to show
the new developing and managing system called as Object-oriented database Management
System. Because today’s applications contain videos, audios, graphs not only the simple data.
So to manage these types of data it is very complex to handle the application with RDBMS
which uses the complex data type for such type of data. But by using OODBMS developers can
make more consistency because same model will be used by both that is programming
language and OODBMS.

References:

[1] db4objects by versant.

15
Page 16 of 16

<www.db4o.com>
[2] Inmate Record System using Object-oriented Database Management System.
<http://cs.hbg.psu.edu/courses/comp519.lmn.f07/rajeshn-prop.pdf>
[3] Object database management system.
< www.odbms.org >
[4] An Exploration of object oriented database management systems by Dare Obassanjo.
<http://www.25hoursaday.com/WhyArentYouUsingAn OODBMS.html>
[5] Object database from Wikipedia.
< http://en.wikipedia.org/wiki/Object_database>
[6] Basic principals of building object oriented database.
<http://www.garret.ru/oodbms.html>
[7] oodbms.
< http://www.scribd.com/doc/6142698/oodbms>
[8] Object-Oriented database management systems (ODBMS) by Wendy Wooters CS157B

[9] Database Normalization


<http://en.wikipedia.org/wiki/Database_normalization>

[10] Object database


<http://en.wikipedia.org/wiki/Object_database>

16

You might also like