Geeks Talk

Prepare for your Next Interview




doubt in sql

This is a discussion on doubt in sql within the SQL forums, part of the Databases category; what is meant by package...


Go Back   Geeks Talk > Databases > SQL

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-28-2008
Banned
 
Join Date: Feb 2008
Location: bangalore
Posts: 32
Thanks: 9
Thanked 2 Times in 2 Posts
jayanth511 is on a distinguished road
doubt in sql

what is meant by package
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-28-2008
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 447
Thanks: 20
Thanked 54 Times in 54 Posts
susarlasireesha is on a distinguished road
Re: doubt in sql

A package is a collection of PL/SQL elements that are "packaged" or grouped together within a special BEGIN-END syntax, a kind of "meta-block."
Reply With Quote
The Following User Says Thank You to susarlasireesha For This Useful Post:
  #3 (permalink)  
Old 02-28-2008
Junior Member
 
Join Date: Jan 2007
Posts: 10
Thanks: 0
Thanked 3 Times in 3 Posts
gssharma_msc is on a distinguished road
Re: doubt in sql

Packages bundle related PL/SQL types, items, and subprograms into one container.

A package usually has a specification and a body, stored separately in the database.

The body fully defines cursors and subprograms, and so implements the specification.
The package itself cannot be called, parameterized, or nested. Still, the format of a package is similar to
that of a subprogram. Once written and compiled, the contents can be shared by many applications.
When you call a packaged PL/SQL construct for the first time, the whole package is loaded into
memory. Thus, later calls to constructs in the same package require no disk input/output (I/O).

You create a package in two parts: first the package specification, and then the package body. Public
package constructs are those that are declared in the package specification and defined in the package
body. Private package constructs are those that are defined solely within the package body.
Reply With Quote
The Following User Says Thank You to gssharma_msc For This Useful Post:
  #4 (permalink)  
Old 02-28-2008
Expert Member
 
Join Date: Sep 2007
Posts: 754
Thanks: 22
Thanked 64 Times in 63 Posts
krishnaindia2007 is on a distinguished road
Re: doubt in sql

A package is a collection of related program objects like procedures, functions, cursors and exceptions.

Main advantages of using packages is
It reduces Disk I/O operations.
Packages grants privileges more efficiently.
Packages supports OOPS features.

The sytax for calling a Package at SQL Prompt is
Exec Package_name.Procedure_name(Parameters)
Reply With Quote
Reply

  Geeks Talk > Databases > SQL


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
a doubt.... Ammu_R PHP 1 08-17-2007 10:51 AM
doubt Santhana KrishnaN C# 3 06-07-2007 11:42 PM
doubt in qtp thejovathich QTP 2 04-30-2007 08:02 AM
doubt reg bug in SRS and FRS venkatsagehill Testing Issues 3 02-19-2007 07:59 AM
Doubt in PHP blenda PHP 1 07-20-2006 12:37 PM


All times are GMT -4. The time now is 07:14 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved