WinFS: Difference between revisions

From BetaArchive Wiki
enwikipedia>Soumyasch
m (→‎Type system: fix some code bugs)
enwikipedia>Monkbot
m (Task 18 (cosmetic): eval 38 templates: hyphenate params (52×);)
Line 1: Line 1:
{{distinguish|WinFX}}
'''WinFS''' (short for '''Windows Future Storage''')<ref>{{cite web |url=http://news.zdnet.co.uk/software/0,1000000121,2131385,00.htm |title=Leaked Windows hints at changes to come |work=[[ZDNet]] |publisher=[[CBS Interactive]] |archive-url=https://web.archive.org/web/20070930210357/http://news.zdnet.co.uk/software/0%2C1000000121%2C2131385%2C00.htm |archive-date=September 30, 2007 |date=September 30, 2007 |url-status=dead }}</ref> was the [[Microsoft codenames|code name]] for a canceled<ref>{{Cite news |url = https://www.theguardian.com/technology/2006/jun/29/insideit.guardianweeklytechnologysection |title = Why WinFS had to vanish |first = Jack |last = Schofield |work = [[The Guardian]] |publisher = Guardian News and Media |date = June 29, 2006 |access-date = December 9, 2010}}</ref> data storage and [[data management|management]] system project based on [[relational database]]s, developed by [[Microsoft]] and first demonstrated in 2003 as an advanced storage subsystem for the [[Microsoft Windows]] [[operating system]], designed for [[Persistence (computer science)|persistence]] and management of [[Structured data|structured]], [[Semi-structured model|semi-structured]] and [[unstructured data]].


'''WinFS''' (short for ''Windows Future Storage'')<ref>{{cite web| url = http://news.zdnet.co.uk/software/0,1000000121,2131385,00.htm | title = Leaked Windows hints at changes to come | accessdate=2007-05-04}}</ref>  is the [[Microsoft codenames|code name]] for a data storage and management system based on [[relational database]]s, developed by [[Microsoft]] and first demonstrated in 2003 as an advanced storage subsystem for the [[Microsoft Windows]] [[operating system]], being designed for persistence and management of structured, semi-structured as well as unstructured data. WinFS includes a [[relational database]] for storage of information, and allows any type of information to be stored in it, provided there is a well defined [[schema]] for the type. Individual data items could then related together by Relationships, which are either inferred by the system, based on certain attributes, or explicitly stated by the user. As the data has a well defined schema, any application can reuse the data; and using the relationships, related data can be effectively organized as well as retrieved. Because the system knows the structure and intent of the information, it can be used to make complex queries that enable advanced searching through the data and aggregating various data items by exploiting the relationships between them.
WinFS includes a [[relational database]] for storage of information, and allows any type of information to be stored in it, provided there is a well defined [[Database schema|schema]] for the type. Individual data items could then be related together by relationships, which are either inferred by the system based on certain attributes or explicitly stated by the user. As the data has a well defined schema, any application can reuse the data; and using the relationships, related data can be effectively organized as well as retrieved. Because the system knows the structure and intent of the information, it can be used to make complex queries that enable advanced searching through the data and aggregating various data items by exploiting the relationships between them.
[[Image:WinFSCalendar.png|thumb|right|225px|A mockup calendar application sorting images by the dates and using their relationship with contacts to filter the images. WinFS aimed to provide a shared [[data model|Schema]] system that would enable such a scenario.]]
While WinFS and its shared type schema makes it possible for an application to recognize the different data types, the application still has to be coded to render the different data types. Consequently, it would not allow development of a single application that can view or edit all data types; rather what WinFS enables is applications to understand the structure of all data and extract the information that it can use further. When WinFS was introduced at the 2003 [[Professional Developers Conference]], Microsoft also released a video presentation, named IWish,<ref name="IWish">{{cite web | url = http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv | title = IWish Concept Video | publisher = Microsoft | accessdate = 2007-07-03}}</ref> showing mockup interfaces that showed how applications would expose interfaces that takes advantage of an unified type system. The concepts showed in the video ranged from applications using the relationships of items to dynamically offer filtering options to applictions grouping multiple related data types and rendering them in an unified presentation.  


WinFS was billed as one of the pillars of the [[Development of Windows Vista|"Longhorn"]] wave of technologies, and would ship as part of the next version of Windows. It was subsequently decided that WinFS would ship after the release of [[Windows Vista]], but those plans were shelved in June 2006, with some of its component technologies being integrated into upcoming releases of [[ADO.NET]] and [[Microsoft SQL Server]].<ref name="canned">{{ cite web | url = http://blogs.msdn.com/winfs/archive/2006/06/23/644706.aspx | title = WinFS Update | author = Quentin Clark | date = [[June 23]] [[2006]] | accessdate = 2006-06-23 | work = What's in Store|publisher = MSDN Blogs }}</ref>  While it was then assumed by observers that WinFS was done as a project, in November 2006 [[Steve Ballmer]] announced that WinFS was still in development, though it was not clear if the technology was planned for Vista's successor, [[Windows "Vienna"]], or if it would be made available as a separate product.<ref name="WinFS Alive">{{cite web | url = http://www.crn.com/sections/breakingnews/dailyarchives.jhtml?articleId=196600671 | title = WinFS Still In The Works Despite Missing Vista | accessdate = 2007-06-30}}</ref>
[[Image:WinFSCalendar.png|thumb|A mockup calendar application sorting images by the dates and using their relationship with contacts to filter the images. WinFS aimed at providing a shared [[data model|schema]] system that would enable such a scenario.]]
While WinFS and its shared type schema make it possible for an application to recognize the different data types, the application still has to be coded to render the different data types. Consequently, it would not allow development of a single application that can view or edit all data types; rather, what WinFS enables applications to do is understand the structure of all data and extract the information that they can use further. When WinFS was introduced at the 2003 [[Professional Developers Conference]], Microsoft also released a video presentation, named IWish,<ref name="IWish">{{cite web | url = http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv | title = IWish Concept Video | publisher = Microsoft | access-date = 2008-07-14 | url-status = dead | archive-url = https://web.archive.org/web/20060602015536/http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv | archive-date = 2006-06-02 }}</ref> showing mockup interfaces that showed how applications would expose interfaces that take advantage of a unified type system. The concepts shown in the video ranged from applications using the relationships of items to dynamically offer filtering options to applications grouping multiple related data types and rendering them in a unified presentation.


== Motivation ==
WinFS was billed as one of the pillars of the [[Development of Windows Vista|"Longhorn"]] wave of technologies, and would ship as part of the next version of Windows.  It was subsequently decided that WinFS would ship after the release of [[Windows Vista]], but those plans were shelved in June 2006,<ref name="canned">{{cite web|url=http://blogs.msdn.com/winfs/archive/2006/06/23/644706.aspx|title=WinFS Update|date=June 23, 2006|publisher=MSDN Blogs|author=Quentin Clark|access-date=2006-06-23|work=What's in Store}}</ref> with some of its component technologies being integrated into [[ADO.NET]] and [[Microsoft SQL Server]].<ref name="where">{{cite web|url=http://perspectives.on10.net/blogs/jonudell/Where-is-WinFS-now/|title=Where is WinFS now?|author=Quentin Clark|access-date=2008-05-17|archive-url=https://web.archive.org/web/20080517092633/http://perspectives.on10.net/blogs/jonudell/Where-is-WinFS-now/|archive-date=2008-05-17|url-status=dead}}</ref>


Many [[filesystem]]s found on common [[operating systems]], including the [[NTFS]] filesystem which is used in modern versions of Microsoft Windows, store files and other objects only as a stream of bytes, and have little or no information about the data stored in the files.  Such file systems also provide only a single way of organizing the files, namely via directories and file names.<ref name="Dev1">{{cite web | url = http://msdn2.microsoft.com/en-us/library/ms996622.aspx | title = A Developer's Perspective on WinFS: Part 1 | publisher = MSDN | author = Shawn Wildermuth | accessdate = 2007-06-30}}</ref><ref name="Organize">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/01/487894.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 2) | publisher = WinFS Team Blog | author = Vijay Bangaru | accessdate = 2007-06-30}}</ref>
==Motivation==
Many [[filesystem]]s found on common [[operating systems]], including the [[NTFS]] filesystem which is used in modern versions of Microsoft Windows, store files and other objects only as a [[Byte stream|stream of bytes]], and have little or no information about the data stored in the files.  Such file systems also provide only a single way of organizing the files, namely via directories and file names.<ref name="Dev1a">{{cite web | url = http://msdn2.microsoft.com/en-us/library/ms996622.aspx | title = A Developer's Perspective on WinFS: Part 1 | publisher = MSDN | author = Shawn Wildermuth | access-date = 2007-06-30}}</ref><ref name="Organize">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/01/487894.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 2) | publisher = WinFS Team Blog | author = Vijay Bangaru | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070609030458/http://blogs.msdn.com/winfs/archive/2005/11/01/487894.aspx | archive-date = 2007-06-09 | url-status = dead }}</ref>


Because a file system has no knowledge about the data it stores,<ref name="Dev1"/> applications tend to use their own, often [[proprietary]], [[file format]]s. This hampers sharing of data between multiple applications. It becomes difficult to create an application which processes information from multiple file types, because the programmers have to understand the [[File format|structure]] and [[Semantics#Computer science|semantics]] of all the files.<ref name="WinFSFiles">{{cite web | url = http://msdn2.microsoft.com/en-us/library/aa480690.aspx | title = The WinFS Files: Divide et Impera | publisher = MSDN | author = Sean Grimaldi | accessdate = 2007-06-30}}</ref> Using common file formats is a workaround to this problem but not a universal solution; there is no guarantee that all applications will use the format. Data with standardized schema, such as [[XML]] documents and [[relational database|relational data]] fare better as they have a standardized structure and [[Runtime infrastructure|runtime]] requirements.<ref name="WinFS101">{{cite web | url = http://msdn2.microsoft.com/en-US/library/aa480687.aspx | title = WinFS 101: Introducing the New Windows File System | publisher = MSDN | author = Thomas Rizzo | accessdate = 2007-06-30}}</ref>
Because a file system has no knowledge about the data it stores,<ref name="Dev1a" /> applications tend to use their own, often [[Proprietary format|proprietary]], [[file format]]s. This hampers sharing of data between multiple applications. It becomes difficult to create an application which processes information from multiple file types, because the programmers have to understand the [[File format|structure]] and [[Semantics#Computer science|semantics]] of all the files.<ref name="WinFSFiles">{{cite web | url = http://msdn2.microsoft.com/en-us/library/aa480690.aspx | title = The WinFS Files: Divide et Impera | publisher = MSDN | author = Sean Grimaldi | access-date = 2007-06-30}}</ref> Using common file formats is a workaround to this problem but not a universal solution; there is no guarantee that all applications will use the format. Data with standardized schema, such as [[XML]] documents and [[relational database|relational data]] fare better, as they have a standardized structure and run-time requirements.<ref name="WinFS101">{{cite web | url = http://msdn2.microsoft.com/en-US/library/aa480687.aspx | title = WinFS 101: Introducing the New Windows File System | publisher = MSDN | author = Thomas Rizzo | access-date = 2007-06-30}}</ref>


Also, a traditional file system can retrieve and search data based only on the filename, because the only knowledge it has about the data is the name of the files that store the data.<ref name="WinFSFiles"/>  A better solution is to tag files with attributes that describe them.  Attributes are [[metadata]] about the files such as the type of file (such as ''document'', ''picture'', ''music'', ''creator'', etc).<ref name="Dev1"/> This allows files to be searched for by their attributes, in ways not possible using a folder hierarchy, such as finding ''"pictures which have person X"''. The attributes can be recognizable by either the file system natively, or via some extension.<ref name="Dev1"/> [[Desktop search]] applications take this concept a step further. They extract data, including attributes, from files and index it. To extract the data, they use a filter for each file format. This allows for searching based on both the file's attributes and the data in it.<ref name="Dev1"/>
Also, a traditional file system can retrieve and search data based only on the filename, because the only knowledge it has about the data is the name of the files that store the data.<ref name="WinFSFiles" />  A better solution is to tag files with attributes that describe them.  Attributes are [[metadata]] about the files such as the type of file (such as ''document'', ''picture'', ''music'', ''creator'', etc.).<ref name="Dev1a" /> This allows files to be searched for by their attributes, in ways not possible using a folder hierarchy, such as finding ''"pictures which have person X"''. The attributes can be recognizable by either the file system natively, or via some extension.<ref name="Dev1a" /> [[Desktop search]] applications take this concept a step further. They extract data, including attributes, from files and index it. To extract the data, they use a filter for each file format. This allows for searching based on both the file's attributes and the data in it.<ref name="Dev1a" />


However, this still does not help in managing related data, as disparate items do not have any relationships defined. For example, it is impossible to search for ''"the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month"''. Such a search encompasses needs to have a data model which has the both the [[semantics]] as well as relationships of data defined.<ref name="Dev1"/><ref name="Organize"/>  WinFS aims to provide such a data model and the runtime infrastructure that can be used to store the data as well as the relationships between data items according to the data model, doing so at a satisfactory level of performance.
However, this still does not help in managing related data, as disparate items do not have any relationships defined. For example, it is impossible to search for ''"the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month"''. Such a search could not be done unless it is based on a data model which has both the [[semantics]] as well as relationships of data defined.<ref name="Dev1a" /><ref name="Organize" />  WinFS aims to provide such a data model and the runtime infrastructure that can be used to store the data, as well as the relationships between data items according to the data model, doing so at a satisfactory level of performance.


==Overview==
==Overview==
WinFS natively recognizes different types of data, such as  ''picture'', ''e-mail'', ''document'', ''audio'', ''video'', ''calendar'', ''contact'', among others; rather than just bytestreams as with file systems. Data stored and managed by the system are instances of the data type recognozed by the WinFS runtime. The data is structured by means of properties. For example, an instance of a ''resumé'' type will surface the data by exposing certain properties like ''Name'', ''Educational Qualification'', ''Experience'', among others. Each of the properties may be of simple types like ''strings'', ''integers'', or ''dates'' or complex types like ''contacts''.<ref name="WinFSFiles"/><ref name="DotNetShow">{{cite web | url = http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=e049f148-460c-47af-93a0-dfd0f4edf598&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f6%2fb%2f6%2f6b659b87-eafa-4c15-8783-1476e59bba13%2fdotnetshow41_300k.EXE | title = WinFS on The .NET Show | accessdate = 2007-07-04}}</ref> Different data types expose different properties. Besides that, WinFS also allows different data instances to be related together, such as a document and a contact can be related by a ''authored by'' relationship.<ref name="DotNetShow"/><ref name="Organize"/> Relationships are also exposed as properties; for example if a document is related with a contact with an ''Created By'' relationship, then the document will have a ''Created By'' property. When it is accessed, the relationship is traversed and the related data returned.<ref name="DotNetShow"/> By following the relations, all related data can be reached.<ref name="Organize"/>
WinFS natively recognizes different types of data, such as  ''picture'', ''e-mail'', ''document'', ''audio'', ''video'', ''calendar'', ''contact'', rather than just leaving them as raw unanalyzed bytestreams (as most file systems do). Data stored and managed by the system are instances of the data type recognized by the WinFS runtime. The data are structured by means of properties. For example, an instance of a ''résumé'' type will surface the data by exposing properties, such as ''Name'', ''Educational Qualification'', ''Experience''. Each property may be a simple type (''strings'', ''integers'', ''dates'') or complex types (''contacts'').<ref name="WinFSFiles" /><ref name="DotNetShow">{{cite web | url = http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=e049f148-460c-47af-93a0-dfd0f4edf598&u=http://download.microsoft.com/download/6/b/6/6b659b87-eafa-4c15-8783-1476e59bba13/dotnetshow41_300k.EXE | title = WinFS on The .NET Show | access-date = 2007-07-04 }}{{dead link|date=September 2017 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Different data types expose different properties. Besides that, WinFS also allows different data instances to be related together; such as a document and a contact can be related by an ''Authored By'' relationship.<ref name="Organize" /><ref name="DotNetShow" /> Relationships are also exposed as properties; for example if a document is related to a contact by a ''Created By'' relationship, then the document will have a ''Created By'' property. When it is accessed, the relationship is traversed and the related data returned.<ref name="DotNetShow" /> By following the relations, all related data can be reached.<ref name="Organize" /> WinFS promotes sharing of data between applications by making the data types accessible to all applications, along with their schemas.<ref name="WinFSFiles" /> When an application wants to use a WinFS type, it can use the schema to find the data structure and can use the information. So, an application has access to all data on the system even though the developer did not have to write [[parser]]s to recognize the different data formats. It can also use relationships and related data to create dynamic filters to present the information the application deals with. The WinFS API further abstracts the task of accessing data. All WinFS types are exposed as [[.NET Framework|.NET]] [[Object-oriented programming|objects]] with the properties of the object directly mapping to the properties of the data type.<ref name="Dev1a" /> Also, by letting different applications that deal with the same data share the same WinFS data instance rather than storing the same data in different files, the hassles of synchronizing the different stores when the data change are removed.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/10/24/484380.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 1) | publisher = WinFS Team Blog | author = Vijay Bangaru | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070708065606/http://blogs.msdn.com/winfs/archive/2005/10/24/484380.aspx | archive-date = 2007-07-08 | url-status = dead }}</ref> Thus WinFS can reduce redundancies.<ref name="Dev1a" /><ref name="WinFS101" />
[[Image:WinFSemail.png|thumb|225px|right|An e-mail application can use the relationships to create dynamic filters to create different views of emails, as in the mockup screenshot]]
WinFS promotes sharing of data between applications by making the data types accessible to all applications, along with their schemas.<ref name="WinFSFiles"/> So any application, when it wants to use a WinFS type, by using the schema can find out the structure of the data and utilize the information. So, an application has access to all data on the system, even though the developer did not have to write [[parser]]s to recognize the different data format. It can also use the relationships and related data to create dynamic filters to present the information the application deals with, in different ways. The WinFS API further abstracts the task of accessing data. All WinFS types are exposed as [[.NET Framework|.NET]] [[Object-oriented programming|objects]] with the properties of the object directly mapping to the properties of the data type.<ref name="Dev1"/> Also, by letting different applications which deal with the same data share the same WinFS data instance rather than storing the same data in different files, the hassles of synchronizing the different stores when the data changes is removed.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/10/24/484380.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 1) | publisher = WinFS Team Blog | author = Vijay Bangaru | accessdate = 2007-06-30}}</ref> Thus WinFS help reduce redundancies.<ref name="WinFS101"/>
<ref name="Dev1"/>


Access to all the data in the system allows complex searches for data to be performed across all the data items managed by WinFS. In the example used above (''"the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month"''), WinFS can traverse the ''subject'' relationship of all the photos to find the ''contact'' items. Similarly, it can find filter all emails in last month and access the ''communicated with'' relation to reach the contacts. The common contacts can then be figured out from the two sets of results and their phone number retrieved by accessing the suitable property of the contact items.
Access to all the data in the system allows complex searches for data across all the data items managed by WinFS. In the example used above (''"the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month"''), WinFS can traverse the ''subject'' relationship of all the photos to find the ''contact'' items. Similarly, it can filter all emails in last month and access the ''communicated with'' relation to reach the contacts. The common contacts can then be figured out from the two sets of results and their phone number retrieved by accessing the suitable property of the contact items.


WinFS, in addition to fully schematized data (like [[XML]] and [[relational database|relational]] data), supports semi-structured (like images, which has an unstructured bitstream plus structured metadata) as well as unstructured (like files) as well. It stores the unstructured components directly as files while storing the structured metadata in the structured store.<ref name="DotNetShow"/> WinFS internally uses a [[relational database]] to manage the data. But, it does not limit the data to belong to belong to any particular data model, like [[relational data model|relational]] or [[hierarchical data model|hierarchical]], but can be of any well-defined schema. The WinFS runtime [[Object-relational mapping|maps]] the schema to a the relational modality,<ref name="Dev1"/> by defining the tables it will store the types in and the [[primary key]]s and [[foreign key]]s that would be required to represent the relationships. WinFS includes mappings for object and XML schemas by default; mappings for other schemas needs to be specified. Object schemas are specified using XML; WinFS generates code to surface the schemas as [[.NET Framework|.NET]] [[Class (computer science)|classes]]. [[ADO.NET]] can be used to directly specify the relational schema, though a mapping to the object schema needs to be provided to surface it as classes.<ref name="DotNetShow"/> All relationship traversals are performed as [[Relational algebra#Joins|joins]] on these tables. WinFS also automatically creates [[Index (database)|indexes]] on these tables, to facilitate fast access to the information.<ref name="DotNetShow"/> Indexes significantly speed up joins, and thus traversing relationships to retrieve related data is performed very fast. Indexes are also used during searching of information; searching and [[database query language|querying]] use the indexes so that the operations complete quickly, much like [[desktop search]] systems.
In addition to fully schematized data (like [[XML]] and [[relational database|relational]] data), WinFS supports semi-structured data (such as images, which have an unstructured bitstream plus structured metadata) as well as unstructured data (such as files) as well. It stores the unstructured components as files while storing the structured metadata in the structured store.<ref name="DotNetShow" /> Internally, WinFS uses a [[relational database]] to manage data. It does not limit the data to belonging to any particular data model. The WinFS runtime [[Object-relational mapping|maps]] the schema to a relational modality,<ref name="Dev1a" /> by defining the tables it will store the types in and the [[primary key]]s and [[foreign key]]s that would be required to represent the relationships. WinFS includes mappings for object and XML schemas by default. Mappings for other schemas must be specified. Object schemas are specified in XML; WinFS generates code to surface the schemas as [[.NET Framework|.NET]] [[Class (computer science)|classes]]. [[ADO.NET]] can be used to directly specify the relational schema, though a mapping to the object schema must be provided to surface it as classes.<ref name="DotNetShow" /> Relationship traversals are performed as [[Relational algebra#Joins and join-like operators|joins]] on these tables. WinFS also automatically creates [[Index (database)|indexes]] on these tables, to enable fast access to the information.<ref name="DotNetShow" /> Indexing speeds up joins significantly, and traversing relationships to retrieve related data is performed very fast. Indexes are also used during information search; searching and [[database query language|querying]] use the indexes to quickly complete the operations, much like [[desktop search]] systems.


== Development ==
== Development ==
{{Update|inaccurate=yes|date=February 2019}}
{{Graphical timeline
{{Graphical timeline
  | help=off
  | help=off
  | from=1990
  | from=1990
  | to=2007
  | to=2019
  | scale-increment=1
  | scale-increment=1
  | title=Structured Storage Timeline
  | title=Structured Storage Timeline
Line 42: Line 40:
  | bar1-from=1990
  | bar1-from=1990
  | bar1-to=1994
  | bar1-to=1994
  | bar1-text=<span title="Object File System">OFS</span> in [[Cairo (operating system){{!}}Cairo]]<ref name="PaulT"/>
  | bar1-text=<span title="Object File System">OFS</span> in [[Cairo (operating system)|Cairo]]<ref name="PaulT" />
  | bar1-colour=#b0c4de
  | bar1-colour=#b0c4de
  | note1 = Cancelled
  | note1 = Canceled
  | note1-at = 1992
  | note1-at = 1992
  | bar2-from=1995
  | bar2-from=1995
  | bar2-to=1996.5
  | bar2-to=1996.5
  | bar2-text=Storage+, using [[Microsoft SQL Server{{!}}SQL 7.0]]<ref name="PaulT"/>
  | bar2-text=Storage+, using [[Microsoft SQL Server|SQL 7.0]]<ref name="PaulT" />
  | bar2-colour=#d8bfd8
  | bar2-colour=#d8bfd8
  | note2 = Cancelled
  | note2 = Canceled
  | note2-at = 1996
  | note2-at = 1996
  | bar3-from=1996.5
  | bar3-from=1996.5
  | bar3-to=1998
  | bar3-to=1998
  | bar3-text=<span title="Relational File System">RFS</span>, using [[Microsoft SQL Server{{!}}SQL 2000]]<ref name="PaulT"/>
  | bar3-text=<span title="Relational File System">RFS</span>, using [[Microsoft SQL Server|SQL 2000]]<ref name="PaulT" />
  | bar3-colour=#9acd32
  | bar3-colour=#9acd32
  | note3 = Cancelled
  | note3 = Canceled
  | note3-at = 1997.5
  | note3-at = 1997.5
  | bar4-from=1998
  | bar4-from=1998
  | bar4-to=2000
  | bar4-to=2000
  | bar4-text= [[Microsoft Exchange Server{{!}}Exchange Webstore]]<ref name="Destiny">[http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx My tryst with Destiny, err… Integrated Storage]</ref>
  | bar4-text= [[Microsoft Exchange Server|Exchange Webstore]]<ref name="Destiny">{{Cite web |url=http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx |title=My tryst with Destiny, err… Integrated Storage |access-date=2007-06-30 |archive-url=https://web.archive.org/web/20071031054259/http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx |archive-date=2007-10-31 |url-status=dead }}</ref>
  | bar4-colour=#f4a460
  | bar4-colour=#f4a460
  | note4 = Features cut
  | note4 = Features cut
Line 66: Line 64:
  | bar5-from=2000.5
  | bar5-from=2000.5
  | bar5-to=2002
  | bar5-to=2002
  | bar5-text=[[Microsoft Outlook{{!}}Outlook]] <span title="Local Information Store">LIS</span><ref name="Destiny"/>
  | bar5-text=[[Microsoft Outlook|Outlook]] <span title="Local Information Store">LIS</span><ref name="Destiny" />
  | bar5-colour=#ffb6c1
  | bar5-colour=#ffb6c1
  | note5 = Features cut
  | note5 = Features cut
Line 72: Line 70:
  | bar6-from=2003
  | bar6-from=2003
  | bar6-to=2006
  | bar6-to=2006
  | bar6-text=<span title="Windows Future Storage">WinFS</span><ref name="PaulT"/>
  | bar6-text=<span title="Windows Future Storage">WinFS</span><ref name="PaulT" />
  | note6 = Cancelled
  | note6 = Canceled
  | note6-at = 2005
  | note6-at = 2005
  | bar7-from=2006
  | bar7-from=2006
  | bar7-to=2008
  | bar7-to=2009
  | bar7-text=Under Development<ref name="WinFS Alive"/>
  | bar7-text=Microsoft Semantic Engine
  | bar7-colour=#ffd700
  | bar7-colour=#ffd700
  | note7 = No known info
  | note7 = No known info
  | note7-at = 2007.5
  | note7-at = 2007.5
  | caption = Timeline of the various structured storage projects<br/>by [[Microsoft]]. None yet has resulted in a full featured<br/>runtime and API around it. Years are approximation.
  | caption = Timeline of the various structured storage projects by [[Microsoft]]. None yet has resulted in a full featured runtime and API around it. Years are approximate.
}}
}}
The development of WinFS is an extension to a feature which was initially planned in the early 1990s. Dubbed ''Object File System'', it was supposed to be included as part of [[Cairo (operating system)|Cairo]]. OFS was supposed to have powerful data aggregation features.<ref Name="PaulT">{{cite web | url = http://www.winsupersite.com/showcase/winfs_preview.asp | title = Windows Storage Foundation (WinFS) Preview | author = Paul Thurrott | accessdate = 2007-06-30}}</ref> But the Cairo project was shelved, and with it OFS. However, later during the development of [[Component Object Model|COM]], a storage system, called Storage+, based on then-upcoming SQL Server 8.0, was planned, which was slated to offer similar aggregation features.<ref Name="PaulT"/> This, too, never materialized, and a similar technology, ''Relational File System'' (RFS), was conceived to be launched with SQL Server 2000. <ref Name="PaulT"/>However, SQL Server 2000 ended up being a minor upgrade to SQL Server 7.0 and RFS was not implemented.
The development of WinFS is an extension to a feature that was initially planned in the early 1990s. Dubbed ''Object File System'', it was supposed to be included as part of [[Cairo (operating system)|Cairo]]. OFS was supposed to have powerful data aggregation features,<ref name="PaulT">{{cite web | url = http://www.winsupersite.com/showcase/winfs_preview.asp | title = Windows Storage Foundation (WinFS) Preview | author = Paul Thurrott | access-date = 2007-06-30 | url-status = dead | archive-url = https://web.archive.org/web/20070702131752/http://www.winsupersite.com/showcase/winfs_preview.asp | archive-date = 2007-07-02 }}</ref> but the Cairo project was shelved, and with it OFS. However, later during the development of [[Component Object Model|COM]], a storage system, called Storage+, based on then-upcoming SQL Server 8.0, was planned, which was slated to offer similar aggregation features.<ref name="PaulT" /> This, too, never materialized, and a similar technology, ''Relational File System'' (RFS), was conceived to be launched with SQL Server 2000.<ref name="PaulT" /> However, SQL Server 2000 ended up being a minor upgrade to SQL Server 7.0 and RFS was not implemented.


But the concept was not scrapped.<ref Name="PaulT"/> It just morphed into WinFS. WinFS was initially planned for inclusion in [[Windows Vista]],<ref>{{cite web | url = http://news.zdnet.co.uk/software/0,1000000121,39191853,00.htm | title = Will Longhorn be worth the pain? | publisher = ZDNet | author = Cath Everett | accessdate = 2007-06-30}}</ref> and build 4051 of Windows Vista, then called by its codename "Longhorn", given to developers at the Microsoft [[Professional Developers Conference]] in 2003, included WinFS, but it suffered from significant performance issues.<ref Name="PaulT"/> In August 2004, Microsoft announced that WinFS would not ship with Windows Vista; it would instead be available as a downloadable update after Vista's release.<ref Name="PaulT"/>
But the concept was not scrapped.<ref name="PaulT" /> It just morphed into WinFS. WinFS was initially planned for inclusion in [[Windows Vista]],<ref>{{cite web | url = http://news.zdnet.co.uk/software/0,1000000121,39191853,00.htm | title = Will Longhorn be worth the pain? | publisher = ZDNet | author = Cath Everett | access-date = 2007-06-30}}</ref> and build 4051 of Windows Vista, then called by its codename "Longhorn", given to developers at the Microsoft [[Professional Developers Conference]] in 2003, included WinFS, but it suffered from significant performance issues.{{dead link|date=December 2013}}<ref name="PaulT" /> In August 2004, Microsoft announced that WinFS would not ship with Windows Vista; it would instead be available as a downloadable update after Vista's release.<ref name="PaulT" />


On [[August 29]] [[2005]],<ref Name="PaulT"/> Microsoft quietly made Beta 1 of WinFS available to MSDN subscribers. It worked on [[Windows XP]], and required the [[.NET Framework]] to run. The WinFS API was included in the ''System.Storage'' namespace.<ref Name="ForDev">{{cite web | url = http://www.ntfs.com/winfs_developers.htm | title = WinFS for Developers | publisher = NTFS.com | accessdate = 2007-07-04}}</ref> The beta was refreshed on [[December 1]] [[2005]] to be compatible with version 2.0 of the .NET Framework.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/12/01/499042.aspx | title = WinFS Beta 1 Refresh now available | author = Vijay Bangaru | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref> WinFS Beta 2 was planned for some time later in 2006,<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/05/22/604075.aspx | title = Showing off the next release of WinFS at Tech Ed 2006, in Boston! Join us! | author = Shan Sinha | publisher = WinFS Team Blog | accesdate = 2007-06-30}}</ref> and was supposed to include integration with [[Windows Desktop Search]], so that search results include results from both regular files and WinFS stores, as well as allow access of WinFS data using [[ADO.NET]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx | title = My tryst with Destiny, err… Integrated Storage | publisher = WinFS Team Blog | author = Sanjay Anand | accessdate = 2007-06-30}}</ref>  
On August 29, 2005,<ref name="PaulT" /> Microsoft quietly made Beta 1 of WinFS available to MSDN subscribers. It worked on [[Windows XP]], and required the [[.NET Framework]] to run. The WinFS API was included in the ''System.Storage'' namespace.<ref name="ForDev">{{cite web | url = http://www.ntfs.com/winfs_developers.htm | title = WinFS for Developers | publisher = NTFS.com | access-date = 2007-07-04}}</ref> The beta was refreshed on December 1, 2005 to be compatible with version 2.0 of the .NET Framework.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/12/01/499042.aspx | title = WinFS Beta 1 Refresh now available | author = Vijay Bangaru | publisher = WinFS Team Blog | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070520220552/http://blogs.msdn.com/winfs/archive/2005/12/01/499042.aspx | archive-date = 2007-05-20 | url-status = dead }}</ref> WinFS Beta 2 was planned for some time later in 2006,<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/05/22/604075.aspx | title = Showing off the next release of WinFS at Tech Ed 2006, in Boston! Join us! | author = Shan Sinha | publisher = WinFS Team Blog | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070308041330/http://blogs.msdn.com/winfs/archive/2006/05/22/604075.aspx | archive-date = 2007-03-08 | url-status = dead }}</ref> and was supposed to include integration with [[Windows Desktop Search]], so that search results include results from both regular files and WinFS stores, as well as allow access of WinFS data using [[ADO.NET]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx | title = My tryst with Destiny, err… Integrated Storage | publisher = WinFS Team Blog | author = Sanjay Anand | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20071031054259/http://blogs.msdn.com/winfs/archive/2006/02/24/538925.aspx | archive-date = 2007-10-31 | url-status = dead }}</ref>


However, on [[June 23]] [[2006]], the WinFS team at Microsoft announced that WinFS would no longer be delivered as a separate product,<ref name="canned" /> and some components would be brought under the umbrella of other technologies - like the [[ADO.NET#Entity Framework|ADO.NET Entity Framework]] as well as support for unstructured data and adminless mode of operation of into [[Microsoft SQL Server#SQL Server 2008|SQL Server 2008]], then codenamed ''Katmai''.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/06/26/648075.aspx | title = Update to the Update | author = Quentin Clark | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref>
On June 23, 2006, the WinFS team at Microsoft announced that WinFS would no longer be delivered as a separate product,<ref name="canned" /><ref>{{cite web|url=http://blogs.msdn.com/winfs/archive/2006/06/26/648075.aspx|title=Update to the Update|publisher=WinFS Team Blog|author=Quentin Clark|access-date=2007-06-30|archive-url=https://web.archive.org/web/20070703214245/http://blogs.msdn.com/winfs/archive/2006/06/26/648075.aspx|archive-date=2007-07-03|url-status=dead}}</ref> and some components would be brought under the umbrella of other technologies. Many of the principle features Microsoft intended to provide with WinFS included a pane for metadata property editing, [[breadcrumb (navigation)|breadcrumb]]-based property navigation, filtering or stacking items over properties, [[incremental search]], and [[virtual folder#Windows|saved search]]es;<ref name="WinFS2003PDC">{{cite web |url=http://msdn.microsoft.com:80/Longhorn/understanding/pillars/WinFS/default.aspx?pull=/library/en-us/dnaero/html/wux_topic_storage.asp |title=WinFS: The Windows File System (Microsoft Access 2002 Technical Articles) |date=October 2003 |publisher=[[Microsoft]] |work=[[Microsoft Developer Network|MSDN]] |archive-url=https://web.archive.org/web/20031221235634/http://msdn.microsoft.com/Longhorn/understanding/pillars/WinFS/default.aspx?pull=%2Flibrary%2Fen-us%2Fdnaero%2Fhtml%2Fwux_topic_storage.asp |archive-date=2003-12-21 |access-date=February 1, 2018 |url-status=dead }}</ref> these features were incorporated in Windows Vista.<ref name="WindowsVistaProductGuide">{{cite web |url=http://download.microsoft.com//download/c/9/8/c988dce4-1971-4ad4-a1ef-df99e596a4cc/WVPG%20RTM.docx |title=Windows Vista Product Guide |date=2006 |publisher=[[Microsoft]] |format=DOCX |pages=44–51 |archive-url=https://web.archive.org/web/20110701021143/http://download.microsoft.com//download/c/9/8/c988dce4-1971-4ad4-a1ef-df99e596a4cc/WVPG%20RTM.docx |archive-date=July 1, 2011 |access-date=March 1, 2018}}</ref> ''Query composition'', a feature of WinFS that allowed users to perform additional searches that reuse the results of a previous query,<ref name="Rules"/> was later incorporated in Windows Vista.<ref name="QueryComposition">{{cite web |url=http://shellrevealed.com/blogs/shellblog/archive/2006/10/31/Query-Composition_3A00_-Building-a-search-upon-another-search.aspx |title=Query Composition: Building a search upon another search |last=Bentz |first=Ben |date=October 31, 2006 |publisher=[[Microsoft]] |work=Shell: Revealed Blog |archive-url=https://web.archive.org/web/20061215210717/http://shellrevealed.com/blogs/shellblog/archive/2006/10/31/Query-Composition_3A00_-Building-a-search-upon-another-search.aspx |archive-date=December 15, 2006 |access-date=March 2, 2018}}</ref>


With that announcement, most analysts assumed that the WinFS project was being killed off. But in November 2006, [[Steve Ballmer]] said in an interview that WinFS is being actively developed but integration into the Windows codebase will come only after the technology has fully incubated.<ref name="WinFS Alive"> It was subsequently confirmed in an interview with [[Bill Gates]] and that Microsoft plans to migrate applications like [[Windows Media Player]], [[Windows Photo Gallery]], [[Microsoft Office Outlook]] etc to use WinFS as the data storage back-end.<ref>{{cite web|Author=Daniel Kornev|url=http://channel9.msdn.com/ShowPost.aspx?PostID=267149|title=A few words about WinFS: The project is back on track|publisher=Channel 9|date=[[December 19]], [[2006]]}}</ref>
Examples of uses of the technology are the [[object-relational mapping]] components into [[ADO.NET#Entity Framework|ADO.NET Entity Framework]]; support for unstructured data, adminless mode of operation, support for [[file system]] objects via the <code>FILESTREAM</code> data type, and hierarchical data  in [[Microsoft SQL Server#SQL Server 2008|SQL Server 2008]], then codenamed ''Katmai'', as well as integration with [[Win32]] [[API]]s and [[Windows Shell]] and support for traversal of hierarchies by traversing relationships into later releases of [[Microsoft SQL Server]];<ref name="where" /> and the synchronization components into [[Microsoft Sync Framework]].<ref name="where" />


== Data storage ==
In 2013 Bill Gates cited WinFS as his greatest disappointment at Microsoft and that the idea of WinFS was ahead of its time, which will re-emerge.<ref>[https://www.theregister.co.uk/2013/02/12/bill_gates_reddit_ama/ "Billionaire baron Bill Gates still mourns Vista's stillborn WinFS."]</ref>
=== Architecture ===
[[Image:WinFSArch.svg|thumb|right|225px|Architecture of the WinFS Stack]]
WinFS is not a physical file system; rather, it provides schematized data modeling capabilities on top of the NTFS file system. It still uses NTFS to store its data in physical files.<ref Name="PaulT"/> WinFS uses a relational engine, which is derived from SQL Server 2005,<ref>{{cite web | url = http://www.betanews.com/article/MS_Explains_WinFS_Releases_Beta_1/1125353356 | title = MS Explains WinFS, Releases Beta 1 | publisher = BetaNews | author = Nate Mook | accessdate = 2007-07-02}}</ref> to provide the data relations mechanism. WinFS stores are simply SQL Server database (.MDF) files with the FILESTREAM attribute set.<ref name="PDC">{{ cite web | url = http://microsoft.sitestream.com/PDC05/DAT/DAT209_files/intro.htm | title = "WinFS" Future Directions: An Overview | date = September 2005 | accessdate = 2006-05-22 | author = Shishir Mehrotra | work = [[Professional Developers Conference]] 2005 presentations | publisher = Microsoft }}(Currently offline, [http://www.ntfs.com/downloads/WinFS.ppt mirror]).</ref> These files are stored in access-restricted folder named "System Volume Information" placed into the volume root, in folders under the folder "WinFS" with names of [[Globally Unique Identifier|GUID]]s of these stores.<ref name="PDC"/>


At the bottom of the WinFS [[Solution stack|stack]] lies ''WinFS Core'' which interacts with the [[file system|filesystem]] and provides file access and addressing capabilities.<ref name="WinFSFiles"/> The relational engine leverages the WinFS core services to present a structured store and other services such as [[Lock (computer science)|locking]] which the WinFS runtime uses to implement the functionality. The WinFS runtime expose ''Services'' such as ''Synchronization'' and ''Rules'' which can be used to synchronize WinFS stores or perform certain actions on the occurence of certain events.<ref name="WinFSFiles"/>
==Data storage==


WinFS runs as a [[Windows Service|service]] which runs three [[Process (computing)|processes]]<ref>{{cite web | url = http://bloggingabout.net/blogs/erwyn/archive/2005/08/30/9156.aspx | title = First Look on WinFS Beta 1 | author =  Erwyn van der Meer | accessdate = 2007-07-03}}</ref> - ''WinFS.exe'', which hosts relational datastore, ''WinFSSearch.exe'', which hosts the indexing and querying engine, and ''WinFPM.exe (WinFS File Promotion Manager)'', which interfaces with the underlying file system. It allows programmatic access to its features, via a set of [[.NET Framework]] [[application programming interface|APIs]], that enables applications to define custom made data types, define relationships among data, store and retrieve information, and allow advanced searches.<ref name="Dev1"/><ref name="WinFSFiles"/> The applications can then aggregate the data and present the aggregated data to the user.
===Architecture===
[[Image:WinFSArch.svg|thumb|Architecture of the WinFS Stack]]


====Data Store====
WinFS uses a relational engine, which derives from SQL Server 2005,<ref>{{cite web | url = http://www.betanews.com/article/MS_Explains_WinFS_Releases_Beta_1/1125353356 | title = MS Explains WinFS, Releases Beta 1 | publisher = BetaNews | author = Nate Mook | access-date = 2007-07-02}}</ref> to provide the data-relations mechanism. WinFS stores are simply SQL Server database (.MDF) files with the FILESTREAM attribute set.<ref name="PDC">{{cite web | url = http://microsoft.sitestream.com/PDC05/DAT/DAT209_files/intro.htm | title = "WinFS" Future Directions: An Overview |date=September 2005 | access-date = 2006-05-22 | author = Shishir Mehrotra | work = [[Professional Developers Conference]] 2005 presentations | publisher = Microsoft |archive-url = https://web.archive.org/web/20060106033122/http://microsoft.sitestream.com/PDC05/DAT/DAT209_files/intro.htm |archive-date = January 6, 2006}}(Currently offline, [http://www.ntfs.com/downloads/WinFS.ppt mirror]).</ref> These files are stored in the access-restricted folder named "System Volume Information" (placed in the volume root), in folders under the folder "WinFS" with names of [[Globally Unique Identifier|GUID]]s of these stores.<ref name="PDC" />
WinFS stores data in relational sotres, which are exposed as virtual locations called ''stores''.<ref Name="PaulT"/> A WinFS store is a common repository where any application can store data along with its metadata, relationships and schema. WinFS runtime can apply certain relationships itself; for example, if the values of the ''subject'' property of a picture and the ''name'' property of a contact are same, then WinFS can relate the contact with the picture.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/13/465269.aspx | title = WinFS Mailbox | publisher = WinFS Team Blog | author = Vijay Bangaru | accessdate = 2007-06-30}}</ref> Relations can also be specified by other applications or the user.<ref name="MSDNMag">{{cite web | url = http://msdn.microsoft.com/msdnmag/issues/04/01/WinFS/ | title = Revolutionary File Storage System Lets Users Search and Manage Files Based on Content | publisher = MSDN Magazine | author = Richard Grimes | accessdate = 2007-06-30}}</ref>  


WinFS provides a unified storage but stops short of defining the format that is to be stored in the data stores. Instead it supports data to be written in application specific formats. But applications must provide a [[logical schema|schema]] that defines how the file format should be interpreted.<ref name="Dev1"/> For example, a schema could be added to allow WinFS to understand how to read and thus be able to search and analyze, say, a [[PDF]] file. By using the schema, any application can read data from any other application, and also allows different applications to write in each other’s format by sharing the schema.<ref name="MSDNMag"/>
At the bottom of the WinFS stack lies ''WinFS Core'', which interacts with the [[file system|filesystem]] and provides file-access and -addressing capabilities.<ref name="WinFSFiles" /> The relational engine leverages the WinFS core services to present a structured store and other services such as [[Lock (computer science)|locking]], which the WinFS runtime uses to implement the functionality. The WinFS runtime exposes ''services'' such as ''Synchronization'' and ''Rules'' that can be used to synchronize WinFS stores or perform certain actions on the occurrence of certain events.<ref name="WinFSFiles" />


Multiple WinFS stores can be created on a single machine.<ref name="MSDNMag"/> This allows different classes of data to be kept segregated, for example, official documents and personal documents can be kept in different stores. WinFS, by default, provides only one store, named "DefaultStore".<ref Name="PaulT"/> WinFS stores are exposed as shell objects, akin to [[Virtual folder]]s, which dynamically generates a list of all items present in the store and presents them in a folder view. The shell object also allows searching information in the datastore.<ref Name="PaulT"/>
WinFS runs as a [[Windows Service|service]] that runs three [[Process (computing)|processes]]:<ref>{{cite web | url = http://bloggingabout.net/blogs/erwyn/archive/2005/08/30/9156.aspx | title = First Look on WinFS Beta 1 | author = Erwyn van der Meer | access-date = 2007-07-03 | url-status = dead | archive-url = https://web.archive.org/web/20070609022722/http://bloggingabout.net/blogs/erwyn/archive/2005/08/30/9156.aspx | archive-date = 2007-06-09 }}</ref>


A data unit that has to be stored in a WinFS store is called a WinFS ''Item''.<ref name="MSDNMag"/><ref name="Dev1"/> A WinFS item, along with the core data item, also contains information on how the data item is related with other data. This ''Relationship'' is stored in terms of logical links. Links specify which other data items the current item is related with. Put in other words, links specify the relationship of the data with other data items. Links are physically stored using a link identifier, which specifies the name and intent of the relationship, such as ''type of'' or ''consists of''.<ref name="Dev1"/> The link identifier is stored as an attribute of the data item. All the objects which have the same link id are considered to be related.<ref name="Dev1"/> An [[XML schema]], defining the structure of the data items that will be stored in WinFS, must be supplied to the WinFS runtime beforehand.<ref name="Dev1"/> In Beta 1 of WinFS, the schema assembly had to be added to the GAC before it could be used.
# ''WinFS.exe'', which hosts relational datastore
# ''WinFSSearch.exe'', which hosts the indexing and querying engine
# ''WinFPM.exe (WinFS File Promotion Manager)'', which interfaces with the underlying file-system


=== Data model ===
It allows programmatic access to its features via a set of [[.NET Framework]] [[application programming interface|APIs]]. These enable applications to define custom-made data types, define relationships among data, store and retrieve information, and allow advanced searches.<ref name="Dev1a" /><ref name="WinFSFiles" /> The applications can then aggregate the data and present the aggregated data to the user.


WinFS models data using the data items, along with its [[RDBMS|relationships]], extensions and rules governing its usage.<ref name="WinFSFiles"/> WinFS needs to understand the type and structure of the data items, so that the information stored in the data item can be made available to any application that requests it. This is done by the use of schemas. For every type of data item that is to be stored in WinFS, a corresponding schema needs to be provided which will define the type, structure and associations of the data. These schemas are defined using [[XML]].<ref name="Dev1"/>
====Data store====
WinFS stores data in relational stores, which are exposed as virtual locations called ''stores''.<ref name="PaulT" /> A WinFS store is a common repository where any application can store data along with its metadata, relationships and schema. WinFS runtime can apply certain relationships itself; for example, if the values of the ''subject'' property of a picture and the ''name'' property of a contact are same, then WinFS can relate the contact with the picture.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/13/465269.aspx | title = WinFS Mailbox | publisher = WinFS Team Blog | author = Vijay Bangaru | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070522092310/http://blogs.msdn.com/winfs/archive/2005/09/13/465269.aspx | archive-date = 2007-05-22 | url-status = dead }}</ref> Relations can also be specified by other applications or the user.<ref name="MSDNMag">{{cite web
|url          = http://msdn.microsoft.com/msdnmag/issues/04/01/WinFS/
|title        = Revolutionary File Storage System Lets Users Search and Manage Files Based on Content
|publisher    = MSDN Magazine
|author      = Richard Grimes
|access-date  = 2007-06-30
|archive-url  = https://web.archive.org/web/20070627075520/http://msdn.microsoft.com/msdnmag/issues/04/01/WinFS/
|archive-date = 2007-06-27
|url-status    = dead
}}</ref>


Predefined WinFS schemas include schemas for documents, e-mail, appointments, tasks, media, audio, video, and also includes system schemas that include configuration, programs, and other system-related data.<ref name="WinFSFiles"/> Custom schemas can be defined on a per-application basis, in situations where an application wants to store its data in WinFS, but not share the structure of that data with other applications, or they can be made available across the system.<ref name="WinFSFiles"/>
WinFS provides unified storage, but stops short of defining the format that is to be stored in the data stores. Instead it supports writing data in application-specific formats. But applications must provide a [[logical schema|schema]] that defines how the file format should be interpreted.<ref name="Dev1a" /> For example, a schema could be added to allow WinFS to understand how to read and thus be able to search and analyze, (say) a [[PDF]] file. By using the schema, any application can read data from any other application, and this also allows different applications to write in each other's format by sharing the schema.<ref name="MSDNMag" />


==== Type system ====
Multiple WinFS stores can be created on a single machine.<ref name="MSDNMag" /> This allows different classes of data to be kept segregated; for example, official documents and personal documents can be kept in different stores. WinFS, by default, provides only one store, named "DefaultStore".<ref name="PaulT" /> WinFS stores are exposed as shell objects, akin to [[Virtual folder]]s, which dynamically generate a list of all items present in the store and present them in a folder view. The shell object also allows searching information in the datastore.<ref name="PaulT" />
[[Image:WinFS1.svg|225px|right|thumb|WinFS Type Hierarchy]]


The most important difference between a file system and WinFS is that WinFS knows the type of each data item that it stores. And the type specifies the properties of the data item. The WinFS type system is closely associated with the .NET framework’s concept of [[Object-oriented programming|classes and inheritance]]. A new type can be created by [[Object-oriented programming|extending]] and nesting any predefined types.<ref name="Dev1"/>
A data unit that has to be stored in a WinFS store is called a WinFS ''Item''.<ref name="Dev1a" /><ref name="MSDNMag" /> A WinFS item, along with the core data item, also contains information on how the data item is related to other data. This ''Relationship'' is stored in terms of logical links. Links specify which other data items the current item is related with. Put in other words, links specify the relationship of the data with other data items. Links are physically stored using a link identifier, which specifies the name and intent of the relationship, such as ''type of'' or ''consists of''.<ref name="Dev1a" /> The link identifier is stored as an attribute of the data item. All the objects that have the same link ID are considered to be related.<ref name="Dev1a" /> An [[XML schema]], defining the structure of the data items that will be stored in WinFS, must be supplied to the WinFS runtime beforehand.<ref name="Dev1a" /> In Beta 1 of WinFS, the schema assembly had to be added to the GAC before it could be used.


WinFS provides four predefined base types &ndash; ''Items'', ''Relationships'', ''ScalarTypes'' and ''NestedTypes''.<ref name="Dev1"/> An Item is the fundamental data object, which can be stored, and a Relationship is the relation or link between two data items. Since all WinFS items must have a type, the type of item stored defines its properties. The properties of an Item may be a ScalarType, which defines the smallest unit of information a property can have, or a NestedType, which is a collection of more than one ScalarTypes and/or NestedTypes. All WinFS types are made available as .NET CLR [[Class (computer science)|classes]].<ref name="MSDNMag"/>
===Data model===
WinFS models data using the data items, along with their [[RDBMS|relationships]], extensions and rules governing its usage.<ref name="WinFSFiles" /> WinFS needs to understand the type and structure of the data items, so that the information stored in the data item can be made available to any application that requests it. This is done by the use of schemas. For every type of data item that is to be stored in WinFS, a corresponding schema needs to be provided to define the type, structure and associations of the data. These schemas are defined using [[XML]].<ref name="Dev1a" />


Any object represented as a data unit, such as contact, image, video, document etc, can be stored in a WinFS store as a specialization of the Item type.<ref name="MSDNMag"/> By default, WinFS provides Item types for Files, Contact, Documents, Pictures, Audio, Video, Calendar, and Messages. The File Item can store any generic data, which is stored in file systems as files. But unless an advanced schema is provided for the file, by defining it to be a specialized Item, WinFS will not be able to access its data. Such a file Item can only support being related to other Items.<ref name="Dev1"/>
Predefined WinFS schemas include schemas for documents, e-mail, appointments, tasks, media, audio, video, and also includes system schemas that include configuration, programs, and other system-related data.<ref name="WinFSFiles" /> Custom schemas can be defined on a per-application basis, in situations where an application wants to store its data in WinFS, but not share the structure of that data with other applications, or they can be made available across the system.<ref name="WinFSFiles" />


[[Image:WinFS2.svg|225px|right|thumb|Defining a new Type]]
====Type system====
[[Image:WinFS1.svg|thumb|WinFS Type Hierarchy]]


A developer can extend any of these types, or the base type Item, to provide a type for his custom data. The data contained in an Item is defined in terms of properties, or fields which hold the actual data. For example, an Item ''Contact'' may have a field ''Name'' which is a ScalarType, and one field ''Address'', a NestedType, which is further composed of two ScalarTypes. To define this type, the base class Item is extended and the necessary fields are added to the class.<ref name="Dev1"/> A NestedType field can be defined as another class which contains the two ScalarType fields. Once the type is defined, a schema has to be defined, which denotes the primitive type of each field, for example, the Name field is a String, the Address field is a custom defined Address class, both the fields of which are Strings. Other primitive types that WinFS supports are [[Integer]], [[Byte]], [[Decimal#Decimal fractions|Decimal]], [[IEEE 754|Float]], [[Double precision|Double]], [[Logical value|Boolean]] and DateTime, among others.<ref name="Dev1"/> The schema will also define which fields are mandatory and which are optional.<ref name="Dev2">{{ cite web | url = http://msdn2.microsoft.com/en-us/library/ms996631.aspx | title = A Developer's Perspective on WinFS: Part 2 | date = July 2004 | accessdate = 2007-06-30 | author = Shawn Wildermuth | work = MSDN | publisher = Microsoft }}</ref> The Contact Item defined in this way will be used to store information regarding the Contact, by populating the properties field and storing it. Only those fields marked as mandatory needs to be filled up during initial save.<ref name="MSDNMag"/> Other fields may be populated later by the user, or not populated at all. If more properties fields, such as ''"last conversed date"'', needs to be added, this type can be simply extended to accommodate them. Item types for other data can be defined similarly.
The most important difference between a file system and WinFS is that WinFS knows the type of each data item that it stores. And the type specifies the properties of the data item. The WinFS type system is closely associated with the .NET framework's concept of [[Object-oriented programming|classes and inheritance]]. A new type can be created by [[Object-oriented programming|extending]] and nesting any predefined types.<ref name="Dev1a" />


[[Image:WinFS3.svg|225px|right|thumb|Relationships]]
WinFS provides four predefined base types &ndash; ''Items'', ''Relationships'', ''ScalarTypes'' and ''NestedTypes''.<ref name="Dev1a" /> An Item is the fundamental data object which can be stored, and a Relationship is the relation or link between two data items. Since all WinFS items must have a type, the type of item stored defines its properties. The properties of an Item may be a ScalarType, which defines the smallest unit of information a property can have, or a NestedType, which is a collection of more than one ScalarTypes and/or NestedTypes. All WinFS types are made available as .NET CLR [[Class (computer science)|classes]].<ref name="MSDNMag" />


WinFS creates [[RDBMS|tables]] for all defined Items.<ref name="Dev2"/> All the fields defined for the Item form the columns of the table and all instances of the Item are stored as rows in the table for the respective Items. Whenever some field in the table refers to data in some other table, it is considered a relationship. The schema of the relationship specifies which tables are involved and what the kind and name of the relationshp is. The WinFS runtime manages the relationshp schemas.<ref name="MSDNMag"/> All Items are exposed as .NET CLR [[Object-oriented programming|objects]], with uniform interface providing access to the data stored in the fields. Thus any application can retrieve object of any Item type and can use the data in the object, without being bothered about the physical structure the data was stored in.<ref name="Dev1"/>
Any object represented as a data unit, such as contact, image, video, document etc., can be stored in a WinFS store as a specialization of the Item type.<ref name="MSDNMag" /> By default, WinFS provides Item types for Files, Contact, Documents, Pictures, Audio, Video, Calendar, and Messages. The File Item can store any generic data, which is stored in file systems as files. But unless an advanced schema is provided for the file, by defining it to be a specialized Item, WinFS will not be able to access its data. Such a file Item can only support being related to other Items.<ref name="Dev1a" />


WinFS types are exposed as .NET classes, which can be instantiated as .NET objects. Data is stored in these type instances by setting their properties. Once done, they are persisted into the WinFS store. An WinFS store is accessed using an ''ItemContext'' class (see [[#Data retrieval|Data retrieval]] section for details). ItemContext allows transactional access to the WinFS store, i.e., all the operations since binding an ItemContext object to a store till it is closed either all succeeds or all changes are rolled back. As the changes are made to the data, they are nor written to the disc; rather they are written to a in-memory log. Only when the connection is closed are the changes written to the disc in a batch. This helps optimize disc I/O.<ref name="DotNetShow"/> The following code snippet creates a contact and stores in a WinFS store.
[[Image:WinFS2.svg|thumb|Defining a new Type]]


<source lang="csharp">
A developer can extend any of these types, or the base type Item, to provide a type for his custom data. The data contained in an Item is defined in terms of properties, or fields that hold the actual data. For example, an Item ''Contact'' may have a field ''Name'' that is a ScalarType, and one field ''Address'', a NestedType, which is further composed of two ScalarTypes. To define this type, the base class Item is extended and the necessary fields are added to the class.<ref name="Dev1a" /> A NestedType field can be defined as another class that contains the two ScalarType fields. Once the type is defined, a schema has to be defined, which denotes the primitive type of each field, for example, the Name field is a String, the Address field is a custom defined Address class, both the fields of which are Strings. Other primitive types that WinFS supports are [[Integer]], [[Byte]], [[Decimal#Decimal fractions|Decimal]], [[IEEE 754|Float]], [[Double precision|Double]], [[Logical value|Boolean]] and DateTime, among others.<ref name="Dev1a" /> The schema will also define which fields are mandatory and which are optional.<ref name="Dev2">{{cite web | url = http://msdn2.microsoft.com/en-us/library/ms996631.aspx | title = A Developer's Perspective on WinFS: Part 2 |date=July 2004 | access-date = 2007-06-30 | author = Shawn Wildermuth | work = MSDN | publisher = Microsoft }}</ref> The Contact Item defined in this way will be used to store information regarding the Contact, by populating the properties field and storing it. Only those fields marked as mandatory needs to be filled up during initial save.<ref name="MSDNMag" /> Other fields may be populated later by the user, or not populated at all. If more properties fields, such as ''last conversed date'', need to be added, this type can be extended to accommodate them. Item types for other data can be defined similarly.
 
[[Image:WinFS3.svg|thumb|Relationships]]
 
WinFS creates [[RDBMS|tables]] for all defined Items.<ref name="Dev2" /> All the fields defined for the Item form the columns of the table and all instances of the Item are stored as rows in the table for the respective Items. Whenever some field in the table refers to data in some other table, it is considered a relationship. The schema of the relationship specifies which tables are involved and what the kind and name of the relationship is. The WinFS runtime manages the relationship schemas.<ref name="MSDNMag" /> All Items are exposed as .NET CLR [[Object-oriented programming|objects]], with a uniform interface providing access to the data stored in the fields. Thus any application can retrieve object of any Item type and can use the data in the object, without being aware of the physical structure the data was stored in.<ref name="Dev1a" />
 
WinFS types are exposed as .NET classes, which can be instantiated as .NET objects. Data are stored in these type instances by setting their properties. Once done, they are persisted into the WinFS store. A WinFS store is accessed using an ''ItemContext'' class (see [[#Data retrieval|Data retrieval]] section for details). ItemContext allows transactional access to the WinFS store; i.e. all the operations since binding an ItemContext object to a store till it is closed either all succeed or are all rolled back. As changes are made to the data, they are not written to the disc; rather they are written to an in-memory log. Only when the connection is closed are the changes written to the disc in a batch. This helps to optimize disc I/O.<ref name="DotNetShow" /> The following code snippet, written in [[C Sharp (programming language)|C#]], creates a contact and stores it in a WinFS store.
 
<syntaxhighlight lang="csharp">
  //Connect to the default WinFS store
  //Connect to the default WinFS store
  using(ItemContext ic = ItemContext.Open())
  using(ItemContext ic = ItemContext.Open())
  {
  {
     //Create the contact and set the data in appropriate properties
     //Create the contact and set the data in appropriate properties
     ContactEAddress contact = new ContactEAddress();
     ContactEAddress contact = new ContactEAddress() {
 
        Name = new PersonName() {                      // Name is a ComplexType
    //Name is a ComplexType
            Displayname = "Doe, John",
    contact.Name = new PersonName();                 
            FirstName = "John",
        contact.Name.Displayname = "Doe, John";
            LastName = "Doe"
        contact.Name.FirstName = "John";
        },
        contact.Name.LastName = "Doe";
        TelephoneNumber = new TelephoneNumber() {    // Telephone number is a ComplexType
 
            Country = CountryCode.Antarctica,
    //Telephone number is a ComplexType
            Areacode = 4567,
    contact.TelephoneNumber = new TelephoneNumber()//ComplexType
            Number = 9876543210
        contact.TelephoneNumber.Country = CountryCode.Antarctica;
        },
        contact.TelephoneNumber.Areacode = 4567;
        Age = 111                                    // Age is a SimpleType
        contact.TelephoneNumber.Number = 9876543210;
    };
 
    //Age is a SimpleType
    contact.Age = 111;


     //Add the object to the user's personal folder.
     //Add the object to the user's personal folder.
Line 179: Line 192:
     using (ItemSearcher searcher = Picture.GetSearcher(ic))
     using (ItemSearcher searcher = Picture.GetSearcher(ic))
     {
     {
         Picture p = searcher.Find(@"Occassion = 'Graduation' and Sequence = '3'");
         Picture p = searcher.Find(@"Occasion = 'Graduation' and Sequence = '3'");
         p.OutSubjectRelationship.AddItem(ic, contact);
         p.OutSubjectRelationship.AddItem(ic, contact);
     }
     }
Line 185: Line 198:
     //Persist to the store and close the reference to the store
     //Persist to the store and close the reference to the store
     ic.Update();
     ic.Update();
    ic.Close();
  }
  }
</source>
</syntaxhighlight>
 
==== Relationships ====


A datum can be [[Relational model|related]] to one more item, giving rise to a one-to-one relationship, or with more than one items, resulting in a one-to-many relationship.
====Relationships====
<ref name="Dev1a">{{cite web | url = http://msdn2.microsoft.com/en-us/library/ms996622.aspx | title = A Developer's Perspective on WinFS: Part 1 | publisher = MSDN | author = Shawn Wildermuth | accessdate = 2007-06-30}}</ref> The related items, in turn, may be related to other data items as well, resulting in a network of relationships, which is called a many-to-many relationship. Creating a relationship between two Items create another field in the data of the Items concerned which refer the row in the other Item’s table where the related object is stored.<ref name="MSDNMag"/>
A datum can be [[Relational model|related]] to one more item, giving rise to a one-to-one relationship, or with more than one items, resulting in a one-to-many relationship.<ref name="Dev1a" /> The related items, in turn, may be related to other data items as well, resulting in a network of relationships, which is called a many-to-many relationship. Creating a relationship between two Items creates another field in the data of the Items concerned which refer the row in the other Item's table where the related object is stored.<ref name="MSDNMag" />
[[Image:WinFS4.svg|225px|thumb|right|WinFS Relationships]]
[[Image:WinFS4.svg|thumb|WinFS Relationships]]
In WinFS, a Relationship is an instance of the base type Relationship, which is extended to signify a specialization of a relation. A Relationship is a mapping between two items, a Source and a Target. The source has an Outgoing Relationship, whereas the target gets an Incoming Relationship.<ref name="Dev2"/> WinFS provides three types of primitive relationships – ''Holding Relationship'', ''Reference Relationship'' and ''Embedding Relationship''.<ref name="Dev1a"/> Any custom relationship between two data types are instances of these relationship types.
In WinFS, a Relationship is an instance of the base type Relationship, which is extended to signify a specialization of a relation. A Relationship is a mapping between two items, a Source and a Target. The source has an Outgoing Relationship, whereas the target gets an Incoming Relationship.<ref name="Dev2" /> WinFS provides three types of primitive relationships – ''Holding Relationship'', ''Reference Relationship'' and ''Embedding Relationship''.<ref name="Dev1a" /> Any custom relationship between two data types are instances of these relationship types.


*'''Holding Relationships''' specifies ownership and lifetime (which defines how long the relationship is valid) of the Target Item. For example, the Relationship between a folder and a file, and between an Employee and his Salary record, is a Holding Relationship – the latter is to be removed when the former is removed. A Target Item can be a part of more than one Holding Relationships. In such a case, it is to be removed when all the Source Items are removed.
*'''Holding Relationships''' specifies ownership and lifetime (which defines how long the relationship is valid) of the Target Item. For example, the Relationship between a folder and a file, and between an Employee and his Salary record, is a Holding Relationship – the latter is to be removed when the former is removed. A Target Item can be a part of more than one Holding Relationships. In such a case, it is to be removed when all the Source Items are removed.
*'''Reference Relationships''' provide linkage between two Items, but do not have any lifetime associated, i.e., each Item will continue to be stored even without the other.
*'''Reference Relationships''' provide linkage between two Items, but do not have any lifetime associated, i.e., each Item will continue to be stored even without the other.
*'''Embedding Relationships''' give order to the two Items which are linked by the Relationship, such as the Relationship between a Parent Item and a Child Item.
*'''Embedding Relationships''' give order to the two Items that are linked by the Relationship, such as the Relationship between a Parent Item and a Child Item.
 
Relationships between two Items can either be set programmatically by the application creating the data, or the user can use the WinFS Item Browser to manually relate the Items.<ref name="Dev2"/> A WinFS item browser can also graphically display the items and how they are related, to enable the user to know how their data are organized.<ref name="MSDNMag"/>


==== Rules ====
Relationships between two Items can either be set programmatically by the application creating the data, or the user can use the WinFS Item Browser to manually relate the Items.<ref name="Dev2" /> A WinFS item browser can also graphically display the items and how they are related, to enable the user to know how their data are organized.<ref name="MSDNMag" />


WinFS includes ''Rules'',<ref name="Rules">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/10/10/479416.aspx | title = About WinFS Rules | author = Kati Dimitrova | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref> which are executed when certain condition is met. WinFS rules work on data and data relationships. For example, a rule can be created which states that whenever an Item is created which contains field ''"Name"'' and if the value of that field is some particular name, a relationship should be created which relates the Item with some other Item. WinFS rules can also access any external application. For example, a rule can be built which launches a ''Notify'' application whenever a mail is received from a particular contact.<ref name="Rules"/> WinFS rules can also be used to add new properties fields to existing data Items.<ref name="Rules"/>
====Rules====
WinFS includes ''Rules'',<ref name="Rules">{{cite web |url=http://blogs.msdn.com/winfs/archive/2005/10/10/479416.aspx |title=About WinFS Rules |author=Kati Dimitrova |publisher=[[Microsoft]] |work=[[Microsoft Developer Network|MSDN]] |access-date=March 2, 2018 |archive-url=https://web.archive.org/web/20081226193655/http://blogs.msdn.com/winfs/archive/2005/10/10/479416.aspx |archive-date=2008-12-26 |url-status=dead }}</ref> which are executed when a certain condition is met. WinFS rules work on data and data relationships. For example, a rule can be created that states that whenever an Item is created which contains field ''"Name"'' and if the value of that field is some particular name, a relationship should be created that relates the Item with some other Item. WinFS rules can also access any external application. For example, a rule can be built which launches a ''Notify'' application whenever a mail is received from a particular contact.<ref name="Rules" /> WinFS rules can also be used to add new properties fields to existing data Items.<ref name="Rules" />


WinFS rules are also exposed as .NET CLR objects. As such any rule can be used for any purpose. A rule can even be extended by inheriting from it to form a new rule which consists of the condition and action of the parent rule plus something more.<ref name="Rules"/>
WinFS rules are also exposed as .NET CLR objects. As such any rule can be used for any purpose. A rule can even be extended by inheriting from it to form a new rule that consists of the condition and action of the parent rule plus something more.<ref name="Rules" />


==RAV==
===RAV===
WinFS supports creating ''Rich Application Views'' (RAV) by aggregating different data in a virtual table format. Unlike [[View (database)|database view]], where each individual element can only be a scalar value, RAVs can have complex Items or even collection of Items. The actual data can be across multiple data types or instances and can even be retrieved by traversing relationships.<ref name="DotNetShow"/> RAVs are intrinsically paged (dividing the entire set of data into smaller ''pages'' containing disconnected subsets of the data) by the WinFS runtime. The page size is defined during creation of the view and the WinFS API exposes methods to iterate over the pages. RAVs also supports modification of the view according to different grouping parameters. Views can also be queried against.
WinFS supports creating ''Rich Application Views'' (RAV) by aggregating different data in a virtual table format. Unlike [[View (database)|database view]], where each individual element can only be a scalar value, RAVs can have complex Items or even collections of Items. The actual data can be across multiple data types or instances and can even be retrieved by traversing relationships.<ref name="DotNetShow" /> RAVs are intrinsically paged (dividing the entire set of data into smaller ''pages'' containing disconnected subsets of the data) by the WinFS runtime. The page size is defined during creation of the view and the WinFS API exposes methods to iterate over the pages. RAVs also supports modification of the view according to different grouping parameters. Views can also be queried against.


=== Access control ===
===Access control===
Even though all data are shared, everything is not equally accessible. WinFS uses the [[Integrated Windows Authentication|Windows authentication system]] to provide two data protection mechanisms.<ref name="MSDNMag" /> First, there is share-level security that controls access to your WinFS share. Second, there is item level security that supports NT compatible security descriptors. The process accessing the item must have enough privileges to access it. Also in Vista there is the concept of ''"integrity level"'' for an application. Higher integrity data cannot be accessed by a lower integrity process.


Even though all data is shared, everything is not equally accessible. WinFS uses [[Integrated Windows Authentication|Windows authentication system]] to provide two data protection mechanisms.<ref name="MSDNMag"/> First, there is share-level security that controls access to your WinFS share. Second, there is item level security that supports NT compatible security descriptors. The process accessing the item must have enough privileges to access it. Also in Vista there is the concept of ''"integrity level"'' for an application. A higher integrity data cannot be accessed by a lower integrity process.
==Data retrieval==
[[Image:WinFSFlowChart.svg|thumb|Flowchart for creating, searching and updating WinFS data instances]]
The primary mode of data retrieval from a WinFS store is querying the WinFS store according to some criteria,<ref name="WinFSFiles" /> which returns an [[enumerable]] set of items matching the criteria. The criteria for the query is specified using the [[#OPath|OPath]] [[query language]]. The returned data are made available as instances of the type schemas, conforming to the [[Microsoft .NET|.NET]] [[Object-oriented programming|object model]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/18/494707.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 4) | author = Vijay Bangaru | publisher = WinFS Team Blog | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070618154258/http://blogs.msdn.com/winfs/archive/2005/11/18/494707.aspx | archive-date = 2007-06-18 | url-status = dead }}</ref> The data in them can be accessed by accessing the properties of individual objects.<ref name="Dev2" />


== Data retrieval ==
Relations are also exposed as properties. Each WinFS Item has two properties, named ''IncomingRelationships'' and ''OutgoingRelationships'', which provide access to the set of relationship instances the item participates in. The other item which participates in one relationship instance can be reached through the proper relationship instance.<ref name="DotNetShow" /><ref name="Dev2" />
[[Image:WinFSFlowChart.svg|thumb|right|225px|Flowchartt for creating, searching and updating WinFS data instances.]]
The primary mode of data retrieval from a WinFS store is querying the WinFS store according to some criteria,<ref name="WinFSFiles"/> which returns an [[enumerable]] set of items matching the criteria. The criteria for the query is specified using the [[#OPath|OPath]] [[Query language|query]] language. The returned data is made available as instances of the type schemas, conforming to the [[Microsoft .NET|.NET]] [[Object-oriented programming|object model]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/18/494707.aspx | title = Unify, Organize, Explore, and Innovate. Oh my! (Part 4) | author = Vijay Bangaru | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref> The data in them can be accessed by accessing the properties of individual objects.<ref name="Dev2"/>  


Relations are also exposed as properties. Each WinFS Item has two properties, named ''IncomingRelationships'' and ''OutgoingRelationships'', which provides access to the set of relationship instances the item participates in. The other item which participates in one relationship instance can be reached through the proper relationship instance.<ref name="Dev2"/><ref name="DotNetShow"/>
The fact that the data can be accessed using its description, rather than location, can be used to provide end-user organizational capabilities without limiting to the hierarchical organization as used in file-systems. In a file system, each file or folder is contained in only one folder. But WinFS Items can participate in any number of holding relationships, that too with any other items. As such, end users are not limited to only file/folder organization. Rather, a contact can become a container for documents; a picture a container for contacts and so on. For legacy compatibility, WinFS includes a pseudo-type called ''Folder,'' which is present only to participate in holding relationships and emulate file/folder organization. Since any WinFS Item can be related with more than one Folder item, from an end user perspective, an item can reside in multiple folders without duplicating the actual data.<ref name="DotNetShow" /> Applications can also analyze the relationship [[Graph (data structure)|graphs]] to present various filters. For example, an email application can analyze the related contacts and the relationships of the contacts with restaurant bills and dynamically generate filters like ''"Emails sent to people I had lunch with"''.


The fact that the data can be accessed using its description, rather than location, can be used to provide end-user organizational capabilities without limiting to the hierarchical organization as used in file-systems. In a file system, each file or folder is contained in only one folder. But WinFS Items can participate in any number of holding relationships, that too with any other items. As such, end users are not limited to only file/folder organization. Rather, a contact can become a container for documents; a picture a container for contacts and so on. For legacy compatibility, WinFS includes a pseudo-type called ''Folder'' which is present only to participate in holding relationships and emulate file/folder organization. Since any WinFS Item can be related with more than one Folder item, from an end user perspective, an item can reside in multiple folders without duplicating the actual data.<ref name="DotNetShow"/> Applications can also analyze the relationship [[Graph (data structure)|graphs]] to present various filters. For example, an email application can analyze the related contacts and the relationships of the contacts with restaurant bills and dynamically generate filters like ''"Emails sent to people I had lunch with"''.
===Searches===
=== Searches ===
The WinFS API provides a class called the ''ItemContext'' class, which is bound to a WinFS store. The ''ItemContext'' object can be used to scope the search to the entire store or a subset of it. It also provides [[Transaction (database)|transactional]] access to the store.<ref name="ForDev" /> An object of this class can then spawn an ''ItemSearcher'' object which then takes the type (an object representing the type) of the item to be retrieved or the relationship and the [[#OPath|OPath]] [[Query language|query]] string representing the criteria for the search.<ref name="Dev2" /><ref name="OPath">{{cite web | url = http://msdn2.microsoft.com/en-us/library/aa480689.aspx | title = An Introduction to "WinFS" OPath | date = October 18, 2004 | access-date = 2007-06-30 | author = Thomas Rizzo, Sean Grimaldi | work = MSDN | publisher = Microsoft }}</ref> A set of all matches is returned, which can then be bound to a UI widget for displaying ''en masse'' or enumerating individually.<ref name="MSDNMag" /> The properties items can also be modified and then stored back to the data store to update the data. The ItemContext object is ''closed'' (which marks the end of association of the object with the store) when the queries are made or changes merged into the store.
The WinFS API provides a class called the ''ItemContext'' class, which is bound to a WinFS store. The ''ItemContext'' object can be used to scope the search to the entire store or a subset of it. It also provides [[Transaction (database)|transactional]] access to the store.<ref name="ForDev"/> An object of this class can then spawn an ''ItemSearcher'' object which then takes the type (an object representing the type) of the item to be retrieved or the relationship and the [[#OPath|OPath]] [[Query language|query]] string<ref name="Dev2"/><ref name="OPath">{{ cite web | url = http://msdn2.microsoft.com/en-us/library/aa480689.aspx | title = An Introduction to "WinFS" OPath | date = [[October 18]] [[2004]] | accessdate = 2007-06-30 | author = Thomas Rizzo, Sean Grimaldi | work = MSDN | publisher = Microsoft }}</ref> representing the critieria for the search. A set of all matches are returned, which can then be bound to an UI widget for displaying ''en masse'' or enumerating individually.<ref name="MSDNMag"/> The properties items can also be modified and then stored back to the data store to update the data. The ItemContext object is ''closed'' (which marks the end of association of the object with the store) when the queries are made or changes merged into the store.


Related items can also be accessed through the items. The ''IncomingRelationships'' and ''OutgoingRelationships'' properties gives access to all the set of relationship instances, typed to the name of the relationship. These relationship objects expose the other item via a property. So, for example, if a picture is related to a picture, it can be accessed by ''traversing'' the relationship as:
Related items can also be accessed through the items. The ''IncomingRelationships'' and ''OutgoingRelationships'' properties give access to all the set of relationship instances, typed to the name of the relationship. These relationship objects expose the other item via a property. So, for example, if a picture is related to a picture, it can be accessed by ''traversing'' the relationship as:


<source lang="csharp">
<syntaxhighlight lang="csharp">
  ContactsCollection contacts = picture.OutgoingRelationships.Cast(typeof(Contact)).Value;
  ContactsCollection contacts = picture.OutgoingRelationships.Cast(typeof(Contact)).Value;
  //This retrieves the collection of all outgoing relationships from a picture object
  //This retrieves the collection of all outgoing relationships from a picture object
Line 234: Line 243:
  //Or the relationship can be statically specified as
  //Or the relationship can be statically specified as
  ContactsCollection contacts = picture.OutgoingRelationships.OutContactRelationship.Contact;
  ContactsCollection contacts = picture.OutgoingRelationships.OutContactRelationship.Contact;
</source>  
</syntaxhighlight>
 


{{anchor|OPath}}
{{anchor|OPath}}
An OPath query string allows to express the parameters that will be queried for to be specified using ''[[WinFS#Data Storage|Item]]'' properties, embedded ''Items'' as well as ''[[WinFS#Data Storage|Relationships]]''.<ref name="OPathAPI">{{cite web| title = Innovative Data Programming Platform | url = http://www.codeplex.com/classifier/Wiki/View.aspx?title=Innovative%20Data%20Programming%20Platform&referringTitle=WinFS | accessdate = 2007-03-15 }}</ref> It can specify a single search condition, such as ''"title = Something'"'', or a compound condition such as ''"title = 'Title 1' || title = 'Title 2' && author = 'Someone'"''. These boolean and relational operations can be specified using [[C Sharp|C#]] like ''&&'', ''||'', ''='', ''!='' operators as well as their English-like equivalent like ''EQUAL'', ''NOT EQUAL''. [[SQL]] like operators such as ''LIKE'', ''GROUP BY'' and ''ORDER BY'' are also supported, as is wildcard conditions.<ref name="OPathAPI"/> So, ''"title LIKE 'any*'"'' is a valid query string. These operators can be used to execute complex searches such as  
An OPath query string allows to express the parameters that will be queried for to be specified using ''[[WinFS#Data storage|Item]]'' properties, embedded ''Items'' as well as ''[[WinFS#Data storage|Relationships]]''.{{citation needed|date=January 2015}} It can specify a single search condition, such as ''"title = Something'"'', or a compound condition such as ''"title = 'Title 1' || title = 'Title 2' && author = 'Someone'"''. These boolean and relational operations can be specified using [[C Sharp (programming language)|C#]] like ''&&'', ''||'', ''='', ''!='' operators as well as their English-like equivalent like ''EQUAL'', ''NOT EQUAL''. [[SQL]] like operators such as ''LIKE'', ''GROUP BY'' and ''ORDER BY'' are also supported, as are wildcard conditions.{{citation needed|date=January 2015}} So, ''"title LIKE 'any*'"'' is a valid query string. These operators can be used to execute complex searches such as  
<source lang="csharp">
<syntaxhighlight lang="csharp">
  using ( ItemContext ic = ItemContext.Open() )
  using (ItemContext ic = ItemContext.Open() )
  {
  {
     //Searching begins by creating a ItemSearcher object. The searcher is created from a
     //Searching begins by creating a ItemSearcher object. The searcher is created from a
Line 250: Line 258:
     ItemSearcher searcher = OutContactRelationship.GetTargetSearcher(ic, typeof(Contact));
     ItemSearcher searcher = OutContactRelationship.GetTargetSearcher(ic, typeof(Contact));
     ContactCollection contacts = searcher.FindAll("OutContactRelationship.Contact.Name LIKE 'A*'");
     ContactCollection contacts = searcher.FindAll("OutContactRelationship.Contact.Name LIKE 'A*'");
    ic.Close();
  }
  }
</source>
</syntaxhighlight>
The above code snippet creates an ItemSearcher object that searchs on the ''OutContactRelationship'' instance that relates pictures and contacts, in effect searching all pictures related with a contact. It then runs the query ''Name LIKE 'A*'"'' on all contacts reachable through ''OutContactRelationship'', returning the list of ''"contacts whose names start with A and whose pictures I have''. Similarly more relationships could be taken into account to further narrow down the results.<ref name="Dev2"/><ref name="DotNetShow"/> Further, a natural language query processor, which parses query in natural language and creates a well-formed OPath query string to search via proper relationships, can allow users to make searches such as ''"find the name of the wine I had with person X last month"'', provided financial management applications are using WinFS to store bills.
The above code snippet creates an ItemSearcher object that searches on the ''OutContactRelationship'' instance that relates pictures and contacts, in effect searching all pictures related with a contact. It then runs the query ''Name LIKE 'A*'"'' on all contacts reachable through ''OutContactRelationship'', returning the list of ''"contacts whose names start with A and whose pictures I have"''. Similarly, more relationships could be taken into account to further narrow down the results.<ref name="DotNetShow" /><ref name="Dev2" /> Further, a natural language query processor, which parses query in natural language and creates a well-formed OPath query string to search via proper relationships, can allow users to make searches such as ''"find the name of the wine I had with person X last month"'', provided financial management applications are using WinFS to store bills.


Different relations specify a different set of data. So when a search is made which encompasses multiple relations, the different sets of data are retrieved individually and a [[Relational algebra|union]] of the different sets is computed. The resulting set contains only those data items which correspond to all the relations.<ref name="Dev2"/>
Different relations specify a different set of data. So when a search is made that encompasses multiple relations, the different sets of data are retrieved individually and a [[Relational algebra|union]] of the different sets is computed. The resulting set contains only those data items that correspond to all the relations.<ref name="Dev2" />


===Notifications===
===Notifications===
WinFS also includes better support for handling data that changes frequently. Using WinFS ''Notifications'', applications choose to be notified of changes to selected data ''Items''. WinFS will raise an ''ItemChangedEvent'', using the .NET Event model, when a subscribed-to Item changes, and the event will be published to the applications.<ref name="Dev2"/>
WinFS also includes better support for handling data that changes frequently. Using WinFS ''Notifications'', applications choose to be notified of changes to selected data ''Items''. WinFS will raise an ''ItemChangedEvent'', using the .NET Event model, when a subscribed-to Item changes, and the event will be published to the applications.<ref name="Dev2" />
 
== Data sharing ==
WinFS allows easy sharing of data between applications, and among multiple WinFS stores, which may reside on different computers, by copying to and from them.<ref name="Sync">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/17/494222.aspx | title = Getting Data Into WinFS with WinFS Synchronization | author = Neil Padgett | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref> A WinFS item can also be copied to a non-WinFS file system, but unless that data item is put back into the WinFS store, it will not support the advanced services provided by WinFS.


The WinFS API also provides some support for sharing with non-WinFS applications. WinFS exposes a shell object to access WinFS stores. This object maps WinFS items to a virtual folder hierarchy, and can be accessed by any application.<ref Name="PaulT"/> WinFS data can also be manually shared using [[network share]]s, by sharing the legacy shell object.<ref name="Sync"/> Non-WinFS file formats can be stored in WinFS stores, using the File Item, provided by WinFS. Importers can be written, to convert specific file formats to WinFS Item types.<ref name="Sync"/>
==Data sharing==
WinFS allows easy sharing of data between applications, and among multiple WinFS stores, which may reside on different computers, by copying to and from them.<ref name="Sync">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/11/17/494222.aspx | title = Getting Data Into WinFS with WinFS Synchronization | author = Neil Padgett | publisher = WinFS Team Blog | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070217152210/http://blogs.msdn.com/winfs/archive/2005/11/17/494222.aspx | archive-date = 2007-02-17 | url-status = dead }}</ref> A WinFS item can also be copied to a non-WinFS file system, but unless that data item is put back into the WinFS store, it will not support the advanced services provided by WinFS.


In addition, WinFS provides services to automatically synchronize items in two or more WinFS stores, subject to some predefined condition, such as "''share only photos''" or "''share photos which have an associated contact X''".<ref name="Sync"/> The stores may be on different computers. Synchronization is done in a [[peer-to-peer]] fashion; there is no central authority. A synchronization can be either manual or automatic or scheduled. During synchronization, WinFS finds the new and modified Items, and updates accordingly. If two or more changes conflict, WinFS can either resort to automatic resolution based on predefined rules, or defer the synchronization for manual resolution. WinFS also updates the schemas, if required.<ref name="Sync"/>
The WinFS API also provides some support for sharing with non-WinFS applications. WinFS exposes a shell object to access WinFS stores. This object maps WinFS items to a virtual folder hierarchy, and can be accessed by any application.<ref name="PaulT" /> WinFS data can also be manually shared using [[network share]]s, by sharing the legacy shell object.<ref name="Sync" /> Non-WinFS file formats can be stored in WinFS stores, using the File Item, provided by WinFS. Importers can be written, to convert specific file formats to WinFS Item types.<ref name="Sync" />


In addition, WinFS provides services to automatically synchronize items in two or more WinFS stores, subject to some predefined condition, such as "''share only photos''" or "''share photos that have an associated contact X''".<ref name="Sync" /> The stores may be on different computers. Synchronization is done in a [[peer-to-peer]] fashion; there is no central authority. A synchronization can be either manual or automatic or scheduled. During synchronization, WinFS finds the new and modified Items, and updates accordingly. If two or more changes conflict, WinFS can either resort to automatic resolution based on predefined rules, or defer the synchronization for manual resolution. WinFS also updates the schemas, if required.<ref name="Sync" />


==Application support==


==Application Support==
===Shell namespace===
===Shell namespace===
WinFS Beta 1 includes a [[Windows Shell|shell]] namespace extension, which surfaces WinFS stores as top level objects in ''My Computer'' view.<ref Name="PaulT"/> Files can be copied into and out of the stores, as well as applications can be directly used to save there. Even folders such as ''My Documents'' can be redirected to the stores.<ref Name="PaulT"/> WinFS uses ''Importer'' plug-ins to analyze the files as they were being imported to the store and create proper WinFS schemas and objects, and when taking the objects out, re-pack them into files.<ref name="Sync"/> If importers for certain files are not installed, they are stored as generic ''File'' types.
WinFS Beta 1 includes a [[Windows Shell|shell]] namespace extension, which surfaces WinFS stores as top level objects in ''My Computer'' view.<ref name="PaulT" /> Files can be copied into and out of the stores, as well as applications can be directly used to save there. Even folders such as ''My Documents'' can be redirected to the stores.<ref name="PaulT" /> WinFS uses ''Importer'' plug-ins to analyze the files as they were being imported to the store and create proper WinFS schemas and objects, and when taking the objects out, re-pack them into files.<ref name="Sync" /> If importers for certain files are not installed, they are stored as generic ''File'' types.


===Microsoft Rave===
===Microsoft Rave===
''Microsoft Rave'' is an application that shipped with [[WinFS|WinFS Beta 1]]. It allows synchronization of two or more WinFS stores. It supports synchronization in ''full mesh'' mode as well as the ''central hub'' topology. While synchronizing, Microsoft Rave will determine the changes made to each store since the last sync, and update accordingly. When applying the changes, it also detects if there is any conflict, i.e., the same data has been changed on both stores since the last synchronization. It will either log the conflicting data for later resolution or have it resolved immediately.  Microsoft Rave uses [[peer-to-peer]] technology to communicate and transfer data.
''Microsoft Rave'' is an application that shipped with WinFS Beta 1. It allows synchronization of two or more WinFS stores, and supports synchronization in ''full mesh'' mode as well as the ''central hub'' topology. While synchronizing, Microsoft Rave will determine the changes made to each store since the last sync, and update accordingly. When applying the changes, it also detects if there is any conflict, i.e., the same data has been changed on both stores since the last synchronization. It will either log the conflicting data for later resolution or have it resolved immediately.  Microsoft Rave uses [[peer-to-peer]] technology to communicate and transfer data.


===StoreSpy===
===StoreSpy===
[[Image:Storespy.jpg|thumb|right|225px|WinFS included ''StoreSpy'', an WinFS Item browser that could be used to browse structured data instances with their properties and relationships.]]
[[Image:Storespy.jpg|thumb|WinFS included ''StoreSpy'', a WinFS Item browser that could be used to browse structured data instances with their properties and relationships.]]
With WinFS Beta 1, Microsoft included an unsupported application called ''StoreSpy'',<ref>{{cite web | url = http://weimenglee.blogspot.com/2005/09/winfs-storespy.html | title = WinFS -StoreSpy | author = Wei-Meng Lee | accessdate = 2007-06-30}}</ref> which allowed one to browse WinFS stores by presenting a hierarchical view of WinFS Items. It automatically generated [[virtual folder]]s based on access permissions, date and other metadata, and presented them in a hierarchical tree view, akin to what traditional folders are presented in. The application generated tabs for different Item types. StoreSpy allowed viewing ''Items'', ''Relationships'', ''MultiSet'', ''Nested Elements'', ''Extensions''<ref>{{cite web|title = Stefano Demiliani WeBlog:WinFS StoreSpy v0.8 for the WinHEC 2004 Longhorn Build|url=http://dotnetjunkies.com/WebLog/demiliani/archive/2004/05/20/14044.aspx|accessdate=2007-03-12}}</ref> and other types in the store along with its full metadata. It also presented a search interface to perform manual searches, and save them as virtual folders. The application also presented a graphical view of WinFS Rules. However, it did not allow editing of Items or their properties, though it was slated for inclusion in a future release.<ref>{{cite web | url = http://winfx.edu.pl/art1953.html | title = StoreSpy should become StoreEditor | accessdate = 2007-06-30}}</ref> But the WinFS project was cut back before it could materialize.
With WinFS Beta 1, Microsoft included an unsupported application called ''StoreSpy'',<ref>{{cite web | url = http://weimenglee.blogspot.com/2005/09/winfs-storespy.html | title = WinFS -StoreSpy | author = Wei-Meng Lee | access-date = 2007-06-30| date = 2005-09-07 }}</ref> which allowed one to browse WinFS stores by presenting a hierarchical view of WinFS Items. It automatically generated [[virtual folder]]s based on access permissions, date and other metadata, and presented them in a hierarchical tree view, akin to what traditional folders are presented in. The application generated tabs for different Item types. StoreSpy allowed viewing ''Items'', ''Relationships'', ''MultiSet'', ''Nested Elements'', ''Extensions''<ref>{{cite web|title = Stefano Demiliani WeBlog:WinFS StoreSpy v0.8 for the WinHEC 2004 Longhorn Build|url=http://dotnetjunkies.com/WebLog/demiliani/archive/2004/05/20/14044.aspx|access-date=2007-03-12}}</ref> and other types in the store along with its full metadata. It also presented a search interface to perform manual searches, and save them as virtual folders. The application also presented a graphical view of WinFS Rules. However, it did not allow editing of Items or their properties, though it was slated for inclusion in a future release.<ref>{{cite web | url = http://winfx.edu.pl/art1953.html | title = StoreSpy should become StoreEditor | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070929121946/http://winfx.edu.pl/art1953.html | archive-date = 2007-09-29 | url-status = dead }}</ref> But the WinFS project was cut back before it could materialize.


===Type Browser===
===Type Browser===
WinFS also includes another application, named ''WinFS Type Browser'', which can be used to browse the WinFS types, as well as visualize the hierarchical relationship between WinFS types.<ref name="TypeBrowser">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/08/462713.aspx | title = Visualizing WinFS Types | author = Sanjay Nagamangalam | publisher = WinFS Team Blog | accessdate = 2007-07-03}}</ref> A WinFS type, both built-in types as well as custom schemas, can be visualized along with all the properties and methods that it supports. It also shows the types that it derives from as well as other types that extend the type schema. However, while it was included with WinFS, it was released as an unsupported tool.<ref name="TypeBrowser"/>
WinFS also includes another application, named ''WinFS Type Browser'', which can be used to browse the WinFS types, as well as visualize the hierarchical relationship between WinFS types.<ref name="TypeBrowser">{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/08/462713.aspx | title = Visualizing WinFS Types | author = Sanjay Nagamangalam | publisher = WinFS Team Blog | access-date = 2007-07-03 | archive-url = https://web.archive.org/web/20070816220238/http://blogs.msdn.com/winfs/archive/2005/09/08/462713.aspx | archive-date = 2007-08-16 | url-status = dead }}</ref> A WinFS type, both built-in types as well as custom schemas, can be visualized along with all the properties and methods that it supports. It also shows the types that it derives from as well as other types that extend the type schema. However, while it was included with WinFS, it was released as an unsupported tool.<ref name="TypeBrowser" />


===OPather===
===OPather===
WinFS Beta 1 also includes an unsupported application, named ''OPather''.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/13/465218.aspx | title = Using OPather To Help Write Queries | author = Luiz Miranda | publisher = WinFS Team Blog | accessdate = 2007-06-30}}</ref> It preents a [[GUI|graphical]] interface for writing [[#OPath|Opath]] queries. It can be used by selecting target object type and specifying the parameters of the query. It also includes [[Intellisense]]-like parameter completion feature. It can then be used to perform visualization tasks like binding results of a query to a ''[[Grid view|DataGrid]]'' control, create views of the data in WinFS itself, or just extract the query string.
WinFS Beta 1 also includes an unsupported application, named ''OPather''.<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2005/09/13/465218.aspx | title = Using OPather To Help Write Queries | author = Luiz Miranda | publisher = WinFS Team Blog | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20071119051226/http://blogs.msdn.com/winfs/archive/2005/09/13/465218.aspx | archive-date = 2007-11-19 | url-status = dead }}</ref> It presents a [[GUI|graphical]] interface for writing [[#OPath|Opath]] queries. It can be used by selecting target object type and specifying the parameters of the query. It also includes [[Intellisense]]-like parameter completion feature. It can then be used to perform visualization tasks like binding results of a query to a ''[[Grid view|DataGrid]]'' control, create views of the data in WinFS itself, or just extract the query string.


===Project "Orange"===
===Project "Orange"===
Microsoft launched a project to build a data visualization application for WinFS. It was codenamed ''"Project Orange"'' and was supposedly built using [[Windows Presentation Foundation]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/05/16/599183.aspx | title = The killer app for getting users organized | publisher = WinFS Team Blog | author = Shishir Mehrotra | accessdate = 2007-06-30}}</ref> It was supposed to provide exploration of ''Items'' stored in WinFS stores, and data relationships were supposed to be a prominent part of the navigation model. It was supposed to let people allow organization of the WinFS stores graphically as well - productizing many of the concepts shown in the [http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv IWish Concept Video]. However, since the WinFS project went dark, the status of this project is unknown.
Microsoft launched a project to build a data visualization application for WinFS. It was codenamed ''"Project Orange"'' and was supposedly built using [[Windows Presentation Foundation]].<ref>{{cite web | url = http://blogs.msdn.com/winfs/archive/2006/05/16/599183.aspx | title = The killer app for getting users organized | publisher = WinFS Team Blog | author = Shishir Mehrotra | access-date = 2007-06-30 | archive-url = https://web.archive.org/web/20070309024117/http://blogs.msdn.com/winfs/archive/2006/05/16/599183.aspx | archive-date = 2007-03-09 | url-status = dead }}</ref> It was supposed to provide exploration of ''Items'' stored in WinFS stores, and data relationships were supposed to be a prominent part of the navigation model. It was supposed to let people allow organization of the WinFS stores graphically as well&nbsp;– productizing many of the concepts shown in the [https://web.archive.org/web/20060602015536/http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv IWish Concept Video WMV File]. However, since the WinFS project went dark, the status of this project is unknown.
 
== References ==
{{reflist}}
 
== See also ==


==See also==
* [[Desktop organizer]]
* [[Desktop organizer]]
* [[RDBMS|Relational Database Management System]]
* [[GNOME Storage]] a storage management system for the GNOME desktop
* [[GNOME Storage|Storage]], a storage management system for [[GNOME]] desktop
* [[NEPOMUK-KDE]]
* [[ReFS]]
* [[Relational database management system]] (RDBMS)


== External links ==
== References ==
{{Reflist|30em}}


* [http://blogs.msdn.com/winfs/ WinFS Blog]
==External links==
* [http://msdn.microsoft.com/data/ref/winfs/ WinFS at the Microsoft Developer Network]
* [https://web.archive.org/web/20100124145541/http://blogs.msdn.com/winfs/ WinFS Blog]
* [http://channel9.msdn.com/Showforum.aspx?forumid=14&tagid=4 Channel 9 Videos]
* [https://web.archive.org/web/20060602151743/http://msdn.microsoft.com/data/ref/winfs/ WinFS at the Microsoft Developer Network] ([[Internet Archive]] cache)
* [http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.windows.developer.winfx.winfs&lang=en&cr=US WinFS Newsgroup]
* [http://channel9.msdn.com/search?term=winfs Channel 9 Videos]
* [http://www.winsupersite.com/showcase/winfs_preview.asp WinFS Beta 1 Review]
* [https://web.archive.org/web/20050414064907/http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.windows.developer.winfx.winfs&lang=en&cr=US WinFS Newsgroup]
* [http://www.netfxguide.com/guide/winfs.aspx WinFS area on NetFXGuide.com]
* [http://winsupersite.com/article/product-review/windows-storage-foundation-winfs-preview WinFS Beta 1 Preview]
* [https://web.archive.org/web/20061126063020/http://www.netfxguide.com/guide/winfs.aspx WinFS area on NetFXGuide.com] ([[Internet Archive]] cache)


{{Microsoft Windows components}}
{{File systems}}


{{MSNav|open=Microsoft APIs}}
{{good article}}


[[Category:Microsoft APIs]]
{{DEFAULTSORT:Winfs}}
[[Category:Microsoft application programming interfaces]]
[[Category:Windows disk file systems]]
[[Category:Windows disk file systems]]
[[Category:Windows administration]]
[[Category:Windows administration]]
 
[[Category:Semantic file systems]]
[[ar:WinFS]]
[[Category:Articles with example C Sharp code]]
[[cs:WinFS]]
[[da:WinFS]]
[[de:WinFS]]
[[es:WinFS]]
[[fr:WinFS]]
[[it:WinFS]]
[[nl:WinFS]]
[[ja:WinFS]]
[[no:WinFS]]
[[pl:WinFS]]
[[pt:WinFS]]
[[ru:WinFS]]
[[fi:WinFS]]
[[sv:WinFS]]

Revision as of 05:51, 5 January 2021

WinFS (short for Windows Future Storage)[1] was the code name for a canceled[2] data storage and management system project based on relational databases, developed by Microsoft and first demonstrated in 2003 as an advanced storage subsystem for the Microsoft Windows operating system, designed for persistence and management of structured, semi-structured and unstructured data.

WinFS includes a relational database for storage of information, and allows any type of information to be stored in it, provided there is a well defined schema for the type. Individual data items could then be related together by relationships, which are either inferred by the system based on certain attributes or explicitly stated by the user. As the data has a well defined schema, any application can reuse the data; and using the relationships, related data can be effectively organized as well as retrieved. Because the system knows the structure and intent of the information, it can be used to make complex queries that enable advanced searching through the data and aggregating various data items by exploiting the relationships between them.

File:WinFSCalendar.png
A mockup calendar application sorting images by the dates and using their relationship with contacts to filter the images. WinFS aimed at providing a shared schema system that would enable such a scenario.

While WinFS and its shared type schema make it possible for an application to recognize the different data types, the application still has to be coded to render the different data types. Consequently, it would not allow development of a single application that can view or edit all data types; rather, what WinFS enables applications to do is understand the structure of all data and extract the information that they can use further. When WinFS was introduced at the 2003 Professional Developers Conference, Microsoft also released a video presentation, named IWish,[3] showing mockup interfaces that showed how applications would expose interfaces that take advantage of a unified type system. The concepts shown in the video ranged from applications using the relationships of items to dynamically offer filtering options to applications grouping multiple related data types and rendering them in a unified presentation.

WinFS was billed as one of the pillars of the "Longhorn" wave of technologies, and would ship as part of the next version of Windows. It was subsequently decided that WinFS would ship after the release of Windows Vista, but those plans were shelved in June 2006,[4] with some of its component technologies being integrated into ADO.NET and Microsoft SQL Server.[5]

Motivation

Many filesystems found on common operating systems, including the NTFS filesystem which is used in modern versions of Microsoft Windows, store files and other objects only as a stream of bytes, and have little or no information about the data stored in the files. Such file systems also provide only a single way of organizing the files, namely via directories and file names.[6][7]

Because a file system has no knowledge about the data it stores,[6] applications tend to use their own, often proprietary, file formats. This hampers sharing of data between multiple applications. It becomes difficult to create an application which processes information from multiple file types, because the programmers have to understand the structure and semantics of all the files.[8] Using common file formats is a workaround to this problem but not a universal solution; there is no guarantee that all applications will use the format. Data with standardized schema, such as XML documents and relational data fare better, as they have a standardized structure and run-time requirements.[9]

Also, a traditional file system can retrieve and search data based only on the filename, because the only knowledge it has about the data is the name of the files that store the data.[8] A better solution is to tag files with attributes that describe them. Attributes are metadata about the files such as the type of file (such as document, picture, music, creator, etc.).[6] This allows files to be searched for by their attributes, in ways not possible using a folder hierarchy, such as finding "pictures which have person X". The attributes can be recognizable by either the file system natively, or via some extension.[6] Desktop search applications take this concept a step further. They extract data, including attributes, from files and index it. To extract the data, they use a filter for each file format. This allows for searching based on both the file's attributes and the data in it.[6]

However, this still does not help in managing related data, as disparate items do not have any relationships defined. For example, it is impossible to search for "the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month". Such a search could not be done unless it is based on a data model which has both the semantics as well as relationships of data defined.[6][7] WinFS aims to provide such a data model and the runtime infrastructure that can be used to store the data, as well as the relationships between data items according to the data model, doing so at a satisfactory level of performance.

Overview

WinFS natively recognizes different types of data, such as picture, e-mail, document, audio, video, calendar, contact, rather than just leaving them as raw unanalyzed bytestreams (as most file systems do). Data stored and managed by the system are instances of the data type recognized by the WinFS runtime. The data are structured by means of properties. For example, an instance of a résumé type will surface the data by exposing properties, such as Name, Educational Qualification, Experience. Each property may be a simple type (strings, integers, dates) or complex types (contacts).[8][10] Different data types expose different properties. Besides that, WinFS also allows different data instances to be related together; such as a document and a contact can be related by an Authored By relationship.[7][10] Relationships are also exposed as properties; for example if a document is related to a contact by a Created By relationship, then the document will have a Created By property. When it is accessed, the relationship is traversed and the related data returned.[10] By following the relations, all related data can be reached.[7] WinFS promotes sharing of data between applications by making the data types accessible to all applications, along with their schemas.[8] When an application wants to use a WinFS type, it can use the schema to find the data structure and can use the information. So, an application has access to all data on the system even though the developer did not have to write parsers to recognize the different data formats. It can also use relationships and related data to create dynamic filters to present the information the application deals with. The WinFS API further abstracts the task of accessing data. All WinFS types are exposed as .NET objects with the properties of the object directly mapping to the properties of the data type.[6] Also, by letting different applications that deal with the same data share the same WinFS data instance rather than storing the same data in different files, the hassles of synchronizing the different stores when the data change are removed.[11] Thus WinFS can reduce redundancies.[6][9]

Access to all the data in the system allows complex searches for data across all the data items managed by WinFS. In the example used above ("the phone numbers of all persons who live in Acapulco and each have more than 100 appearances in my photo collection and with whom I have had e-mail within last month"), WinFS can traverse the subject relationship of all the photos to find the contact items. Similarly, it can filter all emails in last month and access the communicated with relation to reach the contacts. The common contacts can then be figured out from the two sets of results and their phone number retrieved by accessing the suitable property of the contact items.

In addition to fully schematized data (like XML and relational data), WinFS supports semi-structured data (such as images, which have an unstructured bitstream plus structured metadata) as well as unstructured data (such as files) as well. It stores the unstructured components as files while storing the structured metadata in the structured store.[10] Internally, WinFS uses a relational database to manage data. It does not limit the data to belonging to any particular data model. The WinFS runtime maps the schema to a relational modality,[6] by defining the tables it will store the types in and the primary keys and foreign keys that would be required to represent the relationships. WinFS includes mappings for object and XML schemas by default. Mappings for other schemas must be specified. Object schemas are specified in XML; WinFS generates code to surface the schemas as .NET classes. ADO.NET can be used to directly specify the relational schema, though a mapping to the object schema must be provided to surface it as classes.[10] Relationship traversals are performed as joins on these tables. WinFS also automatically creates indexes on these tables, to enable fast access to the information.[10] Indexing speeds up joins significantly, and traversing relationships to retrieve related data is performed very fast. Indexes are also used during information search; searching and querying use the indexes to quickly complete the operations, much like desktop search systems.

Development

Template:Update Template:Graphical timeline The development of WinFS is an extension to a feature that was initially planned in the early 1990s. Dubbed Object File System, it was supposed to be included as part of Cairo. OFS was supposed to have powerful data aggregation features,[12] but the Cairo project was shelved, and with it OFS. However, later during the development of COM, a storage system, called Storage+, based on then-upcoming SQL Server 8.0, was planned, which was slated to offer similar aggregation features.[12] This, too, never materialized, and a similar technology, Relational File System (RFS), was conceived to be launched with SQL Server 2000.[12] However, SQL Server 2000 ended up being a minor upgrade to SQL Server 7.0 and RFS was not implemented.

But the concept was not scrapped.[12] It just morphed into WinFS. WinFS was initially planned for inclusion in Windows Vista,[13] and build 4051 of Windows Vista, then called by its codename "Longhorn", given to developers at the Microsoft Professional Developers Conference in 2003, included WinFS, but it suffered from significant performance issues.Template:Dead link[12] In August 2004, Microsoft announced that WinFS would not ship with Windows Vista; it would instead be available as a downloadable update after Vista's release.[12]

On August 29, 2005,[12] Microsoft quietly made Beta 1 of WinFS available to MSDN subscribers. It worked on Windows XP, and required the .NET Framework to run. The WinFS API was included in the System.Storage namespace.[14] The beta was refreshed on December 1, 2005 to be compatible with version 2.0 of the .NET Framework.[15] WinFS Beta 2 was planned for some time later in 2006,[16] and was supposed to include integration with Windows Desktop Search, so that search results include results from both regular files and WinFS stores, as well as allow access of WinFS data using ADO.NET.[17]

On June 23, 2006, the WinFS team at Microsoft announced that WinFS would no longer be delivered as a separate product,[4][18] and some components would be brought under the umbrella of other technologies. Many of the principle features Microsoft intended to provide with WinFS included a pane for metadata property editing, breadcrumb-based property navigation, filtering or stacking items over properties, incremental search, and saved searches;[19] these features were incorporated in Windows Vista.[20] Query composition, a feature of WinFS that allowed users to perform additional searches that reuse the results of a previous query,[21] was later incorporated in Windows Vista.[22]

Examples of uses of the technology are the object-relational mapping components into ADO.NET Entity Framework; support for unstructured data, adminless mode of operation, support for file system objects via the FILESTREAM data type, and hierarchical data in SQL Server 2008, then codenamed Katmai, as well as integration with Win32 APIs and Windows Shell and support for traversal of hierarchies by traversing relationships into later releases of Microsoft SQL Server;[5] and the synchronization components into Microsoft Sync Framework.[5]

In 2013 Bill Gates cited WinFS as his greatest disappointment at Microsoft and that the idea of WinFS was ahead of its time, which will re-emerge.[23]

Data storage

Architecture

File:WinFSArch.svg
Architecture of the WinFS Stack

WinFS uses a relational engine, which derives from SQL Server 2005,[24] to provide the data-relations mechanism. WinFS stores are simply SQL Server database (.MDF) files with the FILESTREAM attribute set.[25] These files are stored in the access-restricted folder named "System Volume Information" (placed in the volume root), in folders under the folder "WinFS" with names of GUIDs of these stores.[25]

At the bottom of the WinFS stack lies WinFS Core, which interacts with the filesystem and provides file-access and -addressing capabilities.[8] The relational engine leverages the WinFS core services to present a structured store and other services such as locking, which the WinFS runtime uses to implement the functionality. The WinFS runtime exposes services such as Synchronization and Rules that can be used to synchronize WinFS stores or perform certain actions on the occurrence of certain events.[8]

WinFS runs as a service that runs three processes:[26]

  1. WinFS.exe, which hosts relational datastore
  2. WinFSSearch.exe, which hosts the indexing and querying engine
  3. WinFPM.exe (WinFS File Promotion Manager), which interfaces with the underlying file-system

It allows programmatic access to its features via a set of .NET Framework APIs. These enable applications to define custom-made data types, define relationships among data, store and retrieve information, and allow advanced searches.[6][8] The applications can then aggregate the data and present the aggregated data to the user.

Data store

WinFS stores data in relational stores, which are exposed as virtual locations called stores.[12] A WinFS store is a common repository where any application can store data along with its metadata, relationships and schema. WinFS runtime can apply certain relationships itself; for example, if the values of the subject property of a picture and the name property of a contact are same, then WinFS can relate the contact with the picture.[27] Relations can also be specified by other applications or the user.[28]

WinFS provides unified storage, but stops short of defining the format that is to be stored in the data stores. Instead it supports writing data in application-specific formats. But applications must provide a schema that defines how the file format should be interpreted.[6] For example, a schema could be added to allow WinFS to understand how to read and thus be able to search and analyze, (say) a PDF file. By using the schema, any application can read data from any other application, and this also allows different applications to write in each other's format by sharing the schema.[28]

Multiple WinFS stores can be created on a single machine.[28] This allows different classes of data to be kept segregated; for example, official documents and personal documents can be kept in different stores. WinFS, by default, provides only one store, named "DefaultStore".[12] WinFS stores are exposed as shell objects, akin to Virtual folders, which dynamically generate a list of all items present in the store and present them in a folder view. The shell object also allows searching information in the datastore.[12]

A data unit that has to be stored in a WinFS store is called a WinFS Item.[6][28] A WinFS item, along with the core data item, also contains information on how the data item is related to other data. This Relationship is stored in terms of logical links. Links specify which other data items the current item is related with. Put in other words, links specify the relationship of the data with other data items. Links are physically stored using a link identifier, which specifies the name and intent of the relationship, such as type of or consists of.[6] The link identifier is stored as an attribute of the data item. All the objects that have the same link ID are considered to be related.[6] An XML schema, defining the structure of the data items that will be stored in WinFS, must be supplied to the WinFS runtime beforehand.[6] In Beta 1 of WinFS, the schema assembly had to be added to the GAC before it could be used.

Data model

WinFS models data using the data items, along with their relationships, extensions and rules governing its usage.[8] WinFS needs to understand the type and structure of the data items, so that the information stored in the data item can be made available to any application that requests it. This is done by the use of schemas. For every type of data item that is to be stored in WinFS, a corresponding schema needs to be provided to define the type, structure and associations of the data. These schemas are defined using XML.[6]

Predefined WinFS schemas include schemas for documents, e-mail, appointments, tasks, media, audio, video, and also includes system schemas that include configuration, programs, and other system-related data.[8] Custom schemas can be defined on a per-application basis, in situations where an application wants to store its data in WinFS, but not share the structure of that data with other applications, or they can be made available across the system.[8]

Type system

File:WinFS1.svg
WinFS Type Hierarchy

The most important difference between a file system and WinFS is that WinFS knows the type of each data item that it stores. And the type specifies the properties of the data item. The WinFS type system is closely associated with the .NET framework's concept of classes and inheritance. A new type can be created by extending and nesting any predefined types.[6]

WinFS provides four predefined base types – Items, Relationships, ScalarTypes and NestedTypes.[6] An Item is the fundamental data object which can be stored, and a Relationship is the relation or link between two data items. Since all WinFS items must have a type, the type of item stored defines its properties. The properties of an Item may be a ScalarType, which defines the smallest unit of information a property can have, or a NestedType, which is a collection of more than one ScalarTypes and/or NestedTypes. All WinFS types are made available as .NET CLR classes.[28]

Any object represented as a data unit, such as contact, image, video, document etc., can be stored in a WinFS store as a specialization of the Item type.[28] By default, WinFS provides Item types for Files, Contact, Documents, Pictures, Audio, Video, Calendar, and Messages. The File Item can store any generic data, which is stored in file systems as files. But unless an advanced schema is provided for the file, by defining it to be a specialized Item, WinFS will not be able to access its data. Such a file Item can only support being related to other Items.[6]

File:WinFS2.svg
Defining a new Type

A developer can extend any of these types, or the base type Item, to provide a type for his custom data. The data contained in an Item is defined in terms of properties, or fields that hold the actual data. For example, an Item Contact may have a field Name that is a ScalarType, and one field Address, a NestedType, which is further composed of two ScalarTypes. To define this type, the base class Item is extended and the necessary fields are added to the class.[6] A NestedType field can be defined as another class that contains the two ScalarType fields. Once the type is defined, a schema has to be defined, which denotes the primitive type of each field, for example, the Name field is a String, the Address field is a custom defined Address class, both the fields of which are Strings. Other primitive types that WinFS supports are Integer, Byte, Decimal, Float, Double, Boolean and DateTime, among others.[6] The schema will also define which fields are mandatory and which are optional.[29] The Contact Item defined in this way will be used to store information regarding the Contact, by populating the properties field and storing it. Only those fields marked as mandatory needs to be filled up during initial save.[28] Other fields may be populated later by the user, or not populated at all. If more properties fields, such as last conversed date, need to be added, this type can be extended to accommodate them. Item types for other data can be defined similarly.

File:WinFS3.svg
Relationships

WinFS creates tables for all defined Items.[29] All the fields defined for the Item form the columns of the table and all instances of the Item are stored as rows in the table for the respective Items. Whenever some field in the table refers to data in some other table, it is considered a relationship. The schema of the relationship specifies which tables are involved and what the kind and name of the relationship is. The WinFS runtime manages the relationship schemas.[28] All Items are exposed as .NET CLR objects, with a uniform interface providing access to the data stored in the fields. Thus any application can retrieve object of any Item type and can use the data in the object, without being aware of the physical structure the data was stored in.[6]

WinFS types are exposed as .NET classes, which can be instantiated as .NET objects. Data are stored in these type instances by setting their properties. Once done, they are persisted into the WinFS store. A WinFS store is accessed using an ItemContext class (see Data retrieval section for details). ItemContext allows transactional access to the WinFS store; i.e. all the operations since binding an ItemContext object to a store till it is closed either all succeed or are all rolled back. As changes are made to the data, they are not written to the disc; rather they are written to an in-memory log. Only when the connection is closed are the changes written to the disc in a batch. This helps to optimize disc I/O.[10] The following code snippet, written in C#, creates a contact and stores it in a WinFS store.

<syntaxhighlight lang="csharp">

//Connect to the default WinFS store
using(ItemContext ic = ItemContext.Open())
{
    //Create the contact and set the data in appropriate properties
    ContactEAddress contact = new ContactEAddress() {
        Name = new PersonName() {                      // Name is a ComplexType
            Displayname = "Doe, John",
            FirstName = "John",
            LastName = "Doe"
        },
        TelephoneNumber = new TelephoneNumber() {     // Telephone number is a ComplexType
            Country = CountryCode.Antarctica,
            Areacode = 4567,
            Number = 9876543210
        },
        Age = 111                                     // Age is a SimpleType
   };
   //Add the object to the user's personal folder.
   //This relates the item with the Folder pseudo-type, for backward
   //compatibility, as this lets the item to be accessed in a folder 
   //hierarchy for apps which are not WinFS native.
   Folder containingFolder = UserDataFolder.FindMyPersonalFolder();
   containingFolder.OutFolderMemberRelationship.AddItem(ic, contact);
   //Find a document and relate with the document. Searching begins by creating an
   //ItemSearcher object. Each WinFS type object contains a GetSearcher() method
   //that generates an ItemSearcher object which searches documents of that type.
   using (ItemSearcher searcher = Document.GetSearcher(ic))
   {
        Document d = searcher.Find(@"Title = 'Some Particular Document'");
        d.OutAuthoringRelationship.AddItem(ic, contact);
   }
   //Since only one document is to be found, the ItemContext.FindOne() method
   //could be used as well.
   //Find a picture and relate with it
   using (ItemSearcher searcher = Picture.GetSearcher(ic))
   {
        Picture p = searcher.Find(@"Occasion = 'Graduation' and Sequence = '3'");
        p.OutSubjectRelationship.AddItem(ic, contact);
   }
   //Persist to the store and close the reference to the store
   ic.Update();
}

</syntaxhighlight>

Relationships

A datum can be related to one more item, giving rise to a one-to-one relationship, or with more than one items, resulting in a one-to-many relationship.[6] The related items, in turn, may be related to other data items as well, resulting in a network of relationships, which is called a many-to-many relationship. Creating a relationship between two Items creates another field in the data of the Items concerned which refer the row in the other Item's table where the related object is stored.[28]

File:WinFS4.svg
WinFS Relationships

In WinFS, a Relationship is an instance of the base type Relationship, which is extended to signify a specialization of a relation. A Relationship is a mapping between two items, a Source and a Target. The source has an Outgoing Relationship, whereas the target gets an Incoming Relationship.[29] WinFS provides three types of primitive relationships – Holding Relationship, Reference Relationship and Embedding Relationship.[6] Any custom relationship between two data types are instances of these relationship types.

  • Holding Relationships specifies ownership and lifetime (which defines how long the relationship is valid) of the Target Item. For example, the Relationship between a folder and a file, and between an Employee and his Salary record, is a Holding Relationship – the latter is to be removed when the former is removed. A Target Item can be a part of more than one Holding Relationships. In such a case, it is to be removed when all the Source Items are removed.
  • Reference Relationships provide linkage between two Items, but do not have any lifetime associated, i.e., each Item will continue to be stored even without the other.
  • Embedding Relationships give order to the two Items that are linked by the Relationship, such as the Relationship between a Parent Item and a Child Item.

Relationships between two Items can either be set programmatically by the application creating the data, or the user can use the WinFS Item Browser to manually relate the Items.[29] A WinFS item browser can also graphically display the items and how they are related, to enable the user to know how their data are organized.[28]

Rules

WinFS includes Rules,[21] which are executed when a certain condition is met. WinFS rules work on data and data relationships. For example, a rule can be created that states that whenever an Item is created which contains field "Name" and if the value of that field is some particular name, a relationship should be created that relates the Item with some other Item. WinFS rules can also access any external application. For example, a rule can be built which launches a Notify application whenever a mail is received from a particular contact.[21] WinFS rules can also be used to add new properties fields to existing data Items.[21]

WinFS rules are also exposed as .NET CLR objects. As such any rule can be used for any purpose. A rule can even be extended by inheriting from it to form a new rule that consists of the condition and action of the parent rule plus something more.[21]

RAV

WinFS supports creating Rich Application Views (RAV) by aggregating different data in a virtual table format. Unlike database view, where each individual element can only be a scalar value, RAVs can have complex Items or even collections of Items. The actual data can be across multiple data types or instances and can even be retrieved by traversing relationships.[10] RAVs are intrinsically paged (dividing the entire set of data into smaller pages containing disconnected subsets of the data) by the WinFS runtime. The page size is defined during creation of the view and the WinFS API exposes methods to iterate over the pages. RAVs also supports modification of the view according to different grouping parameters. Views can also be queried against.

Access control

Even though all data are shared, everything is not equally accessible. WinFS uses the Windows authentication system to provide two data protection mechanisms.[28] First, there is share-level security that controls access to your WinFS share. Second, there is item level security that supports NT compatible security descriptors. The process accessing the item must have enough privileges to access it. Also in Vista there is the concept of "integrity level" for an application. Higher integrity data cannot be accessed by a lower integrity process.

Data retrieval

File:WinFSFlowChart.svg
Flowchart for creating, searching and updating WinFS data instances

The primary mode of data retrieval from a WinFS store is querying the WinFS store according to some criteria,[8] which returns an enumerable set of items matching the criteria. The criteria for the query is specified using the OPath query language. The returned data are made available as instances of the type schemas, conforming to the .NET object model.[30] The data in them can be accessed by accessing the properties of individual objects.[29]

Relations are also exposed as properties. Each WinFS Item has two properties, named IncomingRelationships and OutgoingRelationships, which provide access to the set of relationship instances the item participates in. The other item which participates in one relationship instance can be reached through the proper relationship instance.[10][29]

The fact that the data can be accessed using its description, rather than location, can be used to provide end-user organizational capabilities without limiting to the hierarchical organization as used in file-systems. In a file system, each file or folder is contained in only one folder. But WinFS Items can participate in any number of holding relationships, that too with any other items. As such, end users are not limited to only file/folder organization. Rather, a contact can become a container for documents; a picture a container for contacts and so on. For legacy compatibility, WinFS includes a pseudo-type called Folder, which is present only to participate in holding relationships and emulate file/folder organization. Since any WinFS Item can be related with more than one Folder item, from an end user perspective, an item can reside in multiple folders without duplicating the actual data.[10] Applications can also analyze the relationship graphs to present various filters. For example, an email application can analyze the related contacts and the relationships of the contacts with restaurant bills and dynamically generate filters like "Emails sent to people I had lunch with".

Searches

The WinFS API provides a class called the ItemContext class, which is bound to a WinFS store. The ItemContext object can be used to scope the search to the entire store or a subset of it. It also provides transactional access to the store.[14] An object of this class can then spawn an ItemSearcher object which then takes the type (an object representing the type) of the item to be retrieved or the relationship and the OPath query string representing the criteria for the search.[29][31] A set of all matches is returned, which can then be bound to a UI widget for displaying en masse or enumerating individually.[28] The properties items can also be modified and then stored back to the data store to update the data. The ItemContext object is closed (which marks the end of association of the object with the store) when the queries are made or changes merged into the store.

Related items can also be accessed through the items. The IncomingRelationships and OutgoingRelationships properties give access to all the set of relationship instances, typed to the name of the relationship. These relationship objects expose the other item via a property. So, for example, if a picture is related to a picture, it can be accessed by traversing the relationship as:

<syntaxhighlight lang="csharp">

ContactsCollection contacts = picture.OutgoingRelationships.Cast(typeof(Contact)).Value;
//This retrieves the collection of all outgoing relationships from a picture object
//and filters down the contacts reachable from them and retrieves its value.
//Or the relationship can be statically specified as
ContactsCollection contacts = picture.OutgoingRelationships.OutContactRelationship.Contact;

</syntaxhighlight>

Template:Anchor An OPath query string allows to express the parameters that will be queried for to be specified using Item properties, embedded Items as well as Relationships.[citation needed] It can specify a single search condition, such as "title = Something'", or a compound condition such as "title = 'Title 1' || title = 'Title 2' && author = 'Someone'". These boolean and relational operations can be specified using C# like &&, ||, =, != operators as well as their English-like equivalent like EQUAL, NOT EQUAL. SQL like operators such as LIKE, GROUP BY and ORDER BY are also supported, as are wildcard conditions.[citation needed] So, "title LIKE 'any*'" is a valid query string. These operators can be used to execute complex searches such as <syntaxhighlight lang="csharp">

using (ItemContext ic = ItemContext.Open() )
{
    //Searching begins by creating a ItemSearcher object. The searcher is created from a
    //relationship instance because the contacts being searched for are in relation. The
    //first parameter defines the scope of the search. An ItemContext as the scope means
    //the entire store is to be searched. Scope can be limited to a set of Items which may
    //be in a holding relationship with the contacts. In that case, the set is passed as
    //the scope of the search.
    ItemSearcher searcher = OutContactRelationship.GetTargetSearcher(ic, typeof(Contact));
    ContactCollection contacts = searcher.FindAll("OutContactRelationship.Contact.Name LIKE 'A*'");
}

</syntaxhighlight> The above code snippet creates an ItemSearcher object that searches on the OutContactRelationship instance that relates pictures and contacts, in effect searching all pictures related with a contact. It then runs the query Name LIKE 'A*'" on all contacts reachable through OutContactRelationship, returning the list of "contacts whose names start with A and whose pictures I have". Similarly, more relationships could be taken into account to further narrow down the results.[10][29] Further, a natural language query processor, which parses query in natural language and creates a well-formed OPath query string to search via proper relationships, can allow users to make searches such as "find the name of the wine I had with person X last month", provided financial management applications are using WinFS to store bills.

Different relations specify a different set of data. So when a search is made that encompasses multiple relations, the different sets of data are retrieved individually and a union of the different sets is computed. The resulting set contains only those data items that correspond to all the relations.[29]

Notifications

WinFS also includes better support for handling data that changes frequently. Using WinFS Notifications, applications choose to be notified of changes to selected data Items. WinFS will raise an ItemChangedEvent, using the .NET Event model, when a subscribed-to Item changes, and the event will be published to the applications.[29]

Data sharing

WinFS allows easy sharing of data between applications, and among multiple WinFS stores, which may reside on different computers, by copying to and from them.[32] A WinFS item can also be copied to a non-WinFS file system, but unless that data item is put back into the WinFS store, it will not support the advanced services provided by WinFS.

The WinFS API also provides some support for sharing with non-WinFS applications. WinFS exposes a shell object to access WinFS stores. This object maps WinFS items to a virtual folder hierarchy, and can be accessed by any application.[12] WinFS data can also be manually shared using network shares, by sharing the legacy shell object.[32] Non-WinFS file formats can be stored in WinFS stores, using the File Item, provided by WinFS. Importers can be written, to convert specific file formats to WinFS Item types.[32]

In addition, WinFS provides services to automatically synchronize items in two or more WinFS stores, subject to some predefined condition, such as "share only photos" or "share photos that have an associated contact X".[32] The stores may be on different computers. Synchronization is done in a peer-to-peer fashion; there is no central authority. A synchronization can be either manual or automatic or scheduled. During synchronization, WinFS finds the new and modified Items, and updates accordingly. If two or more changes conflict, WinFS can either resort to automatic resolution based on predefined rules, or defer the synchronization for manual resolution. WinFS also updates the schemas, if required.[32]

Application support

Shell namespace

WinFS Beta 1 includes a shell namespace extension, which surfaces WinFS stores as top level objects in My Computer view.[12] Files can be copied into and out of the stores, as well as applications can be directly used to save there. Even folders such as My Documents can be redirected to the stores.[12] WinFS uses Importer plug-ins to analyze the files as they were being imported to the store and create proper WinFS schemas and objects, and when taking the objects out, re-pack them into files.[32] If importers for certain files are not installed, they are stored as generic File types.

Microsoft Rave

Microsoft Rave is an application that shipped with WinFS Beta 1. It allows synchronization of two or more WinFS stores, and supports synchronization in full mesh mode as well as the central hub topology. While synchronizing, Microsoft Rave will determine the changes made to each store since the last sync, and update accordingly. When applying the changes, it also detects if there is any conflict, i.e., the same data has been changed on both stores since the last synchronization. It will either log the conflicting data for later resolution or have it resolved immediately. Microsoft Rave uses peer-to-peer technology to communicate and transfer data.

StoreSpy

File:Storespy.jpg
WinFS included StoreSpy, a WinFS Item browser that could be used to browse structured data instances with their properties and relationships.

With WinFS Beta 1, Microsoft included an unsupported application called StoreSpy,[33] which allowed one to browse WinFS stores by presenting a hierarchical view of WinFS Items. It automatically generated virtual folders based on access permissions, date and other metadata, and presented them in a hierarchical tree view, akin to what traditional folders are presented in. The application generated tabs for different Item types. StoreSpy allowed viewing Items, Relationships, MultiSet, Nested Elements, Extensions[34] and other types in the store along with its full metadata. It also presented a search interface to perform manual searches, and save them as virtual folders. The application also presented a graphical view of WinFS Rules. However, it did not allow editing of Items or their properties, though it was slated for inclusion in a future release.[35] But the WinFS project was cut back before it could materialize.

Type Browser

WinFS also includes another application, named WinFS Type Browser, which can be used to browse the WinFS types, as well as visualize the hierarchical relationship between WinFS types.[36] A WinFS type, both built-in types as well as custom schemas, can be visualized along with all the properties and methods that it supports. It also shows the types that it derives from as well as other types that extend the type schema. However, while it was included with WinFS, it was released as an unsupported tool.[36]

OPather

WinFS Beta 1 also includes an unsupported application, named OPather.[37] It presents a graphical interface for writing Opath queries. It can be used by selecting target object type and specifying the parameters of the query. It also includes Intellisense-like parameter completion feature. It can then be used to perform visualization tasks like binding results of a query to a DataGrid control, create views of the data in WinFS itself, or just extract the query string.

Project "Orange"

Microsoft launched a project to build a data visualization application for WinFS. It was codenamed "Project Orange" and was supposedly built using Windows Presentation Foundation.[38] It was supposed to provide exploration of Items stored in WinFS stores, and data relationships were supposed to be a prominent part of the navigation model. It was supposed to let people allow organization of the WinFS stores graphically as well – productizing many of the concepts shown in the IWish Concept Video WMV File. However, since the WinFS project went dark, the status of this project is unknown.

See also

References

Template:Reflist

External links

Template:Microsoft Windows components Template:File systems

Template:Good article

  1. Leaked Windows hints at changes to come. ZDNet. CBS Interactive (September 30, 2007).
  2. Template:Cite news
  3. IWish Concept Video. Microsoft.
  4. 4.0 4.1 Quentin Clark (June 23, 2006). WinFS Update. What's in Store. MSDN Blogs.
  5. 5.0 5.1 5.2 Quentin Clark. Where is WinFS now?.
  6. 6.00 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 6.10 6.11 6.12 6.13 6.14 6.15 6.16 6.17 6.18 6.19 6.20 6.21 6.22 6.23 Shawn Wildermuth. A Developer's Perspective on WinFS: Part 1. MSDN.
  7. 7.0 7.1 7.2 7.3 Vijay Bangaru. Unify, Organize, Explore, and Innovate. Oh my! (Part 2). WinFS Team Blog.
  8. 8.00 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 8.10 Sean Grimaldi. The WinFS Files: Divide et Impera. MSDN.
  9. 9.0 9.1 Thomas Rizzo. WinFS 101: Introducing the New Windows File System. MSDN.
  10. 10.00 10.01 10.02 10.03 10.04 10.05 10.06 10.07 10.08 10.09 10.10 WinFS on The .NET Show.Template:Dead link
  11. Vijay Bangaru. Unify, Organize, Explore, and Innovate. Oh my! (Part 1). WinFS Team Blog.
  12. 12.00 12.01 12.02 12.03 12.04 12.05 12.06 12.07 12.08 12.09 12.10 12.11 12.12 Paul Thurrott. Windows Storage Foundation (WinFS) Preview.
  13. Cath Everett. Will Longhorn be worth the pain?. ZDNet.
  14. 14.0 14.1 WinFS for Developers. NTFS.com.
  15. Vijay Bangaru. WinFS Beta 1 Refresh now available. WinFS Team Blog.
  16. Shan Sinha. Showing off the next release of WinFS at Tech Ed 2006, in Boston! Join us!. WinFS Team Blog.
  17. Sanjay Anand. My tryst with Destiny, err… Integrated Storage. WinFS Team Blog.
  18. Quentin Clark. Update to the Update. WinFS Team Blog.
  19. WinFS: The Windows File System (Microsoft Access 2002 Technical Articles). MSDN. Microsoft (October 2003).
  20. Windows Vista Product Guide (DOCX) 44–51. Microsoft (2006).
  21. 21.0 21.1 21.2 21.3 21.4 Kati Dimitrova. About WinFS Rules. MSDN. Microsoft.
  22. Bentz, Ben (October 31, 2006). Query Composition: Building a search upon another search. Shell: Revealed Blog. Microsoft.
  23. "Billionaire baron Bill Gates still mourns Vista's stillborn WinFS."
  24. Nate Mook. MS Explains WinFS, Releases Beta 1. BetaNews.
  25. 25.0 25.1 Shishir Mehrotra (September 2005). "WinFS" Future Directions: An Overview. Professional Developers Conference 2005 presentations. Microsoft.(Currently offline, mirror).
  26. Erwyn van der Meer. First Look on WinFS Beta 1.
  27. Vijay Bangaru. WinFS Mailbox. WinFS Team Blog.
  28. 28.00 28.01 28.02 28.03 28.04 28.05 28.06 28.07 28.08 28.09 28.10 28.11 Richard Grimes. Revolutionary File Storage System Lets Users Search and Manage Files Based on Content. MSDN Magazine.
  29. 29.0 29.1 29.2 29.3 29.4 29.5 29.6 29.7 29.8 29.9 Shawn Wildermuth (July 2004). A Developer's Perspective on WinFS: Part 2. MSDN. Microsoft.
  30. Vijay Bangaru. Unify, Organize, Explore, and Innovate. Oh my! (Part 4). WinFS Team Blog.
  31. Thomas Rizzo, Sean Grimaldi (October 18, 2004). An Introduction to "WinFS" OPath. MSDN. Microsoft.
  32. 32.0 32.1 32.2 32.3 32.4 32.5 Neil Padgett. Getting Data Into WinFS with WinFS Synchronization. WinFS Team Blog.
  33. Wei-Meng Lee (2005-09-07). WinFS -StoreSpy.
  34. Stefano Demiliani WeBlog:WinFS StoreSpy v0.8 for the WinHEC 2004 Longhorn Build.
  35. StoreSpy should become StoreEditor.
  36. 36.0 36.1 Sanjay Nagamangalam. Visualizing WinFS Types. WinFS Team Blog.
  37. Luiz Miranda. Using OPather To Help Write Queries. WinFS Team Blog.
  38. Shishir Mehrotra. The killer app for getting users organized. WinFS Team Blog.