Solved

Stored procedure and function

Posted on 2004-04-28
3
142 Views
Last Modified: 2010-03-31
Whats the difference between a 1.Stored procedure and Function
2.String and StringBuffer.
   Is StringBuffer synchronised
3.why we use Triggers?Why can,t we check the condition in the client side itself instead of using triggers?
0
Comment
Question by:jimmyjacob
3 Comments
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 125 total points
Comment Utility
>> 1.Stored procedure and Function
Compare to the similar concepts in e.g. Pascal. A procedure doesn't have to have a return value, and function must.

>> 2.String and StringBuffer.
A String is immutable, i.e. you can't change the value of the String inside. Whenever you do e.g. substring on a String, a new String object is created and returned to you.
A StringBuffer is mutable, so when building strings up from parts, you would want to use a StringBuffer.
StringBuffer is synchronized.

>> 3.why we use Triggers?Why can,t we check the condition in the client side itself instead of using triggers?
It is better (more efficient) to respond to events rather than poll for value changes. A trigger will send an event when a certain condition is met.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now