Re: Character string relation and functional dependencies

From: Tegiri Nenashi <>
Date: Thu, 6 Dec 2007 10:15:03 -0800 (PST)
Message-ID: <>

On Dec 6, 9:40 am, (rpost) wrote:
> Tegiri Nenashi wrote:
> [...]
> >Informally these FDs correspond to the length(), instr(), and substr()
> >functions. So instead of talking about the class String with the
> >length(), instr(), and substr() member functions, we can focus on a
> >relation and functional dependencies....
> Certainly. But we can't describe the full semantics of strings
> in that way. How do you represent concatenation?

That was not the right representation, consider the relation:

str | prefix | suffix | pos

abcd | ab | cd | 2
abac | ab | ac | 2

Functional dependencies:

prefix & suffix -> str       (corresponds to concatenation)
prefix -> pos                 (length)
str, pos -> prefix           (prefix substring operation)
str, pos -> suffix           (suffix substring operation)

The combination of the latter two (first extract suffix, and then extract prefix) is the usual substring operation: substring(str, pos, length).

Question: how do we represent the "instr" operator?

> Another difference is that database tables are finite and variable,

Oh, relations in database world are certainly not restricted by finite cardinality. Received on Thu Dec 06 2007 - 19:15:03 CET

Original text of this message