Tuesday, May 17, 2011

Tuesday, May 10, 2011

Google Chrome Frame

Google made a plugin for IE which allows to use google chrome in IE. You can install this within IE without needing admin access. You can read more here.

To get chrome frame visit google code site.

Sunday, May 1, 2011

How to remove unused packages

To remove all unused packages use this command:

sudo apt-get autoremove

Saturday, March 26, 2011

Wednesday, March 23, 2011

chmod command

To change permissions on a UNIX file or directory, use the chmod command.

chmod category+permissions filename

Gives read, write and execute permission:

chmod +r file
chmod +w file
chmod +x file

Saturday, March 12, 2011

Google styleguide

Google defined style guides how to write code. It covers C++, JavaScript, Python, Object-C languages and XML.

You can read more on google-styleguide website.

Wednesday, March 9, 2011

Essential database naming conventions

There are a few simple rules that i use for naming database objects (including the name of the database itself).

General
  • User lowercase characters. Eliminates question of proper case as well as errors related to case-sensitivity and speeds typing rate and accuracy.
  • Separate words and prefixes with underlines, never use spaces. Promotes readability and offers greater platform independence. Avoid having to bracket names (e.g. [book name] or "book name").
  • Do not use dashes in database names.
  • Avoid using numbers.


Database name

[system name]_[customer or purpose]



Table name

[schema].[table name]
  • Give tables singular names, never plural.
  • Use schema - it allows to group database tables.


Field name

[field name]
  • The primary key should be the singular form of the table name suffixed with '_id'.


Primary key name

pk_[table name]
  • Always use the 'pk_' prefix for primary key name.


Index name

ix_[table name]_[index field names]

  • Always use the 'ix_' prefix for index name.


Foreign key name

fk_[table name]_[foreign key field names]

  • Always use the 'fk_' prefix for index name.

Database example


I added a simple database diagram which has three tables: 'person', 'organisation' and 'account' and it has two namespaces: 'demographic' and 'identification'. Person has relationship with organisation.