Schema Design Question

M

mabster

Ok, I'm stumped here.

Suppose I have a schema consisting of publishers and books. Each book is
published by one and only one publisher. So in the classic sense it's a
"one to many" relationship.

My schema looks something like this:

<EntityType Name="Publisher" BaseType="Contacts.Organization">
<Documentation>...</Documentation>
<ChangeUnit Name="Publisher" Id="1" />
</EntityType>

<EntityType Name="Title" BaseType="Storage.Item">
<Documentation>...</Documentation>
<ChangeUnit Name="Title" Id="1" />
<Property Name="Volume" Type="Storage.Int32" Nullable="true"
ChangeUnit="Title" />
<Property Name="Year" Type="Storage.Int16" Nullable="true"
ChangeUnit="Title" />
<Property Name="Details" Type="Storage.String" Size="2000"
Nullable="true" ChangeUnit="Title" />
</EntityType>

How do I associate these two items?

I have tried adding an Association, like this:

<Association Name="PublisherTitles">
<Documentation>...</Documentation>
<End Role="Publisher" PluralRole="Publishers"
Type="Comicster.Publisher" />
<End Role="Title" PluralRole="Titles" Type="Comicster.Title" />
<Reference FromRole="Publisher" Property="Titles" ToRole="Title" />
</Association>

.... but that throws "error AG0066: Invalid Property on AssociationEntity
Reference. Property Titles is not a member of type
MadProps.Comicster.Storage.Publisher."

How do I define the "Publisher.Titles" property that gives me a list of
that publisher's titles? Or conversely, how can I define a
"Title.Publisher" property that refers back to the title's publisher?

I'm just finding it difficult to make the mental leap from classical
database design to WinFS schema design.

Thanks in advance,
Matt
 

My Computer

Top