Thanks a lot for spending time to write all these elaborate answers. They were all really helpful. Finally I gave up on xcode and switched to eclipse. Probably for the best.
I was attempting to do all this in the first place because in our course in college, we have to do a project. Almost all people make a web/mobile app which simply uses a database. I felt that this wasn't a right project to do if one really wanted to learn about databases.
So I wanted to play around with Postgresql itself. I have looked at the TODO list and it has given me a lot of ideas. If anyone has any thoughts/ideas which they didn't have time to pursue but are interesting, please let me know?
With warm regards