I don’t know what its specific connection with relational algebra is, but the longest increasing subsequence problem appears to have connections with quite a few areas of mathematics. Your two problems are small enough to be solved by inspection. If you want to be more systematic, you could simply enumerate the maximal increasing subsequences of length greater than $1$ (where maximal simply means that this particular subsequence cannot be extended any further):
Evidently there are two longest increasing subsequences of $\langle 3,2,6,4,5,1\rangle$: $\langle 3,4,5\rangle$, and $\langle 2,4,5\rangle$.
The same technique will quickly find the unique longest increasing subsequence of the string $ABCBDAB$.