Вы находитесь на странице: 1из 19

1

DATABASE RELATIONAL VIEWER


Team Members
S.No

Reg.No

Group No: 23
Name of the Student

Section

CB.EN.U4CSE08029

KRISHNA KUMAR S

CB.EN.U4CSE08130

KRISHNA CHAITANYA O

CB.EN.U4CSE08222

LAKSHMI SAINADH G

CB.EN.U4CSE08240

PARVATHY ANIL KUMAR

CB.EN.U4CSE08241

PRADEEP REDDY S

Project Advisor (External) : Suresh Mohan / E &R / Snr Associate


Project Advisor(Internal) : Mr. P. BAGAVATHI SIVAKUMAR / ASST.
PROFESSOR /CSE

Date:3 June 2012

Internship Project Group No: 23

PROBLEM STATEMENT/DEFINITION

This project is for understanding the contents present in the


database in a graphical format. Oracle is a relational database. It
contains many tables which are having relations with each other.
This tool must be able to read from the database and construct a
graphical format of tables with the arrows for relations
accordingly.

Date:

Internship Project Group No: 23

OVERALL SYSTEM DESIGN

Date:

Internship Project Group No: 23

MODULEWISE DETAILED DESIGN


PRESENTATION TIER
1.Provides a user interface login swing frame for user
to enter the credentials.
2.Passes the credentials to the Business Tier
for validation.
3. Directs the control to the next frame after
validation.
4.Displays the list of all table names in the database.
5.Allows the user to search for the specific table.
6.Gives the user a graphical representation of the table and its
relations.
Date:

Internship Project Group No:23

MODULEWISE DETAILED DESIGN


BUSINESS TIER
1.Validates the user credentials
2.Establishes a connection to the database
for an authorized user.
3.Retrieves the list of tables from the DB
and sends to presentation tier.
4.Validates the user input(table name).
5.If the table name is valid, table and its relations
are obtained from DB.

Date:

Internship Project Group No: 23

MODULEWISE DETAILED DESIGN


DATABASE
1.Stores details about each entity in the form of tables.
2.Keeps record of all constraints of the table.

Date:

Internship Project Group No: 23

Feasibility Study

Date:

Before Implementation of project a feasibility study has been


done for a period of 20 days
During this study we identified two important technologies which
are helpful to implement the project
1)SchemaCrawler: it is an open source API useful to crawl the
database schema
2) JDBC : This is an API for the Java programming
language that defines how a client may access a
database and It provides methods for querying and
updating data in a database.

In-House Project Group No:

Schema Crawler

Date:

SchemaCrawler is an open-source Java API


SchemaCrawler comes with a set of command line tools that
allow database metadata to be output as plain text, commaseparated text (CSV), XHTML, or JavaScript object notation
(JSON).
SchemaCrawler is capable of creating entity-relationship
diagrams in DOT format, which Graphviz can convert into
schema diagrams.
Graphviz is open source graph visualization software which
takes descriptions of graphs in a simple text language, and
make diagrams in useful formats, such as images and SVG
for web pages.
Internship Project Group No: 23

Feasibility Study Findings

Date:

Project group was divided into two groups with one group
working on SchemaCrawler and other one with JDBC metadata.
Using the results obtained we have decided to use JDBC
instead of SchemaCrawler due to following reasons
Reason 1:JDBC is much faster in extracting metadata than
SchemaCrawler.
Reason 2:Different database need different customized
SchemaCrawler API which is not practical.
Reason 3:Most of the commercial Databases provide JDBC
driver as java is most commonly used programming
language.

In-House Project Group No:

10

IMPLEMENTATION DETAILS

Program undergoes three different phases.


Phase 1:Connect to a database and retrieve all the
tables and related tables.
Phase 2:each table schema is generated in a
graphical
form .
Phase 3:each table is checked for key constraints

Date:

Internship Project Group No: 23

11

IMPLEMENTATION DETAILS
PRESENTATION TIER
1. Swings drop down box is used to select the Database and its
server and user inputs( username, password) are entered in the
text box and a button is used to validate connection
2.If the credentials are valid a new swing frame will pop up with
the list of tables in the DB.
3.Invalid credentials lead to a dialogue box with respective error
message.
4.If the table name entered by the user is valid, another swing
frame is displayed with the table schema and its related table
schemas.
Date:

Internship Project Group No: 23

12

IMPLEMENTATION DETAILS
BUSINESS TIER
Methods used:
1.getConnection(url,username,password) To establish a connection with the DB
It returns Null, if the credentials are invalid
If valid , public Vector showTabColumns(Connection connection) is
invoked
2. showTabColumns(Connection connection)
Retrieves the table list for the particular user

Date:

Internship Project Group No: 23

13

IMPLEMENTATION DETAILS
BUSINESS TIER
Methods used:
3. JTable getData(Connection connection, String tableName)
Used to get the selected table Schema
4. retrievePrimaryKeys(Connection connection, String
columnName,String tableName)
Retrieves the primary keys for the specified table
5. retrieveForeignKeys(Connection connection, String
columnName,String tableName)
Retrieves the foreign keys for the specified table
Date:

Internship Project Group No: 23

14

IMPLEMENTATION DETAILS
DATABASE
Data is retrieved from the DB using SQL queries.

Date:

Internship Project Group No: 23

15

WORK PLAN

Date:

Feasibility study has been done to find various technologies which


can be used to get the Database Schema
Schema Crawler and JDBC Meta Data are the optimum APIs
obtained from the feasibility study
Schema Crawler is an Open Source API which is used to crawl
Database schema and provides extensive functionalities for
diagramming.
JDBC Metadata has been chosen instead of Schema Crawler as it
is faster in retrieving Database Schema.
Java Swings and JDBC Meta Data are integrated to display
Database Relationships in graphical format.

Internship Project Group No: 23

16

WORK COMPLETED

CURRENT STATUS REPORT 1.


CURRENT STATUS REPORT 2.

Date:

Internship Project Group No: 23

17

SCREEN SHOTS
screen shots folder

Date:

Internship Project Group No: 23

18

WORK TO BE CARRIED OUT


Dynamic creation of arrows for representing relationship between
tables.
Doing a feasibility study for finding an alternative search algorithm
for faster retrieval of Primary and Foreign Key Columns.

Date:

Internship Project Group No: 23

19

REFERENCES

Date:

Maven, "About Schema Crawler,


http://schemacrawler.sourceforge.net/ , April 2012

Sun Micro System, Java Swing Tutorial,


http://www.javabeginner.com/java-swing/java-swing-tutorial ,Oct 2010

Rose India ,Changing the column name,


http://www.roseindia.net ,March 2006

Internship Project Group No: 23

Вам также может понравиться