browse by category or date

Currently I am reading a book about MS SQL Stored Procedure. I need to read the book as an anticipation that i will be accepted to an Insurance Company. Just to make sure my brain is not rusty :-P. I believe in-order to understand this guide, you need to know the basic Data Creation and Data Modification commands in T-SQL. I will use this posting to share with you what i *roughly* get from the book 🙂

1. What is Stored Procedure?

Stored procedure is a collection of queries/commands encapsulated in a function stored in the database server. The function may receive parameters which later can be used as the paremeters of the queries/commands. More definition.

2. Why Stored Procedure (SP) is useful?

Because SP will encapsulated your queries/commands into a parameterized queries/data definitions/data modifications. Thus you can standardize the exchange of information between the database server and its users. At the same time you will reduce the debugging-time on Application development since all the business logic are stored in the database. SP also able to help you maintaining security by classifying which users are permitted and which users prohibited to call the Stored Procedures.

3. Why we need Stored Procedure (SP) ?

Because we want to achieve result mentioned on number 2. We can achieve this by replacing the Stored Procedure as a library of functions stored outside the database server. But it will hinder the flexibility of type of Application that using the same business logic. For example, the current business application is using Web-based interface; If we want to create a Desktop-based/Smart Client Application we will be using more time to translate the business logic into different programming language/framework. We also will have major headache if we need to upgrade the Application but not the Business Logic.

4. Why we DON’T need Stored Procedure (SP) ?

Because SP is less powerful compared to the programming language that we use on the Web Application/Desktop Application/Smart Client. It also possible that we will locked into only one RDBMS vendor. Thus reducing our flexibility in managing IT budget.

5. When a Stored Procedure is suited Us best?

When you are confident that the current RDBMS will be deployed in your organization long enough compared to the time to develop the stored procedure. Extending the application into multiple platform/programming language is mentioned in your Application’s Development Roadmap.

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

This was an improvement from my previous post. We will slowly scroll the snippets using “Window.setTimeout()” functionality.

The modified code (modification is shown in bold) is as follows:

header.php

var myObject;
var myrules = {
	'.codeclicker' : {
		onclick : function() {
			//alert(this.parentNode.tagName);
			var o = this.parentNode;
			if (o.style.overflow == 'hidden') {
				myObject = this.parentNode;
				o.style.overflow = 'scroll';
				var i = 0;
				var increment = 10;
				var loopNum = 48;
				for (i=1; i<=loopNum; i++){
					window.setTimeout('myObject.style.height=''+increment*i+'px';',increment*i);
				}
				window.setTimeout('myObject.style.height='100%';',i*increment);
			}
			else {
				myObject = this.parentNode;
				o.style.height = '21px';
				//window.setInterval('Collapse()',50);
				o.style.overflow = 'hidden';
			}
		}
	}
};
Behavior.register(myrules);

Smaller value of increment and bigger value of loopNum will increase the smoothness. If you have better/cooler idea please share with us 🙂

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

I was reading Wikipedia on social bookmarking which lead me to this social-bookmarking-button-generator. It’s really useful so I use it immediately. After selecting all website, I download the zipped file. I extract and upload the images to the server (at “/images” folder) and then i modify ‘single.php’ by copy-paste and modify the content into

single.php

<?php
	$current_url = 'http://'.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
	$current_url = str_replace(":", "%3A", $current_url);
	$current_url = str_replace("/", "%2F", $current_url);
	$current_url = str_replace("&", "%26", $current_url);
	$current_title = urlencode(the_title("","",FALSE));
?>

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href='http://digg.com/submit?phase=2&url=<?php 
echo $current_url; ?>&title=<?php  echo $current_title; ?>' target='_self'>
<img border='0' src='/images/digg.png?x73452' alt='Digg This' title='Digg This' /></a></td>

<td><a href='http://del.icio.us/post?url=<?php echo $current_url; ?>&title=<?php 
echo $current_title; ?>' target='_self'><img border='0' 
src='/images/delicious.png?x73452' alt='del.icio.us' title='del.icio.us' /></a></td>

<td><a href='http://reddit.com/submit?url=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' 
 target='_self'><img border='0' src='/images/reddit.png?x73452' alt='Reddit' title='Reddit' /></a></td>

<td><a href='http://www.spurl.net/spurl.php?url=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/spurl.png?x73452' alt='Spurl' title='Spurl' /></a></td>

<td><a href='http://www.furl.net/storeIt.jsp?u=<?php 
 echo $current_url; ?>&t=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/furl.png?x73452' alt='Furl' title='Furl' /></a></td>

<td><a href='http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url=<?php 
echo $current_url; ?>&Title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/blinklist.png?x73452' alt='BlinkList' title='BlinkList' /></a></td>

<td><a href='http://ma.gnolia.com/bookmarklet/add?url=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/magnolia.png?x73452' alt='ma.gnolia.com' title='ma.gnolia.com' /></a></td>

<td><a href='http://www.newsvine.com/_tools/seed&save?u=<?php 
echo $current_url; ?>&h=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/newsvine.png?x73452' alt='Newsvine' title='Newsvine' /></a></td>

<td><a href='http://www.simpy.com/simpy/LinkAdd.do?href=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/simpy.png?x73452' alt='Simpy' title='Simpy' /></a></td>

<td><a href='http://technorati.com/faves?add=<?php 
echo $current_url; ?>' target='_self'><img border='0' src='/images/technorati.png?x73452' 
alt='Technorati' title='Technorati' /></a></td>

<td><a href='http://cgi.fark.com/cgi/fark/edit.pl?new_url=<?php 
 echo $current_url; ?>&new_comment=<?php echo $current_title; 
?>&linktype=Misc' target='_self'><img border='0' src='/images/fark.png?x73452' alt='Fark' 
title='Fark' /></a></td>

<td><a href='http://www.blinkbits.com/bookmarklets/save.php?v=1&source_url=<?php
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
lt;img border='0' src='/images/blinkbits.png?x73452' alt='Blinkbits' title='Blinkbits' /></a></td>

<td><a href='http://tailrank.com/share/?text=&link_href=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/tailrank.png?x73452' alt='TailRank' title='TailRank' /></a></td>

<td><a href='http://www.netvouz.com/action/submitBookmark?url=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>&description=<?php 
echo $current_title; ?>' target='_self'><img border='0' src='/images/netvouz.png?x73452' 
alt='Netvouz' title='Netvouz' /></a></td>

<td><a href='http://www.mister-wong.de/index.php?action=addurl&bm_url=<?php
echo $current_url; ?>' target='_self'><img border='0' src='/images/mrwong.png?x73452' 
alt='Mr. Wong' title='Mr. Wong' /></a></td>

<td><a href='http://myweb2.search.yahoo.com/myresults/bookmarklet?u=<?php 
echo $current_url; ?>&t=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/yahoomyweb.png?x73452' alt='YahooMyWeb' title='YahooMyWeb' /></a></td>

<td><a href='http://blogmarks.net/my/new.php?mini=1&simple=1&url=<?php 
echo $current_url; ?>&title=<?php echo $current_title; ?>' target='_self'>
<img border='0' src='/images/blogmarks.png?x73452' alt='Blogmarks' title='Blogmarks' /></a></td>

</tr>
</table>

Have fun with yours =)

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: