Quantcast
Channel: Attackr.com » Developer Portal for web designers, developers and programmers
Viewing all articles
Browse latest Browse all 10

SQL SELECT Clause Order Cheat Sheet & Other Opinionated Site Building Tips

$
0
0

Have you ever been building a SQL statement, and tried to remember which order your, “ORDER BY” goes in.  This short quick reference saves me some time – it’s not difficult, but if you’re like me, and do not use it everyday – it’s cumbersome to remember.

These are the “mostly used” statements:

FROM (Table to retrieve data from)

WHERE (Row-level filtering) 

GROUP BY (Group specification)

HAVING (Group-level filtering)

ORDER BY (Output sort order)

If anyone is interested, i’ll post the rest of my notes here on SQL(?). The order varies some depending upon use. Another useful item of interest is that the SQL (“mostly-regardless” of the flavor [mysql, mongo, oracle/etc...]), is that they all speak ‘SQL’. That may sound redundant, but it is actually interesting to start discovering the approaches that are implemented that all basically ‘do the same thing’ or ‘place higher priorities on certain operations’.

Once you learn what each flavor of SQL is doing, what their design goal was, it’s interesting to learn you may be using something totally overkill for a simple purpose. In most cases for a small production website, SQL Lite may be perfectly acceptable for lower traffic/connection sites (which are the vast majority of all sites on the web). Some ‘family-type- websites have even been known to use flat-text files.

The downside to using a larger-scale SQL solution is that most people do not use it correctly in the first place. That’s fine to use it, but it’s kind of like driving a NASCAR to the supermarket.  Just because you “have and use” more power, doesn’t make it faster for the end client/customer. A basic website (3-10 pages), using Apache, NGINX, Lighttpd (webservers), along with basic HTML(preferably HTML5 + CSS3), and maybe jQuery (if you need some pzazz), is more than enough for the basic website.  It’s fast, secure, presentable, and allows the author to maintain their focus (do what they were trying to do in the first place [get their message onto the web]).

If your goal is to see how much horse power you can use – see how flashy and widgetized you can get, then you’re missing the point of web development on the internet.  It’s cool to use the latest thing, but it’s cooler to get your message understood. Even if your message is to sell something, save a puppy from being put down, or getting your beliefs/blogging your experiences. If your page loads quickly, is easy to read, is obvious what you expect the reader to ‘get from your web presence’, then you and your web page reader/browser will enjoy a good relationship.

Related Posts:

  • No Related Posts

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images