Serialization

msimons4
msimons4 used Ask the Experts™
on
I read, "During the procedure compilation, the related cursor can be pinned to ensure the memory is not deallocated and locked to ensure no other process can inappropriately change the related objects. And, of course, latching can be involved to ensure serialization."
What is serialization?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012
Commented:
serialization means doing one thing at a time in order

as opposed to parallel, doing more than one thing at the same time
Most Valuable Expert 2011
Top Expert 2012
Commented:
what is the context of that quote?

read as a standalone statement it's a bit odd.

compiling a procedure does not pin a cursor

but locks are placed on related objects during the compile process, and if those locks can't be obtained the compile itself will wait.

so, it's not necessarily "wrong" but it's an odd way of explaining the process when read by itself.  It may make more sense when read with the rest of source text
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
In an Object-Oriented (OO) environment Serialization can mean something else.

Here's the best definition I could find for now.  It's from a .Net perspective but should still hold true across OO environments.

Serialization can be defined as the process of storing the state of an object instance to a storage medium.

http://msdn.microsoft.com/en-us/library/ms973893.aspx

Author

Commented:
Here is the entire paragraph:

"Pinning and locking: Similar to the situation with Oracle buffer headers, the central shared pool object - the cursor - can be pinned and locked. Pinning ensures memory is not improperly deallocated and can also be used to ensure serialization. Locking is used to prevent an inappropriate change. They can be used together. For example, during a procedure compilation, the related cursor can be pinned to ensure the memory is not deallocated and locked to ensure no other process can inappropriately change the related objects. And, of course, latching can be involved to ensure serialization."
Most Valuable Expert 2011
Top Expert 2012
Commented:
ok, that makes sense.

The "cursor" in that paragraph would likely be multiple cursors involved in the recursive sql used to actually implement the compilation and yes, those cursor should be "immutable" for the duration of a compilation and latching (latches are locks) makes the compilation wait until the related objects are not in use and then during the compilation everybody using those objects must wait until the compile is done.  

Since there is a forced ordering, that means the actions are serialized.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial