Monday, October 12, 2009

Eclipse 3.5 IDE: Generating an Entity Relational ER Diagram for Postgres with AmaterasERD

If you need to generate an ER diagram for a schema, here is how to do it:

One time install

 

Install AmaterasERD on Eclipse 3.5 (must also do AmaterasUML)

Generate the Diagram

 

Do this each time you want to render a schema:

  • In Eclipse, New->Other->AmaterasERD->ER Diagram
  • Give it a name, make sure dialect is PostgreSQL
  • Settings:
    • JAR file - find the location as directed below
    • Driver, URI, User, Password, Schema as directed below
    • Make sure there are no spaces after the text in each box. It will foul up the works.
  • Click the Load Tables button, you should see a list of your tables
  • Make sure to select the tables in the list box! It will only draw the tables that are selected.
  • Click Finish
  • Right click on your crowded diagram and choose Auto Layout
  • Manually finish moving things around to make it readable.
  • Export the diagram:
    • Right click and choose Save as Image, or
    • Right click, Export->HTML

ems_schema.erd_small

For Reference: PostgreSQL JDBC

 

Above, there were a couple of things you needed to specify for setting up the JDBC.

First, you have to have a JDBC Driver JAR file. If you don’t already have one, you can download one here. Put it in a safe spot on the filesystem, not in a temporary directory. In the JDBC settings dialog, you will need to locate this JAR file.

Second you will need to specify your connection settings. They should be something like for a localhost database:

  • Driver: org.postgresql.Driver
  • DB: mygreatdb
  • URL: jdbc:postgresql:mygreatdb
  • User: myschemauser
  • Password: rockout
  • Schema: public

Thursday, October 8, 2009

Changing the Font Size of the Eclipse IDE Project Explorer on a Ubuntu GNOME system

Just a small tidbit for you guys.

I am an Eclipse user, and have been doing just fine with it. However, I just started working on a project that happened to have VERY long Java classnames. This was a problem because I like having the Eclipse Project Explorer on the left hand side of my screen (the default for the Java perspective). But by placing it there, the long classnames would be too wide to read well.

I decided to shrink the font. I used the Eclipse IDE menu Window->Preferences->General->Appearance->Colors and Fonts dialog. I could shrink my Java editor font, but not the Project Explorer font. Eh. Now what.

eclipseProjectExplorerFont

Google gave me the answer. The Project Explorer font is inherited from the OS font. The downside of this is that you have to change it for your whole OS. The good side is you may want to do this anyway, and just never bothered. :)

Go to System->Preferences->Appearance and click on the Fonts tab. Change the Applications font, which applies to apps like your File Browser and Eclipse.

gnomeFont

Done.

Thursday, October 1, 2009

I would choose Mr. Fast

I don't run a production website. I don't have a pager that goes off if a site is down. And I am not on the hook for making a website download and render as quickly as possible.

But, if I did, I would hire these guys to help:

WebSiteOptimization.com

Why? Because their own site is mighty fast. It shows they know what they are talking about.

One could argue that they succeed with speed by failing at design. True, the site design is pretty bland. But for a firm that promotes itself as web performance experts, I like that approach.

Why am I talking about this?

I have used a few web performance tools in the past, but learned about a new tool tonight via a tweet. It is called, WebPagetest.org. Tempted, I tried it out and found it useful.

It is a free tool, and is supported with embedded ads. Two ads that appeared while I was using it were for other performance monitoring tools. It made me think to see how well those guys perform on their own sites. A quick gauge of street cred.

Surprisingly, the sites didn't do well. I expanded the experiment, and found that most of the sites of vendors in this space are slow to load. Yikes.

Instead of passing judgment, I will simply pass on the results. The numbers indicate page load time in seconds. The first number is for the first request, and the second number is for a refresh (with the advantages of caching).
I know who I'd hire.