Sunday, October 18, 2015

SchemaSpy to visualise the DB schema design

Are you looking for very simple and lightweight tool that generates ER diagram from commonly used DBs. SchemaSpy tool will help you to understand all the relationships in DB schema. This week blog is about SchemaSpy tool.

About SchemaSpy:
SchemaSpy is a Java-based tool (requires Java 5 or higher) that analyzes the metadata of a schema in a database and generates a visual representation of it in a browser-displayable format. It lets you click through the hierarchy of database tables via child and parent table relationships as represented by both HTML links and entity-relationship diagrams. It's also designed to help resolve the obtuse errors that a database sometimes gives related to failures due to constraints. It’s free.

SchemaSpy uses JDBC's database metadata extraction services to gather the majority of its information, but has to make vendor-specific SQL queries to gather some information such as the SQL associated with a view and the details of check constraints. The differences between vendors have been isolated to configuration files and are extremely limited. Almost all of the vendor-specific SQL is optional.

Browse some sample pages generated by SchemaSpy. Note that this was run against an extremely limited schema so it doesn't show the full power of the tool.

SchemaSpy is a command line tool. If you are interested to work with GUI based tools. Try Its GUI tools using http://www.joachim-uhl.de/projekte/schemaspygui/


Running SchemaSpy

You run SchemaSpy from the command line:
    
java -jar schemaSpy.jar -t dbType -db dbName [-s schema] -u user [-p password] -o outputDir

More details to explore SchemaSpy can be found below:




Happy Learning,
Nanjundan Chinnasamy

Thursday, October 15, 2015

Apache PDFBox - A Java PDF Library

I wanted to share my recent learning on PDF creation using PDFBox Java API. More technical details about this documented below.

The Apache PDFBox library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

Features:

Create PDFs:
 Create a PDF from scratch, with embedded fonts and images.

Signing Digitally:
 Sign PDF files.

Print:
 Print a PDF file using the standard Java printing API.

Preflight:
 Validate PDF files against the PDF/A-1b standard.

Fill Forms:
 Extract data from PDF forms or fill a PDF form.

Split & Merge:
 Split a single PDF into many files or merge multiple PDF files.

Extract Text:
 Extract Unicode text from PDF files. Save as Image Save PDFs as image files, such as PNG or JPEG.

Other alternative frameworks/tools to generate PDF in java:
 iText: nowadays iText is a commercial library, the latest version is not for free anymore.
 FOP: I worked a lot with FOP. It's fairly resource intensive (Java > XML > XSLT > PDF) and complex PDFs become a nightmare ( may result in XSLTs with 20k+ LoC).
 PDFBox: it seems to be the best alternative although I did not work with it in large project.


FOP is much performance optimized solution to create a PDF. It also comes with few limitations like digital signing, split&merge etc. iText and PDFBox offers almost same features from its library. Please be aware that iText is much performance optimized solution compare to PDFBox as the parsing techniques used.


Happy Learning,
Nanjundan Chinnasamy

Wednesday, October 7, 2015

Is the Competency differentiates Hard&Smart Workers?

Simple answer is YES as you all know. But here i want to explain with an example.

I have read through this stories long time back. I think this holds good even today. I though i can share with my readers so that so can understand Indian Managers expectations and work accordingly. In general, to win in a competitive would, only knowledge makes the difference to identify the experienced ones.

Story:
A giant ship engine failed. The ship's owners tried one expert after another, but none of them could figure but how to fix the engine. 

Then they brought in an old man who had been fixing ships since he was a young. He carried a large bag of tools with him, and when he arrived, he immediately went to work. He inspected the engine very carefully, top to bottom. 

Two of the ship's owners were there, watching this man, hoping he would know what to do. After looking things over, the old man reached into his bag and pulled out a small hammer. He gently tapped something. Instantly, the engine lurched into life. He carefully put his hammer away. The engine was fixed! 
A week later, the owners received a bill from the old man for ten thousand dollars. 
"What?!" the owners exclaimed. "He hardly did anything!" 
So they wrote the old man a note saying, "Please send us an itemized bill." 

The man sent a bill that read: 

Tapping with a hammer...... $2.00
Knowing where to tap.......... $9,998.00

Effort is important, but knowing where to make an effort makes all the difference!
I have posted few people management related blogs recently as it is much required to understand and work as a team to win people heart. I am planning to concentrate few core technical blogs in coming days as many personally requested me!

Happy reading.



Nanjundan Chinnasamy

Pega Decisioning Consultant - Mission Test Quiz & Answers

The Pega Certified Decisioning Consultant (PCDC) certification is for professionals participating in the design and development of a Pega ...