Clicky

Jump to content
Achtas

SQL help

Recommended Posts

Greetings there, since some around here might know about this then I was wondering if anyone knew a good resource site for SQL.


 


Getting into a project and since there is only one guy who will know how to handle SQL more or less I want to look into it as well to be able to at least help out when needed. I will mostly be dealing with PHP and Java. But yes, my SQL knowledge is very basic so to fully understand everything and make changes to the database, will need some additional info. Found some various sites about, though it is always better to go through the preferred and tested sites.


Link to comment
Share on other sites

mmm ive never actually had to use postgresql, I always found it weird but its -the- open source db for geo stuff.


 


The most used commands are insert, select and delete, you'll want to read up on basic usage for those .. after that 'replace' and 'update'


There are postgresql books as well, but my personal experience is that its easier to tackle a problem with google when it arises then to dig through a book.


Postgress has its own documentation site that *should* help, the mysql one usually gave more questions then answers.


 


If all else fails, go look for a forum about postgresql .. but try and get a general feel for it before even attempting to make a post. Most database forums have a large population of twats who will provide useless answers like 'look in the documentation' or a semi troll post about how silly you are for not knowing the answer.


 


I had to do a lot of digging too for Mercury, discovering commands as I went along .. and constantly asking myself (and then google =p) questions..


If you want to reduce the amount of multi table selects being send from your program, look up 'views'


If you want to do things based on changes in the database, look up 'triggers'


Those are the main 2 time and efficiency savers that I started using more near the end. I'm quite sure the database would have had a way different layout if I had figured those out sooner =p


 


But yea .. google .. postgresql.org.. php.net .. more google .. forums. That goes for both postgresql and php but the php manual is actually very good :)


 


And boooo java! That is satan spawn.

Link to comment
Share on other sites

Yes, Java is, but it is required since I am not going to try and make parts in PHP and ActionScript can go suck it. D: So it will be Java. And yeah, will have to try and make the database as compact as possible considering the data amount being filtered and moved through will be quite considerable.


 


Also thanks for the pointers. xD


Edited by Achtas
Link to comment
Share on other sites

Good database design is key then :-)


Ask if your school has a DBA that can give pointers, and use variables as table names in your code.


I had fixed names initially in Mercury's predecessor and then search/replaced everything by variable names .. that way I could re-design tables while keeping the old one up till the new layout worked properly. And I've had to do that plenty of times :-)


 


And be sure to add plenty of comments, even on your database tables when you plan on needing more then like 20.... and don't re-read your code after a year because you'll be going 'wtf was I thinking!'

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×

Important Information

By using this site, you agree to our Privacy Policy, and Terms of Use.