Skip to content

Commit f86f14b

Browse files
author
pjkaufman
committed
Updated README, added images to the repository, and fixed some typos in routines.py
1 parent 6a9ca36 commit f86f14b

38 files changed

Lines changed: 201 additions & 87 deletions

README.md

Lines changed: 145 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,177 @@
1-
# Java_DiffChecker [![Repo Size](https://reposs.herokuapp.com/?path=pjkaufman/Java_DiffChecker)](https://github.com/pjkaufman/Java_DiffChecker) [![Current Issues](https://img.shields.io/github/issues/pjkaufman/Java_DiffChecker.svg)](https://github.com/pjkaufman/Java_DiffChecker/issues) [![License](https://img.shields.io/github/license/pjkaufman/Java_DiffChecker.svg)](https://github.com/pjkaufman/Java_DiffChecker/blob/master/LICENSE)
1+
# Database Difference Checker - Database Updater [![Current Issues](https://img.shields.io/github/issues/pjkaufman/Java_DiffChecker.svg)](https://github.com/pjkaufman/Java_DiffChecker/issues) [![License](https://img.shields.io/github/license/pjkaufman/Java_DiffChecker.svg)](https://github.com/pjkaufman/Java_DiffChecker/blob/master/LICENSE)
22
###### By Peter Kaufman
33

44
## Description
55

6-
Java_DiffChecker is a Java program compares MySQL databases and generates the SQL statements that are needed to make the two databases the same. The SQL statements can then be run or just copied to review later.
7-
8-
## Table of Contents
9-
10-
- [Installation](https://github.com/pjkaufman/Java_DiffChecker#installation)
11-
- [Usage](https://github.com/pjkaufman/Java_DiffChecker#usage)
12-
- [Documentation](https://github.com/pjkaufman/Java_DiffChecker#documentation)
13-
- [License](https://github.com/pjkaufman/Java_DiffChecker#license)
14-
15-
## Installation
6+
Compares MySQL databases and generates the SQL statements that are needed to make the two databases the same. The SQL statements can then be run or just copied to review or run later.
7+
8+
<h2 id="table_of_contents">Table of Contents<h2>
9+
10+
<ul>
11+
<li>
12+
<a href="#installation">Installation</a>
13+
</li>
14+
<li>
15+
<a href="#features">Features</a>
16+
</li>
17+
<li>
18+
<a href="#usage">Usage</a>
19+
</li>
20+
<li>
21+
<a href="#documentation">Documentation</a>
22+
</li>
23+
<li>
24+
<a href="#license">License</a>
25+
</li>
26+
</ul>
27+
28+
<h2 id="installation"> Installation </h2>
1629

1730
### Dependencies
1831

19-
1. [Java](https://java.com/en/download/)
20-
2. [Python 2.7](https://www.python.org/downloads/)
21-
3. Some kind of hosting service hosting your MySQL databse such as [WAMP](http://wampserver.aviatechno.net/).
32+
<ol>
33+
<li>
34+
<a href="https://java.com/en/download/">Java</a>
35+
</li>
36+
<li>
37+
<a href="https://www.python.org/downloads/">Python 2.7</a>
38+
</li>
39+
<li>
40+
Some kind of hosting service for MySQL such as <a href="http://wampserver.aviatechno.net/">WAMP</a>
41+
</li>
42+
</ol>
2243

2344
_Note: the python scripts have only been tested in Python 2.7_
2445

2546
Clone this repo by running `git clone https://github.com/pjkaufman/Java_DiffChecker.git`.
2647

2748
Make sure that Python and the jre paths have been added to your PATH variable.
2849

29-
## Usage
30-
31-
Go to the python folder and run `python routines.py`.
32-
33-
There will be several options which include 'run' and 'debug'.
50+
<a href="#table_of_contents">Back to Table of Contents</a>
51+
52+
<h2 id="features">Features</h2>
53+
54+
<ol>
55+
<li>
56+
Two Connection Database Comparison
57+
<p>This type of database comparison connects to two databases and compares them yeilding the SQL statements to make them the same.</p>
58+
<p>When this option is selected in the application it will take you to the following screen:
59+
<center>
60+
<img src="UserGuides\images\twoDBComparison.png" alt="Two Database Comparison Screen" height = "300"/>
61+
</center>
62+
Fill out each of the needed fields and click Compare. <br>
63+
<i>Note: the default port for MYSQL is 3306 and that the development database information goes on the LEFT and the live database information goes on the RIGHT</i>
64+
</p>
65+
</li>
66+
<li>
67+
One Connection Database Comparison
68+
<p>This type of database comparison connects to one database and uses a serialized file to compare them yeilding the SQL statements to make them the same.</p>
69+
<p>When this option is selected in the application it will take you to the following screen:
70+
<center>
71+
<img src="UserGuides\images\oneDBComparison.png" alt="One Database Comparison Screen" height = "300"/>
72+
</center>
73+
Fill out each of the needed fields and click Compare. <br>
74+
<i>Note: the default port for MYSQL is 3306 and that the development database is the serialized database</i>
75+
</p>
76+
</li>
77+
<li>
78+
Database Snapshot
79+
<p>A database snapshot is where a "copy" of the schema structure for the database is written to a serialized file for later use. It stores information such as tables, indexes, views, columns, and other pertinent data for database comparisons.</p>
80+
<p>When this option is selected in the application it will take you to the following screen:
81+
<center>
82+
<img src="UserGuides\images\takeDBSnapshot.png" alt="Database Snapshot Screen" height = "300"/>
83+
</center>
84+
Fill out each of the needed fields and click Snapshot. <br>
85+
<i>Note: the default port for MYSQL is 3306, and this option is for the development database</i>
86+
</p>
87+
</li>
88+
<li>
89+
Review Last Set of SQL Statements
90+
<p>This option allows the user to see the last set of SQL statements that were run.</p>
91+
<p>After selecting this option, you will see something similar to this:
92+
<center>
93+
<img src="UserGuides\images\lastSQLSet.png" alt="Last Set of SQL Statments Generated" height = "300"/>
94+
</center>
95+
</p>
96+
</li>
97+
<li>
98+
Review Logs
99+
<p>The review logs contain information such as stack traces for errors that have occured or how long a database comparison or SQL run took.</p>
100+
<p>After selecting this option, you will see something similar to this:
101+
<center>
102+
<img src="UserGuides\images\runLog.png" alt="Run Logs" height = "300"/>
103+
</center>
104+
</p>
105+
</li>
106+
</ol>
107+
108+
<a href="#table_of_contents">Back to Table of Contents</a>
109+
110+
<h2 id="usage">Usage</h2>
111+
112+
Go to the python folder and run
113+
114+
```
115+
python routines.py
116+
```
117+
118+
You should see
119+
120+
```
121+
Routine Options
122+
run - makes and runs the JAR file
123+
push - commits the current repo and pushes it
124+
debug - runs the current code base for testing
125+
clean - deletes the test and builds directories
126+
Enter desired option:
127+
```
34128

35129
### Running
36130

37-
You can go to the python folder and run `python routines.py`.
131+
When prompted by the script for a routine to run, type 'run'.
38132

39-
When prompted by the script for a routine to run type 'run'.
133+
If there are no errors you will see the following GUI:
40134

41-
Watch the output. If there is an error check to see what the error was. Otherwise the jar file that was created in the build folder will be executed.
135+
<center>
136+
<img src="UserGuides\images\runResult.png" alt="Database Difference Checker Home" height = "300"/>
137+
</center>
42138

43139
### Testing
44140

45-
After modifying any of the Java files in the repository, you can go to the python folder and run `python routines.py`.
141+
After modifying any of the Java files in the repository, you can go to the python folder and run
46142

47-
Enter 'debug' when prompted for a routine to run. This will compile all of the current Java files into the test/db_diff_checker_gui2 folder where it will be run if no errors occur.
143+
```
144+
python routines.py
145+
```
48146

49-
## Documentation
147+
When prompted for the routine to run, enter 'debug'. This will compile all of the current Java files into the test/db_diff_checker_gui folder where it will be run if no errors occur (no JAR file will be created).
148+
149+
<a href="#table_of_contents">Back to Table of Contents</a>
150+
151+
<h2 id="documentation">Documentation</h2>
50152

51153
### How It Works
52154

53-
- [V1.0.0](https://github.com/pjkaufman/Java_DiffChecker/tree/master/pdf/DatabaseDifferenceCheckerReport.pdf)
54-
- [V2.0.0](https://github.com/pjkaufman/Java_DiffChecker/tree/master/pdf/DatabaseDifferenceCheckerReportV2.0.0.pdf)
55-
- [V2.0.1](https://github.com/pjkaufman/Java_DiffChecker/tree/master/pdf/DatabaseDifferenceCheckerReportV2.0.1.pdf)
155+
<ol>
156+
<li>
157+
<a href="UserGuides/pdf/DatabaseDifferenceCheckerReport.pdf">V1.0.0</a>
158+
</li>
159+
<li>
160+
<a href="UserGuides/pdf/DatabaseDifferenceCheckerReportV2.0.0.pdf">V2.0.0</a>
161+
</li>
162+
<li>
163+
<a href="UserGuides/pdf/DatabaseDifferenceCheckerReportV2.0.1.pdf">V2.0.1</a>
164+
</li>
165+
</ol>
56166

57-
### Java Documentation
167+
### Java Documentation/API
58168

59169
Java documentation can be found [here](https://pjkaufman.github.io/Java_DiffChecker/).
60170

61-
## License
171+
<a href="#table_of_contents">Back to Table of Contents</a>
172+
173+
<h2 id="license">License</h2>
174+
175+
<a href="LICENSE">MIT</a>
62176

63-
[MIT](https://github.com/pjkaufman/Java_DiffChecker/blob/master/LICENSE)
177+
<a href="#table_of_contents">Back to Table of Contents</a>

UserGuides/images/lastSQLSet.png

58 KB
Loading
50.5 KB
Loading

UserGuides/images/runLog.png

74.9 KB
Loading

UserGuides/images/runResult.png

118 KB
Loading
49.8 KB
Loading
130 KB
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)