[Developers] South Carolina weirdness

Kurt Bollacker kurt at metaweb.com
Wed Jun 4 19:17:36 UTC 2008


On Wed, Jun 04, 2008 at 10:51:01AM -0700, Arthur van Hoff wrote:
> Hi Will,
> 
> I've seen this happen in our code several times. Although the schema
> allows you to specify properties to have unique values, there does not
> appear to be strict enforcement of this rule.

It is strict in the sense of creation.  i.e. No multiples of unique
properties can be written once the property becomes unique.
 
> It is very annoying to write all queries assuming that any property
> (even when it is marked unique) can return multiple values. However, if
> you don't do this your code is fragile, and will trip up easily in case
> of a bad insert. I wish there was a better solution.

For types in the main hierarchy, this problem should be very rare.
For user/private types, the problem depends on the creator of the
type.

> Have fun,
> 
>     Arthur van Hoff
> 
> 
> > -----Original Message-----
> > From: developers-bounces at freebase.com [mailto:developers-
> > bounces at freebase.com] On Behalf Of Will Moffat
> > Sent: Wednesday, June 04, 2008 10:21 AM
> > To: Freebase API and apps built on Freebase For discussions about MQL
> > Subject: [Developers] South Carolina weirdness
> > 
> > Hello,
> > 
> > The trivial query below fails because South Carolina has two values
> > for "capital" even though the schema says the property must be
> > unique.
> > This will break applications written against the schema. Are there
> > tools that warn about this problem? Should they be exposed in the
> > Freebase UI?
> > 
> > I cannot delete the extra value 'Charleston' using the Freebase.com
> > UI
> > 
> > Weird thing no. 3 is that I cannot see any record of "capital" ever
> > being changed in the history view.
> > 
> > http://www.freebase.com/tools/queryeditor/?q=[{"*":null,"type":"/
> > location/us_state"}]
> > http://www.freebase.com/view/en/south_carolina
> > http://www.freebase.com/history/topic/en/south_carolina
> > 
> > regards,
> > --Will
> > _______________________________________________
> > Developers mailing list
> > Developers at freebase.com
> > http://lists.freebase.com/mailman/listinfo/developers
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers


More information about the Developers mailing list