Home > Ask the Oracle Experts > Database Design and Architecture Questions & Answers > Anonymous blocks, RDBMS vs. ORDBMS and REF cursors
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Anonymous blocks, RDBMS vs. ORDBMS and REF cursors

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 17 May 2002
1. If we can not refer Anonymous Block, what is the purpose of it?
2. What is difference between RDBMS & ORDBMS?
3. What is the REF cursor?

>
EXPERT RESPONSE

An anonymous block is a block of PL/SQL code that does not belong to a procedure or a function. But it does have uses. I use anonymous blocks all the time when I want to do something quick and dirty from SQL*Plus without going through all the work of making it a procedure or a function. Just type it in and let it run! You may also wish to test your PL/SQL block as an anonymous block before making it a procedure or function. Another thing I use anonymous blocks for is to store it in a script which I'll run later. I don't want it tied to a procedure or function, but I do want it run from the script. In the end, I could accomplish the same thing with a procedure or a function, I just didn't want to create a database object for my purposes.

A RDBMS is a Relational Database Management System. Oracle, MS SQL Server, IBM's DB2 are examples of a RDBMS. MS Access is not a RDBMS. MS Access is just a relational database, but not a management system. The biggest difference is that MS Access does not support the idea of concurrent transactions whereas a true RDBMS does.

An ORDBMS is an Object Relational Database Management System. This type of RDBMS must also support object oriented technologies. Oracle has been an ORDBMS since Oracle version 8. With objects, you are not tied to the supplied datatypes, i.e. NUMBER, DATE, CHAR. You can create your own datatypes and methods to work on those datatypes. For instance, in an ORDBMS, I can create a type called PERSON. This type will have the following attributes: name, age, gender. I can then declare a column in a table to be of type PERSON instead of using three different columns to denote the same thing.

A REF cursor is a way of returning a set of data from a procedure or a function. Typically, a function will return only one value. On occasion, the developer may wish that the function returns a set of rows. A REF cursor facilitates this. For more information, refer to Tom Kyte's article on REF cursors at this link:
http://osi.oracle.com/~tkyte/ResultSets/index.html

For More Information

  • What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
  • The Best Oracle Web Links: tips, tutorials, scripts, and more.
  • Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
  • Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
  • Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Database Design and Architecture
Should we worry about Oracle memory leaks on Windows?
How to disable Oracle constraints and triggers during an import in 10g
How to delete a partition on the F: drive with Oracle on Windows
What could be causing an SQL count 0 with a successful Oracle import?
What is a staging table, and how is the staging concept used in Oracle?
Tips for how to size an Oracle server
Oracle error 942 when exporting a schema
Do DDL statements roll back, and why?
Increasing Oracle storage capacity by moving to a new storage with minimum downtime
Using Undo Tablespaces vs. rollback segments in Oracle 9i, 10g

Oracle database design
Oracle database in the cloud floated at Harvard lab
Oracle OpenWorld 2008 Special Report
Weighing remote database administration pros and cons takes care
Oracle Database 11g makes waves at Burlington Coat Factory
How to create a database link in Oracle
Data modeling tools no substitute for hard work
How do I do that in Oracle?
The Oracle Database user's guide to Oracle OpenWorld 2007
Oracle OpenWorld 2007 Special Report
How many redo log files?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
extent  (SearchOracle.com)
field  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
quad tree  (SearchOracle.com)
record  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts