RSS

Interesting Movies and Documentaries on Finance

Dear Friends,
Today I am sharing few movies and documentaries on Finance. The videos are mostly relevant to the financial crisis of 2008.

Movies:
1. Wall Street (1987):

2. Wall Street: Money Never Sleeps (2010):

3. Margin Call (2011)
This is one of my favorite movie, it focuses on the days just before the 2008 financial crisis and how the events unfolded which led to the markets to crash.

4. The Wolf of Wallstreet (2013)

5. Moneyball (2011)

Documentaries:
1. Enron: The Smartest guys in the Room (2005)

2. The Ascent of Money (2008)
This is a very good documentary, which was telecasted on BBC. The documentary shows the evolution of money from beginning till the financial crisis of 2008.

3. Floored (2009)

4. Inside Job (2010)
This is again a documentary on the financial crisis of 2008 which analyses the cause and effect of the crisis.

Hope you enjoy the movies and documentaries. Feel free to add more to this list by commenting on this post.

Cheers!
Vijay

 
 

Tags: , , , , , , ,

Chasing the Monsoon

11th July 2014 and 12th July 2014

This was the title of “Rail Bandhu” – The on-board magazine from Indian Railways, on my maiden train journey from New Delhi to Cuttack, Odisha.

In the first half of my journey the adage “Do not judge the book by its cover” felt so true. I did not bother to open the book.

In the second half of the my journey, when the train entered Odisha state. I was awestruck to notice the two extremes of the weather which existed in India. Such is the vastness of India.

I started my journey from a place where people were praying to Lord Indra to show some mercy and my journey ended where monsoon was at its full glory. It appeared that Lord Indra (The Rain God) showed special interest in this part of the world :). There was relentless rainfall occasionally accompanied by thunderstorm and lightening. I had to pray for the rain to stop so that I can carry my luggage comfortable to my to-be home for the next two years. I was on my way to Sri Sri University, Cuttack, Odisha for admission to two years full-time MBA program in General Management.

Finally, I decided to turn the pages of the on-board magazine titled – “Chasing the Monsoon”. It showed glimpses of the natures beauty during the Monsoon in different parts of India. It also showcased the new SMS alert system introduced/proposed by the Indian Railways in Railway budget 2014. This will keep the Indian Railway passengers updated about the ticket status, arrival time and departure time of trains on/from platform.

Below are some snaps I captured on my way from Cuttack station to the University Campus.

Chasing Monsoon - Click 1

Cuttack, Odisha – On my way to Sri Sri University Campus

Cuttack, Odisha - On my way to Sri Sri University Campus

Cuttack, Odisha – On my way to Sri Sri University Campus

Chasing the Monsoon - Godi Sahi, Cuttack, Orissa

Chasing the Monsoon – Godi Sahi, Cuttack, Orissa

At the end of my journey, I concluded that Lord Indra is a smart manager who always keeps himself in demand.

Cheers!
Vijay

 
Leave a comment

Posted by on 13 July, 2014 in General, MBA at SSU

 

Tags: , , , , , , ,

Happy Holi 2014!

I take this opportunity to wish all my readers a very Happy Holi. I wish that this holi brings all the happiness and joy in your life and your soul is painted with all the beautiful colors.

Happy Holi 2014

For those readers who are interested in knowing about Holi here is link to my post from last year.

Cheers!
Vijay

 
Leave a comment

Posted by on 17 March, 2014 in Entertainment, General

 

Tags: ,

Best Practices for Oracle Developers: Comments

CommentsComments are text embedded within SQL statements and PL/SQL code which describes the purpose of the code. Comments improve the readability, usability and maintenance of the code. Proper comment and formatting can save lot of hours of unproductive work for developers and teams.

Oracle developers can use two types of comments – In Line and Multiline. Both Inline and Multiline comments can be used in SQL statements and PL/SQL.

In-Line comments starts with — (two hyphens) and is only limited to one line.
Multiline comments start with /* and ends with */ and spans multiple lines.

Oracle uses following comment styles for its standard scripts (scripts under – $oracle_home/rdbms/admin directory) which are shipped with oracle database.

--
-- Copyright (c) Oracle Corporation 1988, 1999.  All Rights Reserved.
--
--  NAME
--    demobld.sql
--
-- DESCRIPTION
--   This script creates the SQL*Plus demonstration tables in the
--   current schema.  It should be STARTed by each user wishing to
--   access the tables.  To remove the tables use the demodrop.sql
--   script.
--
--  USAGE
--       SQL> START demobld.sql
--
--

In many oracle shipped sql scripts you will see REM commands (REMARK command). This can also be used to enhance the readability and maintenance of the sql scripts. A sample snippet from the mksample.sql is shown below:

Rem
Rem $Header: mksample.sql.sbs 02-apr-2003.14:55:17 $
Rem
Rem mksample.sql
Rem
Rem Copyright (c) 2001, 2003, Oracle Corporation. All rights reserved. 
Rem
Rem NAME
Rem mksample.sql - creates all 5 Sample Schemas
Rem
Rem DESCRIPTION
Rem This script rees and creates all Schemas belonging
Rem to the Oracle Database 10g Sample Schemas.
Rem If you are unsure about the prerequisites for the Sample Schemas,
Rem please use the Database Configuration Assistant DBCA to
Rem configure the Sample Schemas.
Rem
Rem NOTES
Rem - OUI instantiates this script during install and saves it
Rem as mksample.sql. The instantiated scripts matches
Rem the directory structure on your system
Rem - Tablespace EXAMPLE created with:
Rem CREATE TABLESPACE example 
Rem NOLOGGING 
Rem DATAFILE '<filename>' SIZE 150M REUSE 
Rem AUTOEXTEND ON NEXT 640k
Rem MAXSIZE UNLIMITED
Rem EXTENT MANAGEMENT LOCAL
Rem SEGMENT SPACE MANAGEMENT AUTO;

In my PL/SQL programs I use multi-line comment style like below:

/************************************************************************
** Purpose: Script to demonstrate the top 10 features in Oracle 12c for developers
** Date: 1st Feb 2014, Saturday
** Author: Vijay Mahawar
** Website: http://www.mahawar.net/blog
** Version: 1.0
*************************************************************************/

Oracle allows to store comments even for schema objects like table and views and on columns of table, views and materialized views. These comments provide useful information about the table and columns to other developers.

To insert an explanatory remark on the notes column of the EMP table, you might issue the following statement:

COMMENT ON COLUMN EMP.EMPNO IS 'Employee Number assigned to Employees';

The comments defined in this way are stored in data dictionary views.

Object comments are stored in USER_TAB_COMMENTS

Column comments are stored in USER_COL_COMMENTS

To drop this comment from the database, issue the following statement:

COMMENT ON COLUMN EMP.EMPNO IS '';

Please use setup scripts and demo script script for this.

Note: Few minutes spent on proper comments can save hours of efforts in code maintenance and debug.

Cheers!
Vijay

 
Leave a comment

Posted by on 1 March, 2014 in Oracle, PL/SQL

 

Tags: , , , , , ,

Best Practices for Oracle Developers and DBAs

Best Practices for Oracle Developers and DBAThere has been paradigm shift in the technological and scientific innovations that are happening around us. From First generation Vaccum Tubes to Latest generation of Nanotechnology, From Machine Language to High Level Programming Language, Technological innovation has made the computing devices – cheaper, faster, smaller.

The communication between the devices has seen a phenomenal growth. The volume of data produced by all this is rising exponentially. Today technology touches human lives more than ever before.

With all the technological and scientific progress happening around us we have kept our rich cultural heritage and values intact. We as humans are evolving so is the Oracle Database Product.

Over the years there have been several Oracle Database releases and version upgrades. What has remained mostly same are the best practices.

Here is the list of best practices which you can expect in my next few blog posts.

SQL and PL/SQL:

  1. Comments – In Line and Multi Line
  2. Replace Hard coded literals with Constants and move all related constants into a common package.
  3. Modular Approach – Split big program into generic and standalone sub-programs.
  4. Instrumentation whereever possible – ON/OFF as required.
  5. Achieve as much as poosible with SQL, to avoid context switching between SQL and PLSQLengine.
  6. Exception Handling – Try to handle all possible exceptions
  7. Avoid “Select * from”, Use fully qualified names when selecting from multiple tables
  8. Mention AUTHID clause, BEQUEATH clause,
  9. Avoid default Oracle implicit type conversion.
  10. Use %ROWTYPE for record types and %TYPE for variables. Avoid hardcoding VARCHAR2 length.
  11. Exit the program gracefully. Make sure to free up resources and memory before exiting.
  12. Familiarize with in-built oracle packages – Don’t write routine which is already provided by oracle.
  13. Show user, con_id – set timing on and many more, use spool in SQL scripts
  14. Ensure that the rollback scripts are ready.
  15. Compile objects in the order of precedene.
  16. Ensure you use paranthesis in expressions to override the default precedence order.
  17. Start with the data model and then proceed with the coding for complex SQL queries.
  18. Maintain test scripts/harness to test the logic and test performance.
  19. Use GET and SET to modify package variables.
  20. Use NOCOPY to copy variables by reference for performance benefits.
  21. Use control tables to make the code customized and generic.

DBA:

  1. Group related privileges and grant it to a role for better manageability.
  2. Lock all unused user accounts and change default passwords for all default accounts
  3. Use seperate disks for system, sysaux; application data and Index tablespaces for better performance.
  4. Use comments whenever a parameter is changed – Record – date, time and changed by.
  5. Use seperate disks for multiplexed redo logs files in same redo log groups.
  6. Gather statistics using DBMS_STATS after BULK DML on tables and partitions.
  7. Schedule the housekeeping jobs to runs during off peak time.
  8. Keep oracle documents and useful links ready and handy for reference just like a bible.

In my next few blog posts, I shall showcase some of the best practices both for Developers and DBAs with the help of demo scripts.

Conclusion:

This list is not complete and is ever evolving. It is outcome of my years of association with Oracle technology and the learnings I had taken from Oracle pundits. Its kind of survival kit for both Developers and DBAs.

Cheers!
Vijay

 
Leave a comment

Posted by on 23 February, 2014 in DBA, Oracle, PL/SQL

 

Tags:

 
Follow

Get every new post delivered to your Inbox.

Join 97 other followers

%d bloggers like this: