Saturday, June 17, 2023

I Loved a Tree

 I was romantically attracted to a tree.

The attraction was not very strong but it was there.

It was so subtle that I was not even aware.

I wonder if it was there till the tree was alive.

Standing on our rooftop I used to look at it and smile.

Sometimes unintentionally, sometimes intentionally.

I used to enjoy letting the winds ruffle my hair

as I cast on it my lovely glare.

The tree was tall with thin and long leaves

It used to sway gracefully along the breeze.

Its jolly leaves used to do a little shimmy 

 as if they were dancing for me.

Sometimes I used to enjoy the dance alone

Sometimes with my friends.

Sometimes I saw it sway 

Sometimes I saw it it just stay 

When I used to look at it at the beginning

I was enchanted by its beauty

Over time I got used to it

I was no more consciously looking at it

I no more could draw the same pleasure from looking at it

One day in a huge gush of wind the tree broke into two halves

That day I realized it was there for me

It used to be there but it would be there no more

In its place, there would be a void

I would be looking into that void

I sometimes think of it whenever I get to the rooftop

Yesterday, I went to my uncle's rooftop and saw that tree again from afar

I looked at it and smiled.


Saturday, September 8, 2018

Expressing division operator of relational calculus in MYSQL



This is the table r(A,B).

This is the table s(A).
T1<-project(R-S)(R)


T2<-project(R-S)((S x T1)-R)

SQL:
SELECT r.B from r NOT IN
(
  SELECT DISTINCT t1.B from
 (SELECT * from s,(SELECT DISTINCT r2.b from r as r2) as t1)
 except
 (SELECT * from r)
);


T<-T1-T1

SQL:-
(SELECT DISTINCT * from
 s,(SELECT DISTINCT r2.b from r as r2) as t1)
 WHERE * NOT IN
(SELECT * FROM r);



SQL:-

SELECT DISTINCT r.b from r where r.b not IN (SELECT DISTINCT T1.b from (SELECT DISTINCT * from s,(SELECT DISTINCT r2.b from r as r2) as t1) as T1 where not EXISTS(SELECT * from r where T1.a=r.a and T1.b=r.b))