project report on er2sql
TRANSCRIPT
-
7/31/2019 Project Report on ER2SQL
1/46
A Report on:
ER to SQL Converter
Submitted by:
Under guidance of:
Department of Computer Engineering
-
7/31/2019 Project Report on ER2SQL
2/46
CERTIFICATE
This is to certify that the pre report on the project entitled
ER to SQL Converter
Submitted by:
A partial fulfillment for BACHELOR OF COMPUTER ENGINEERING degreecourse of Mumbai University for year 2009-2010.
INTERNAL GUIDE HOD
( Prof.) (Prof.)
INTERNAL EXAMINER PRINCIPAL
EXTERNAL EXAMINER
-
7/31/2019 Project Report on ER2SQL
3/46
ACKNOWLEDGEMENT
No project is ever complete without the guidance of those expert how have already traded this past before and hence become master of it and as a result, our leader. So we would like to take thisopportunity to take all those individuals how have helped us in visualizing this project.
We express out deep gratitude to our project guide Mrs.Amarja Adgaonkar for providingtimely assistant to our query and guidance that she gave owing to her experience in this field for past many year. She had indeed been a lighthouse for us in this journey.
We would also take this opportunity to thank our project co-ordinate Mr.Nitin Patkar for his guidance in selecting this project and also for providing us all this details on proper
presentation of this project.
We extend our sincerity appreciation to all our Professor form K.C.COLLEGE OFENGINEERING for their valuable inside and tip during the designing of the project. Their contributions have been valuable in so many ways that we find it difficult to acknowledge of them
individual.We also great full to our HOD Mrs.Amarja Adgaonkar for extending her help directly and
indirectly through various channel in our project work.
.
Thanking You,
________________
-
7/31/2019 Project Report on ER2SQL
4/46
ABSTRACT
In this project we are providing ER Drawing tool which provides all tools need to
design an ER Model. It automatically generate SQL Queries for creating tables
which will be loaded in database and at same time Forms for data entry are auto
generator. Here in this project we are providing facilities to fetch record in XMLFormat.
-
7/31/2019 Project Report on ER2SQL
5/46
INDEXSR.NOSR.NO TITLE PG.NO
1)1) INTRODUCTION1
2)2) LITERATURE SURVEY5
3)3) PROBLEM DEFINITION8
4)4) REQUIREMENT ANALYSIS11
5)5) PLANNING AND ESTIMATION13
6)6) ALGORITHM15
7)7) IMPLEMENTATION22
8)8) ADVANTAGES & DISADVANTAGES27
9)9) FUTURE MODIFICATIONS29
10)10) APPLICATION31
11)11) BIBLIOGRAPHY33
12)12) SCREENSHOTS48
13)13) SOURCE CODE
-
7/31/2019 Project Report on ER2SQL
6/46
Chapter 1
INTRODUCTIONINTRODUCTION
-
7/31/2019 Project Report on ER2SQL
7/46
INTRODUCTION
There are many ER diagramming tools. Some free software ER
diagramming tools that can interpret and generate ER models, SQL and do
database analysis are MySQL Workbench and DBDesigner (open-source). A
freeware ER tool that can generate database and application layer code
(webservices) is the RISE Editor.
In software engineering, an entity-relationship model (ERM ) is an abstract
and conceptual representation of data. Entity-relationship modeling is a database
modeling method, used to produce a type of conceptual schema or semantic data
model of a system, often a relational database, and its requirements in a top-down
fashion. Diagrams created by this process are called entity-relationship diagrams ,
ER diagrams , or ERDs .
An entity may be defined as a thing which is recognized as being capable
of an independent existence and which can be uniquely identified. An entity
is an abstraction from the complexities of some domain. When we speak of
an entity we normally speak of some aspect of the real world which can be
distinguished from other aspects of the real world.
-
7/31/2019 Project Report on ER2SQL
8/46
An entity may be a physical object such as a house or a car, an event such as a
house sale or a car service, or a concept such as a customer transaction or order.
Although the term entity is the one most commonly used, following Chen we
should really distinguish between an entity and an entity-type. An entity-type is acategory. An entity, strictly speaking, is an instance of a given entity-type. There
are usually many instances of an entity-type. Because the term entity-type is
somewhat cumbersome, most people tend to use the term entity as a synonym for
this term.
Entities can be thought of as nouns. Examples: a computer, an employee, a song,
a mathematical theorem.
A relationship captures how two or more entities are related to one another.
Relationships can be thought of as verbs, linking two or more nouns. Examples: an
owns relationship between a company and a computer, a supervises relationship
between an employee and a department, a performs relationship between an artist
and a song, a proved relationship between a mathematician and a theorem.
The model's linguistic aspect described above is utilized in the declarativedatabase query language ERROL, which mimics natural language constructs.
Entities and relationships can both have attributes. Examples: an employee entity
might have a Social Security Number (SSN) attribute; the proved relationship may
have a date attribute.
Every entity (unless it is a weak entity) must have a minimal set of uniquely
identifying attributes, which is called the entity's primary key.
Entity-relationship diagrams don't show single entities or single instances of
relations. Rather, they show entity sets and relationship sets. Example: a particular
song is an entity. The collection of all songs in a database is an entity set. The
-
7/31/2019 Project Report on ER2SQL
9/46
eaten relationship between a child and her lunch is a single relationship. The set of
all such child-lunch relationships in a database is a relationship set. In other words,
a relationship set corresponds to a relation in mathematics, while a relationship
corresponds to a member of the relation.
-
7/31/2019 Project Report on ER2SQL
10/46
Chapter 2
LITERATURELITERATURE SURVEY SURVEY
-
7/31/2019 Project Report on ER2SQL
11/46
Literature Survey
The Exiting System provides facilities only for drawing ER diagram,
where you can draw ER diagram and can save in an image format. It
doesn't provide way to create whole designed database directly in
Database.
Existing System to Design ER Model
1. MySQL Workbench
MySQL Workbench is a visual database design tool that integrates SQLdevelopment, administration, database design, creation and maintenance
into a single, seamless environment for the MySQL database system. It is
the successor to DBDesigner 4 from fabFORCE.net, and replaces the
previous package of software, MySQL GUI Tools Bundle.
Features:
SQL Editor
Schema Object browsing
SQL Syntax Highlighter and Statement Parser
Multiple-, editable Result Sets
SQL Snippets Collections
SSH Connection Tunneling
Unicode Support
Data Modeling
ER Diagramming
Drag'n'Drop visual modeling
-
7/31/2019 Project Report on ER2SQL
12/46
Reverse Engineering from SQL Scripts and Live Database
Forward Engineering to SQL Scripts and Live Database
Schema Synchronization
Printing of Models Import from fabFORCE.net DBDesigner4
2. Microsoft Visio
Microsoft Visio marketed as Microsoft Office Visio , is a
diagramming program for Microsoft Windows that uses vector graphics to
create diagrams.
3. ER/Studio
ER/Studio is data architecture and database design software
developed by Embarcadero Technologies. It works across multiple
database platforms and is used by data architects, data modelers,
database administrators and business analysts to create and manage
database designs, document and reuse data assets.
Feature:
Logical and physical design support
XML Schema generation from either the logical or physical models
Automation and scripting support
Forward- and reverse- engineering
Automated database code generation Integration of models and metadata
Collaboration support including sub model management, repository, where
used
Web publishing, RTF, MS Office integration
-
7/31/2019 Project Report on ER2SQL
13/46
Integrate model metadata with other platforms such as BI, ETL, and other
modeling tools.
Data lineage documentation
Dimensional modeling Model completion validation
Automatic foreign key migration
Capacity planning
-
7/31/2019 Project Report on ER2SQL
14/46
Chapter 3
PROBLEMPROBLEM
DEFINITIONDEFINITION
-
7/31/2019 Project Report on ER2SQL
15/46
While drawing the ER diagram, existing tool will not suggest user for
maintaining proper relationship between entities. This is a new tool which
generates tables from E-R diagram and enables users to perform basic as well asadvanced queries. The existing tool does not provide the editing facilities like
copy, paste, delete, move, and resize the shaper from the ER diagram. Whereas our
new tool provides all these facilities. From the ER diagram user can not generates
the JPEG image and XML can be generated, but we can generate these by using
this tool User can draw but can not modify the ER diagram if ER diagram can be
stored to users disk with some specific file extension, but our tool can modify this.
With the help of these tool, we can work on Extended ER diagram and also draw
any UML diagram of our choice using provided interface. It is easy to understand
how to create database statements or SQL queries and to create good code quickly.
There is no need of DBA for each group. Working and evaluating the data requires
less time. Helps in managing the frequent data changes which negatively affect our
work environments. It is easy and simple to view and verify the correct data from a
current or an older legacy database. It is the user friendly tool where user can
simply draw and modify the ER diagram.
-
7/31/2019 Project Report on ER2SQL
16/46
Chapter 4
HARDWARE &HARDWARE & SOFTWARESOFTWARE
REQUIREMENTREQ UIREMENT
-
7/31/2019 Project Report on ER2SQL
17/46
Hardware and Software requirements
Hardware:
1. Processor: Pentium 4.
2. RAM: 512 MB or more.
3. Hard disk: 16 GB or more.
Software:
1. Netbeans 6.1
2. JDK 1.6 and above.
3. MySQL
-
7/31/2019 Project Report on ER2SQL
18/46
Chapter 5
PLANNING ANDPLANNING AND ESTIMATIONESTIMATION
-
7/31/2019 Project Report on ER2SQL
19/46
Software development Life Cycle
The entire project spanned for duration of 6 months. In order to effectively
design and develop a cost-effective model the Waterfall model was practiced.
Requirement gathering and Analysis phase:
This phase started at the beginning of our project, we had formed groups and
modularized the project. Important points of consideration were
1 Define and visualize all the objectives clearly.
2 Gather requirements and evaluate them.
-
7/31/2019 Project Report on ER2SQL
20/46
3 Consider the technical requirements needed and then collect technical
specifications of various peripheral components (Hardware) required.
4 Analyze the coding languages needed for the project.
5 Define coding strategies.6 Analyze future risks / problems.
7 Define strategies to avoid this risks else define alternate solutions to this
risks.
8 Check financial feasibility.
9 Define Gantt charts and assign time span for each phase.
By studying the project extensively we developed a Gantt chart to track and
schedule the project. Below is the Gantt chart of our project.
Time Line
-
7/31/2019 Project Report on ER2SQL
21/46
Cost Estimation
-
7/31/2019 Project Report on ER2SQL
22/46
Cost estimation is done using cocomo model
cost Drivers
RatingsVeryLow Low
Nominal High
VeryHigh
ExtraHigh
Product attributesRequired software reliability 0.75 0.88 1.00 1.15 1.40Size of application database 0.94 1.00 1.08 1.16Complexity of the product 0.70 0.85 1.00 1.15 1.30 1.65Hardware attributesRun-time performance constraints 1.00 1.11 1.30 1.66Memory constraints 1.00 1.06 1.21 1.56Volatility of the virtual machine environment 0.87 1.00 1.15 1.30
Required turnabout time 0.87 1.00 1.07 1.15Personnel attributesAnalyst capability 1.46 1.19 1.00 0.86 0.71Applications experience 1.29 1.13 1.00 0.91 0.82Software engineer capability 1.42 1.17 1.00 0.86 0.70Virtual machine experience 1.21 1.10 1.00 0.90Programming language experience 1.14 1.07 1.00 0.95Project attributesUse of software tools 1.24 1.10 1.00 0.91 0.82Application of software engineering methods 1.24 1.10 1.00 0.91 0.83
Required development schedule 1.23 1.08 1.00 1.04 1.10
-
7/31/2019 Project Report on ER2SQL
23/46
The Intermediate Cocomo formula now takes the form:
E= a i (KLoC) (b i ).EAF
Using above calculation we found that
The total time period of the project is around 6 months, the per month cost comes out to beRs.12,000 , so the total comes to be Rs.72,000
-
7/31/2019 Project Report on ER2SQL
24/46
Chapter 6
ALGORITHM ALGORITHM
This project is divided into three parts:
1. Drawing Entity relationship diagram
-
7/31/2019 Project Report on ER2SQL
25/46
2. Generate database tables and SQL queries3. Generate Form for data entry.3. Generate XML document
Drawing entity relationship diagram:
The visual representation of all data stored in a system and their relationships is called the entity relationship diagram.There are four main components in ERD:1) Entities, which are represented by rectangles.2) Relationships, which are represented by diamond shapes.3) Attributes, which are represented by oval shape.4)Connecting lines, solid lines that connect an entity to a
relationship.
Generate database tables and SQL queries:
Setup the database connection.Using that connection we will configure the list to display availabletables in databaseAfter selecting the table we will display columns to be added in thequery.Then we will select type of query to be executed: select, insert,update, or delete or user can write his own query.After selecting the columns and comparison condition we willexecute the query.
Generate Form for data entry:
Generate forms for every table & relation with data connectivity.
Generate XML document:
-
7/31/2019 Project Report on ER2SQL
26/46
Generates XML documents in their string or DOM representations.We will use a XML parser to generate XML document from the
generated tables of E-R diagram.In Java, DocumentBuilderFactory class is used to obtain a parser
that produces DOM object trees from XML documents.
-
7/31/2019 Project Report on ER2SQL
27/46
Chapter 7
IMPLEMENTATIONIMPLEMENTATION
DESIGNDESIGN
-
7/31/2019 Project Report on ER2SQL
28/46
DESIGN
System ArchitectureSystem Architecture
-
7/31/2019 Project Report on ER2SQL
29/46
FlowchartFlowchart
-
7/31/2019 Project Report on ER2SQL
30/46
DFDDFD
-
7/31/2019 Project Report on ER2SQL
31/46
Testing
Software testing methods are traditionally divided into black box testing andwhite box testing . These two approaches are used to describe the point of viewthat a test engineer takes when designing test cases.
Black box testing
Black box testing treats the software as a "black box"without any knowledge
of internal implementation. Black box testing methods include: equivalence partitioning, boundary value analysis, all-pairs testing, fuzz testing, model- based testing, traceability matrix, exploratory testing and specification-basedtesting.
Specification-based testing : Specification-based testing aims to test the functionality of
software according to the applicable requirements. Thus, the tester inputs data into, and
only sees the output from, the test object. This level of testing usually requires thorough
test cases to be provided to the tester, who then can simply verify that for a given input, the
output value (or behavior), either "is" or "is not" the same as the expected value specified
in the test case.
Specification-based testing is necessary, but it is insufficient to guard against certain risks.
Advantages and disadvantages : The black box tester has no "bonds" with the code, and a
tester's perception is very simple: a code must have bugs. Using the principle, "Ask and you
shall receive," black box testers find bugs where programmers do not. But, on the other
http://en.wikipedia.org/wiki/White_box_testinghttp://en.wikipedia.org/wiki/Black_box_testinghttp://en.wikipedia.org/wiki/White_box_testinghttp://en.wikipedia.org/wiki/Black_box_testing -
7/31/2019 Project Report on ER2SQL
32/46
hand, black box testing has been said to be "like a walk in a dark labyrinth without a
flashlight," because the tester doesn't know how the software being tested was actually
constructed. As a result, there are situations when (1) a tester writes many test cases to
check something that could have been tested by only one test case, and/or (2) some parts of
the back-end are not tested at all.
Therefore, black box testing has the advantage of "an unaffiliated opinion," on the one hand, and
the disadvantage of "blind exploring," on the other.
ER input function testing
In this testing we will be using ER data with random values , and the read file will be tested to read
the random values . If this testing works then, it proves that our code which can read any format
file.
White box testing
White box testing is when the tester has access to the internal data structures and algorithms
including the code that implement these.
Types of white box testingThe following types of white box testing exist:
API testing (application programming interface) - Testing of the application
using Public and Private APIs
Code coverage - creating tests to satisfy some criteria of code coverage
(e.g., the test designer can create tests to cause all statements in the program to be
executed at least once)
Fault injection methods - improving the coverage of a test by introducing
faults to test code paths
Mutation testing methods
Static testing - White box testing includes all static testing
http://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Code_coveragehttp://en.wikipedia.org/wiki/Fault_injectionhttp://en.wikipedia.org/wiki/Mutation_testinghttp://en.wikipedia.org/wiki/Static_testinghttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Code_coveragehttp://en.wikipedia.org/wiki/Fault_injectionhttp://en.wikipedia.org/wiki/Mutation_testinghttp://en.wikipedia.org/wiki/Static_testing -
7/31/2019 Project Report on ER2SQL
33/46
Code completeness evaluation
White box testing methods can also be used to evaluate the completeness of a test suite that
was created with black box testing methods. This allows the software team to examine
parts of a system that are rarely tested and ensures that the most important function points
have been tested.
Two common forms of code coverage are:
Function coverage , which reports on functions executed
Statement coverage , which reports on the number of lines executed to
complete the test
They both return a code coverage metric , measured as a percentage .
ER white box
In this white box testing, we will be developing various functional modules, like the SQL query
generator function , Loader, XML Creator.
These functional modules will undergo white box testing which will test the functionality Theoutput results will be tested in NetBeans command window.
Grey Box Testing
Grey box testing involves having access to internal data structures and algorithms for purposes of
designing the test cases, but testing at the user, or black-box level. Manipulating input data andformatting output do not qualify as grey box, because the input and output are clearly outside of
the "black-box" that we are calling the system under test. This distinction is particularly important
when conducting integration testing between two modules of code written by two different
developers, where only the interfaces are exposed for test. However, modifying a data repository
does qualify as grey box, as the user would not normally be able to change the data outside of the
http://en.wikipedia.org/wiki/Function_pointshttp://en.wikipedia.org/wiki/Function_pointshttp://en.wikipedia.org/wiki/Code_coveragehttp://en.wikipedia.org/wiki/Software_metrichttp://en.wikipedia.org/wiki/Percentagehttp://en.wikipedia.org/wiki/Percentagehttp://en.wikipedia.org/wiki/Integration_testinghttp://en.wikipedia.org/wiki/Integration_testinghttp://en.wikipedia.org/wiki/Function_pointshttp://en.wikipedia.org/wiki/Code_coveragehttp://en.wikipedia.org/wiki/Software_metrichttp://en.wikipedia.org/wiki/Percentagehttp://en.wikipedia.org/wiki/Integration_testing -
7/31/2019 Project Report on ER2SQL
34/46
system under test. Grey box testing may also include reverse engineering to determine, for
instance, boundary values or error messages.
GA grey box testing Here we will be modifying ER data inorder to integrate it for the grey box testing. Some of the
boundary values conditions will be tested for abnormalities in the ER Data.
Integration Testing
Integration testing is any type of software testing, that seeks to verify the interfaces betweencomponents against a software design. Software components may be integrated in an iterative way
or all together ("big bang"). Normally the former is considered a better practice since it allows
interface issues to be localised more quickly and fixed.
http://en.wikipedia.org/wiki/Reverse_engineering#Reverse_engineering_of_softwarehttp://en.wikipedia.org/wiki/Reverse_engineering#Reverse_engineering_of_softwarehttp://en.wikipedia.org/wiki/Reverse_engineering#Reverse_engineering_of_software -
7/31/2019 Project Report on ER2SQL
35/46
Chapter 8
ADVANTAGESADVANTAGES
-
7/31/2019 Project Report on ER2SQL
36/46
ADVANTAGES:-
1. Easy Drawing ER Diagram2. Relation Model Checker3. Cost effective4. Platform independent.
-
7/31/2019 Project Report on ER2SQL
37/46
Chapter 9APPLICATIONAPPLICATION
-
7/31/2019 Project Report on ER2SQL
38/46
APPLICATION:-
1. Education Institute.2. Companies
3. Database design
-
7/31/2019 Project Report on ER2SQL
39/46
Chapter 10
FUTUREFUTURE
MODIFICATIONSMODIFICATIONS
-
7/31/2019 Project Report on ER2SQL
40/46
FUTURE MODIFICATION
Future work includes creating a EER Drawing tool with Auto suggestion if any
error occur.
-
7/31/2019 Project Report on ER2SQL
41/46
ConclusionConclusion
In this project we are implementing the modules ER tool, SQLgenerator, Query Loader and XML file creator. It provides easy methodsto design and modify ER Diagram and directly implement it in availabledatabase. Records can be fetch in XML format.
-
7/31/2019 Project Report on ER2SQL
42/46
Chapter 11
BIBILIOGRAPHYBIBILIOGRAPHY
-
7/31/2019 Project Report on ER2SQL
43/46
Bibliography
1. Java Complete Reference2. Unleashed Java3. MySQL4. www.wikipedia.org
-
7/31/2019 Project Report on ER2SQL
44/46
Chapter 12
SCREENSHOTSSCREENSHOTS
-
7/31/2019 Project Report on ER2SQL
45/46
Chapter 13
SOURCE CODESOURCE CODE
-
7/31/2019 Project Report on ER2SQL
46/46