SQL. Where to start?

ibex333

Diamond Member
Mar 26, 2005
4,094
123
106
I will be doing my Master's In Web and Application Development in the fall. It's mostly Javascript, PHP, XCode and the like, but one required course and a few electives are about databases. Off course I will probably be forced to take some bridge classes because I don't know much about programming, but I want to get a head start, and study this stuff at home before I start my classes.

What I cannot understand is which environment people use to write SQL code.
Like let's say you are a DBA in a large company, and your boss asks you to create a database...

WHERE are you going to create this database? Is it a program like SQL Server, or MySQL which opens up an interface and I will write code there? What will "compile" the code and present it visually to the user as a database?

In Java I used Netbeans.. but with SQL I don't know what I should be using.

And why is SQL Server called SQL Server? Is it's an actual SERVER running on a physical server machine, then what does it have to do with writing code in it? People don't write code in Windows Server 2008. It is used to serve various services to clients, such as printing, files, shares, etc. So what's different about SQL Server?

Can someone please explain in detail or show me a few good links?

Finally, can I practice writing SQL on a Netbook? Does it require a powerful machine? Obviously, I wont be making any huge databases any time soon. By that time I'll be doing this on my desktop.

Thanks very much.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
In Java I used Netbeans.. but with SQL I don't know what I should be using.
Paper is good, because nothing runs plain SQL. You're trying to think about it with all the wrong metaphors, too. SQL is a family of query languages. You can do some programming with it, but don't try fitting those metaphors to it.

I highly recommend picking up SQL Queries for Mere Mortals. Among other things, it has a very nice intro that should effectively and tersely explain DBMSes in general, and the structure of SQL.
 

KLin

Lifer
Feb 29, 2000
30,951
1,077
126
I will be doing my Master's In Web and Application Development in the fall. It's mostly Javascript, PHP, XCode and the like, but one required course and a few electives are about databases. Off course I will probably be forced to take some bridge classes because I don't know much about programming, but I want to get a head start, and study this stuff at home before I start my classes.

What I cannot understand is which environment people use to write SQL code.
Like let's say you are a DBA in a large company, and your boss asks you to create a database...

WHERE are you going to create this database? Is it a program like SQL Server, or MySQL which opens up an interface and I will write code there? What will "compile" the code and present it visually to the user as a database?

In Java I used Netbeans.. but with SQL I don't know what I should be using.

And why is SQL Server called SQL Server? Is it's an actual SERVER running on a physical server machine, then what does it have to do with writing code in it? People don't write code in Windows Server 2008. It is used to serve various services to clients, such as printing, files, shares, etc. So what's different about SQL Server?

Can someone please explain in detail or show me a few good links?

Finally, can I practice writing SQL on a Netbook? Does it require a powerful machine? Obviously, I wont be making any huge databases any time soon. By that time I'll be doing this on my desktop.

Thanks very much.


1. SQL Server is so named because it's a server application, like exchange server, sharepoint server, etc. Windows Server 2008 is an operating system. Totally different from a server application.

2. SQL Server Management Studio is the main tool used for managing databases, security, etc. etc. etc. It also includes a tool to write and execute sql statements.

3. You don't need a powerful computer to run sql server. You can download and install SQL Server Express for free. Express does not include sql agent, which is used to execute scheduled SQL jobs.
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
If you're using Windows, SQL Server Management Studio. Otherwise, the MySQL equivalent.
 

PhatoseAlpha

Platinum Member
Apr 10, 2005
2,131
21
81
If you're an applications developer in a large company, and your boss asks your to manage an SQL database....quit. If he asked you to design a rocket? Same deal - you ain't qualified, so don't do it.

This isn't to say you won't have to write a few SQL queries if you end up at a small business - or maybe even all of them if the business is small enough. But DBA is a highly specialized skill set - and it ain't yours.

Beyond that....if you can't handle what SQL handles intuitively by the time a master's is in reach, we cannot help you.

And you can practice in MySQL or Access. It's little more then yet another formal method for thought processes you should already have.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
This isn't to say you won't have to write a few SQL queries if you end up at a small business - or maybe even all of them if the business is small enough. But DBA is a highly specialized skill set - and it ain't yours.

DBAs in the companies I've worked for were responsible for setting up and managing databases, but they didn't write queries... at least not queries that implemented data I/O for in-house applications. Those queries were always written by developers.
 

beginner99

Diamond Member
Jun 2, 2009
5,320
1,768
136
In Java I used Netbeans.. but with SQL I don't know what I should be using.

With the proper driver you could actually do it from netbeans... also I advise against it.

For MySQL there is "MySQl workbench". I personally use HeidiSQL which also supports SQL Server.

For SQl Server it's SQL Server Managment Studio.

For Oracle it's SQL Developer.

For PostgreSQL it is pgAdmin.

I guess you get it by now. In general each database comes with it's own admin tool.

I also like Notepad++ to write queries but then you lose "code completion" which can speed up things a lot.
 

Madwand1

Diamond Member
Jan 23, 2006
3,309
0
76
I will be doing my Master's In Web and Application Development in the fall. It's mostly Javascript, PHP, XCode and the like, but one required course and a few electives are about databases. Off course I will probably be forced to take some bridge classes because I don't know much about programming, but I want to get a head start, and study this stuff at home before I start my classes.

There's a strong theoretical foundation for SQL, and it's implementation-independent. On the other end, there are commercial implementation which provide non-standard features which are intended to be competitive against other vendors. Getting into the details of specific vendors' implementations can be useful, but that's not where you should start. You should start with the foundations, and stick with standard SQL as long as you can, and get into the specific implementations as needed for the environments you find yourself working in.

It's important for a developer to have an understanding of SQL and schema design, which goes hand-in-hand with good application design. You cannot leave this stuff to the DBA -- that's like leaving communications to the network administrator.

Here's an on-line tutorial on the basics to get you started:
http://www.w3schools.com/sql/default.asp
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
There's a strong theoretical foundation for SQL
Theoretical foundation for SQL: IBM didn't want to rock the boat by making something new, SQL, as a derivative of SQUARE, was good enough, and here we are today, four decades later. :D

More seriously, on that topic, E.F. Codd's paper can be found here:
http://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf (link is to Google quick view, go to the HTML viewer's file, then print, for the PDF)

It should be worth a read, to see the problems that needed solving, and methodologies behind handling them. It's a much easier read than it looks like it will be, as the problems to solve and how to solve them are spelled out in the text, relying on the figures for illustration rather than as part of the explanations.

For something more in-depth and updated, An Introduction to Database Systems is basically the text, but it is very much an academic textbook, hence my recommendation for something more down to Earth in my earlier reply.
 

brandonb

Diamond Member
Oct 17, 2006
3,731
2
0
I'd just like to say:

SQL server is much like a web server, which sounds like you are familiar with.

With a web server, you sent it requests (such as GET POST, etc) which the server returns you the HTML result.

With SQL server, you sent it requests (such as CREATE DATABASE, SELECT, UPDATE) which the server returns you the query results (if anything).

That said, usually if you install SQL management studio, you can work in a UI tool which then creates the requests and the results are given to you graphically, but every thing done in the UI tool can be done by using the SQL commands. No different than a web browser displaying you the HTML page in a graphical format rather than a text format.
 

ringtail

Golden Member
Mar 10, 2012
1,030
34
91
"Where to start" is not writing SQL code.

With SQL, "where to start" is studying how to normalize a database. That's a pencil & paper & textbook exercise. After you get that down, THEN on to code.

I used to use command line, but last few years moved over to phpMyAdmin + MySQL on Windows. There are many brands of free GUIs to use with MySQL, such as Toad for MySQL and many others.

The fad on this forum apparently is to use Postgre instead of MySQL, but the latter has lots more use-community supports.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
FYI, you can set up an Apache, PHP, MySQL collection on a Windows desktop PC for free using XAMPP. It includes PHpMyAdmin in the package:
http://www.apachefriends.org/en/xampp.html
On Windows, SQL Server Express has a limited version of SQL Server Management Studio (separate download, IIRC). For messing around, it aught to be easier than PHPMyAdmin, or even PgAdmin. If there's one thing MS got right with IIS and SQL Server, it's the management tools (which, in the case of SQL Server, are also partially development tools). Not a full web stack, but the learning curve shouldn't be all that high, if/when the OP has a nice, "aha," moment w.r.t. organizing the data in normalized or mostly-normalized schemas, and managing implementation separate from the interfaces.
 

amitkhan2167

Junior Member
Aug 17, 2012
14
0
0
I will be doing my Master's In Web and Application Development in the fall. It's mostly Javascript, PHP, XCode and the like, but one required course and a few electives are about databases. Off course I will probably be forced to take some bridge classes because I don't know much about programming, but I want to get a head start, and study this stuff at home before I start my classes.

What I cannot understand is which environment people use to write SQL code.
Like let's say you are a DBA in a large company, and your boss asks you to create a database...

WHERE are you going to create this database? Is it a program like SQL Server, or MySQL which opens up an interface and I will write code there? What will "compile" the code and present it visually to the user as a database?

In Java I used Netbeans.. but with SQL I don't know what I should be using.

And why is SQL Server called SQL Server? Is it's an actual SERVER running on a physical server machine, then what does it have to do with writing code in it? People don't write code in Windows Server 2008. It is used to serve various services to clients, such as printing, files, shares, etc. So what's different about SQL Server?

Can someone please explain in detail or show me a few good links?

Finally, can I practice writing SQL on a Netbook? Does it require a powerful machine? Obviously, I wont be making any huge databases any time soon. By that time I'll be doing this on my desktop.

Thanks very much.

HI ibex, SQL is a query language( structured Query language) is a special-purpose http://en.wikipedia.org/wiki/Programming_languageprogramming language designed for managing data in http://en.wikipedia.org/wiki/Relational_database_management_systemrelational database management system. The most common operation in SQL is the query, which is performed with the declarative SELECT statement.
 

amitkhan2167

Junior Member
Aug 17, 2012
14
0
0
I will be doing my Master's In Web and Application Development in the fall. It's mostly Javascript, PHP, XCode and the like, but one required course and a few electives are about databases. Off course I will probably be forced to take some bridge classes because I don't know much about programming, but I want to get a head start, and study this stuff at home before I start my classes.

What I cannot understand is which environment people use to write SQL code.
Like let's say you are a DBA in a large company, and your boss asks you to create a database...

WHERE are you going to create this database? Is it a program like SQL Server, or MySQL which opens up an interface and I will write code there? What will "compile" the code and present it visually to the user as a database?

In Java I used Netbeans.. but with SQL I don't know what I should be using.

And why is SQL Server called SQL Server? Is it's an actual SERVER running on a physical server machine, then what does it have to do with writing code in it? People don't write code in Windows Server 2008. It is used to serve various services to clients, such as printing, files, shares, etc. So what's different about SQL Server?

Can someone please explain in detail or show me a few good links?

Finally, can I practice writing SQL on a Netbook? Does it require a powerful machine? Obviously, I wont be making any huge databases any time soon. By that time I'll be doing this on my desktop.

Thanks very much.

I think you have to complete your course and than do the proper training of SQL because its very important part of the DBMS. So do one thing just visit the E books of the sql and read them and implement in your notebook.
 

KentState

Diamond Member
Oct 19, 2001
8,397
393
126
What school offers this program?

I'm scared that you can get a degree in that and have no clue about databases or common RDMS. I've worked with a lot of developers on database development and they at least get it at the basic levels.