Structured storage (variously also known as
COMComponent Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...
structured storage or
OLEObject Linking and Embedding is a technology that allows embedding and linking to documents and other objects developed by Microsoft. For developers, it brought OLE Control eXtension , a way to develop and use custom user interface elements...
structured storage) is a technology developed by
MicrosoftMicrosoft Corporation is a multinational computer technology corporation that develops, manufactures, licenses, and supports a wide range of software products for computing devices...
as part of its
WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
for storing hierarchical data within a single file. Strictly speaking, the term
structured storage refers to a set of COM
interfacesInterface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of external communication from internal operation Interface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of...
that a conforming implementation must provide, and not to a specific implementation, nor to a specific
fileA computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...
format (in fact, a structured storage implementation need not store its data in a file at all).
Structured storage (variously also known as
COMComponent Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...
structured storage or
OLEObject Linking and Embedding is a technology that allows embedding and linking to documents and other objects developed by Microsoft. For developers, it brought OLE Control eXtension , a way to develop and use custom user interface elements...
structured storage) is a technology developed by
MicrosoftMicrosoft Corporation is a multinational computer technology corporation that develops, manufactures, licenses, and supports a wide range of software products for computing devices...
as part of its
WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
for storing hierarchical data within a single file. Strictly speaking, the term
structured storage refers to a set of COM
interfacesInterface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of external communication from internal operation Interface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of...
that a conforming implementation must provide, and not to a specific implementation, nor to a specific
fileA computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...
format (in fact, a structured storage implementation need not store its data in a file at all). In addition to providing a hierarchical structure for data, structured storage may also provide a limited form of transactional support for data access. Microsoft provides an implementation that supports transactions, as well as one that does not (called
simple-mode storage, the latter implementation is limited in other ways as well, although it performs better).
Structured storage is widely used in
Microsoft OfficeMicrosoft Office is an office suite of interrelated desktop applications, servers and services for the Microsoft Windows and Mac OS X operating systems. Microsoft Office was introduced by Microsoft in 1989 for Mac OS, with a version for Windows in 1990...
applications, although newer releases (starting with
Office 2007Microsoft Office 2007 is the most recent Windows version of the Microsoft Office System, Microsoft's productivity suite. Formerly known as Office 12 in the initial stages of its beta cycle, it was released to volume license customers on November 30, 2006 and made available to retail customers on...
) use the
XMLXML is a set of rules for encoding documents electronically. It is defined in the produced by the W3C and several other related specifications; all are fee-free open standards....
-based Office Open XML by default. It is also an important part of both COM and the related Object Linking and Embedding (OLE) technologies. Other notable applications of structured storage include MSSQL, the Windows shell, and many third-party CAD programs.
Motivation
Structured storage addresses some inherent difficulties of storing multiple data objects within a single file. One difficulty arises when an object persisted in the file changes in size due to an update. If the application that is reading/writing the file expects the objects in the file to remain in a certain order, everything following that object's representation in the file may need to be shifted backward to make room if the object grows, or forward to fill in the space left over if the object shrinks. If the file is large, this could be a costly operation. Of course, there are many possible solutions to this difficulty, but often the application programmer does not want to deal with low level details such as binary file formats.
Structured storage provides an abstraction known as a
stream, represented by the interface
IStream. A stream is conceptually very similar to a file, and the
IStream interface provides methods for reading and writing similar to file input/output. A stream could reside in
memory-Ram, ram, or RAM as a non-acronymic word:As a non-acronymic word Ram, ram, or RAM may refer to:-Animals:*Bighorn Sheep, A North American mountain sheep species*Sheep, an uncastrated male of which is called a ram...
, within a file, within another stream, etc., depending on the implementation. Another important abstraction is that of a
storage, represented by the interface
IStorage. A storage is conceptually very similar to a
directoryFolder, directory, catalog, or drawer, in computing, is a virtual container within a digital file system, in which groups of computer files and other folders can be kept and organized....
on a
file systemIn computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them...
. Storages can contain streams, as well as other storages.
If an application wishes to persist several data objects to a file, one way to do so would be to open an
IStorage that represents the contents of that file and save each of the objects within a single
IStream. One way to accomplish the latter is through the standard COM interface
IPersistStream. OLE depends heavily on this model to embed objects within documents.
Format
Microsoft's implementation uses a file format known as
compound files, and all of the widely deployed structured storage implementations read and write this format. Compound files use a
FATFile Allocation Table or FAT is a computer file system architecture now widely used on most computer systems and most memory cards, such as those used with digital cameras.It was developed by Bill Gates and Marc McDonald during 1976–1977....
-like structure to represent storages and streams. Chunks of the file, known as
sectors (these may or may not correspond to sectors of the underlying file system), are allocated as needed to add new streams and to increase the size of existing streams. If streams are deleted or shrink leaving unallocated sectors, these sectors can be reused for new streams.
Native Structured Storage
During the beta testing phase of
Windows 2000Windows 2000 is a line of operating systems produced by Microsoft for use on business desktops, notebook computers, and servers. Released on February 17, 2000, it was the successor to Windows NT 4.0, and is the final release of Microsoft Windows to display the "Windows NT" designation...
, it included a feature titled
Native Structured Storage (
NSS) for storage of Structured Storage documents (like the binary
Microsoft OfficeMicrosoft Office is an office suite of interrelated desktop applications, servers and services for the Microsoft Windows and Mac OS X operating systems. Microsoft Office was introduced by Microsoft in 1989 for Mac OS, with a version for Windows in 1990...
formats and the
thumbs.db file
Windows ExplorerWindows Explorer is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface for accessing the file systems. It is also the component of the operating system that presents the user interface...
uses to cache thumbnails) with each
Stream that makes up a document stored in a separate
NTFSNTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....
data stream. It included utilities that automatically split up the streams in a regular Structured Storage document into NTFS data streams and vice versa. However, the feature was withdrawn after Beta 3 due to incompatibilities with other OS components, and any NSS files automatically converted to the single data stream format.
Related or competing products
- For Microsoft .NET:
- For Linux:
- For Java:
- POIFS – Java implementation of the OLE 2 Compound Document format.
- For Perl: