$Id: Relation.daml,v 1.1 2001/02/23 05:57:38 martin Exp $ SRI's ontology for services; first cut; incomplete. A FieldName gives the name of a single field of a relation. A FieldType gives the type of a single field of a relation. For now, we assume the type can be any class (and that this includes literals and other concrete types). A FieldSpec object gives the name and type of a single field of a relation. SimpleSchema Lists the types of the fields of a relation's tuples. Order is relevant. NamedSchema Lists the names and types of the fields of a relation's tuples. A Schema must either have names for all fields (NamedSchema) or for no fields (SimpleSchema).
  • SimpleSchema
  • NamedSchema
  • For now, we deal with functional dependences only; other types will be addressed later. A field can be designated by its position or its name.
  • #Integer
  • #FieldName
  • A functional dependency states that some subset of the fields of a relation functionally determines some other subset. The fields which functionally determine some other fields. TBD: Is there a better name for this? TBD: Should we require that they be either all integers or all names? TDB: How to say that a relation with a SimpleSchema must have a FunctionalDependency specified using integers? The fields determined by the DeterminingFields. TBD: See TBDs for DeterminingFields. Relation The profile contains the traditional characterizations of a DB relation (schema and constraints). 1/ No limit on cardinality here. RelationModel This class is just a placeholder at present, and has no properties. The RelationProfile contains adequate characterization of the relation for most purposes. RelationGrounding TBD Function This is the logical/mathematical/database function: a set of tuples such that, for a given set of values for the function's determining fields, there is exactly one tuple having those values. 1 How to say that the functional dependency must cover all fields?
  • "In"
  • "Out"
  • "InOut"
  • BindingPattern A list having the same length as the arity of the relation that it describes. A binding pattern specifies a legal input (query) to a relational service; that is, the fields marked as "In" must be bound in the query. Fields marked as "Out" must not be bound in the query. Fields marked as "InOut" may or may not be bound. In any case, the tuples making up the solution to the query will be fully bound in all fields. Relation For bindingPattern(X, Y) read: a provider of relational service X can satisfy a query corresponding to binding pattern Y. That is, when given input bindings for its fields, which agree with the specified binding pattern, it will return all tuples matching those bindings. Question: What exactly is meant by "matching"? at least 1 Function The idea here is that the function's single functional dependency implies the only legal binding pattern, so we don't need any explicit binding patterns. 0