I just want to learn the idea how will I program a server that reacts to certain packets when received from the client and then queries the database based on the packets received.
Maybe I am missing the point, but if what you want is to learn how to build an MMO server *in general*, then reverse engineering a popular, proprietary MMO sure is a terrible way to get there, both legally and, more simplistically, for simple "personal workload" reasons. There are plenty of books, online resources and even open-source projects that can help you educate yourself properly.
If you actually want to know how one particular MMO does its thing, then you will have to learn about tools like disassemblers, packet sniffers and decrypters. Those tools will help you dissect the communication formats and protocols used between a client and server. There are lots of sites dedicated to the hackers-and-crackers crowd that can explain techniques and methods better than I can (or have time or inclination for).
One popular forum for this that I monitor is RageZone (http://forum.ragezone.com/)). As a professional, I try to keep an eye on what's going on in the hacker community.
PS: I would be remiss if, as a professional, didn't implore you to reconsider this unproductive path. Use your interest and energies to create something positive.