Tech Titbits

August 22, 2008

Working with Database..

Filed under: Do's and Dont's — Mahesh Tabib @ 8:33 pm

Working with Database is something I am yet to explore. It’s always good to learn basics before you get into details. Here are few best practices/do’s and don’ts while creating database:

· Chose the most appropriate data type while creating the table.
· Create appropriate constraints wherever applicable while creating the table.
· Use SQL loader to import data from some other data source wherever possible.
· Always use anchored declaration while creating stored procedures and functions.
· Carefully select the control structures.
· Wherever applicable use bind variables.
· Create appropriate triggers to implement business logic.
· Always store the scripts in the text files.
· Declare appropriate mode for variables in stored procedures and functions.
· The input and output parameters datatype should be SQL compatible while creating stored functions.
· Always handle errors using exception handling construct wherever applicable.

Though I haven’t got time to dig into details of creating a database, I think this stuff will be somewhat useful.

Advertisement

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.