PostgreSQL cheat sheet

\l (lowercase L)list all databases
\cuse database
\dtshow tables
\dTlist datatypes
\dflist functions
\dilist indexes
\dvlist views
\dulist users
\d+show all tables with descriptions
\d+ tableshow table definition or view definition with column descriptions

Altering a table

Renaming a table

MySQL cheat sheet

Selecting a database:

mysql> USE database;

Listing databases:


Listing tables in a db:


Describing the format of a table:

mysql> DESCRIBE table;

Creating a database:

mysql> CREATE DATABASE db_name;

Creating a table:

mysql> CREATE TABLE table_name (field1_name TYPE(SIZE), field2_name TYPE(SIZE)); Ex: mysql> CREATE TABLE pet (name VARCHAR(20), sex CHAR(1), birth DATE);

HTML5 form input types

HTML5 offers many new input types which were not available in previous versions. Smart phones and tablets have limited screen real estate and the interfaces need to be sensitive to touch which requires more space than a mouse pointer. These interfaces require users to switch between keyboards to input characters. HTML5 forms allow web designers to make their sites more user-friendly by offering preselected keyboard such as a date picker for date field, @ and . symbols in the keyboard for emails, and numeric keyboard for numbers.

Neat Microsoft Windows keyboard shortcuts

Microsoft Windows offer many simple keyboard shortcuts. If you use computer as much as I do, you would find that these commands are easy to remember and simplify life a little bit. The symbol + in the table means that you have to press those keys together. win is the windows button just to the right of ctrl with Microsoft Windows logo. The keys are typed in CAPS to increase readability e.g. one and the letter can be confusing is lowercase but not when L is written in uppercase. The commands are NOT case sensitive.


Quick Summary of Java Technologies

The following is a very quick and brief summary of Java technologies with links to more information.


Java is an object-oriented programming language.

Java SE

Java SE or standard edition provides API for desktop applications.

Java EE

Java EE or enterprise edition provides API provided in Java SE and also provides API for client server and remote messaging operations.

Java Servlets

Java servlets are server-side programs that handle client requests and return dynamic responses.