Re: Character string relation and functional dependencies
Date: Thu, 6 Dec 2007 10:15:03 -0800 (PST)
On Dec 6, 9:40 am, rp..._at_pcwin518.campus.tue.nl (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
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?
Oh, relations in database world are certainly not restricted by finite cardinality. Received on Thu Dec 06 2007 - 19:15:03 CET