Information Hiding in pl/sql [message #199073] |
Fri, 20 October 2006 00:30 |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
Hi Friends,
I read that, one of the main features of the package is information hide (i.e we cant see the code ,which is available in package body.... right)
Anyone can explain the concept with some example...
thanx and regards
Selva
|
|
|
Re: Information Hiding in pl/sql [message #199075 is a reply to message #199073] |
Fri, 20 October 2006 00:50 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
You 'hide' the internals from the outside world. The idea is that the outside world only sees the package specification.
Suppose you have a package EMAIL. In it you have a public procedure SEND_MAIL. The outside world sees this procedure, because you declare it in your package specification.
In your package body, you have (besides the code for SEND_MAIL) also a procedure that checks whether the provided email-address is a valid address. This procedure CHECK_ADDRESS is called from the procedure SEND_MAIL and is not in the package specification.
This procedure is said to be hidden from the outside world; there is no way you can call it from anywhere else then from within the package.
|
|
|
|
|
|