Learning Databases

citan x

Member
Oct 6, 2005
139
1
81
I need to learn about databases. What resources do you recommend to learn from?
What are some good books? Something that has some theory and practical examples on building and designing them would be best.
 

her209

No Lifer
Oct 11, 2000
56,336
11
0
Databases is kind of general. Are you learning just the theory of relational databases? Is there a specific vendor that you are interested in learning?
 

slugg

Diamond Member
Feb 17, 2002
4,723
80
91
Not meaning to hijack the thread here, but I'm kind of in the same boat as citan x. I know absolutely nothing about databases. I couldn't tell you what I want to know, since I don't know where to start. Where should I start? What books or websites should I look at? If I had to pick a vendor, I'd say MySQL since it's completely free.
 

Cogman

Lifer
Sep 19, 2000
10,283
135
106
Not meaning to hijack the thread here, but I'm kind of in the same boat as citan x. I know absolutely nothing about databases. I couldn't tell you what I want to know, since I don't know where to start. Where should I start? What books or websites should I look at? If I had to pick a vendor, I'd say MySQL since it's completely free.

I guess the first basic concept you have to know about databases is, they hold data :awe:. They are a pretty broad topic, asking "Whats the best book about databases" is akin to asking "Whats the best book about computers?" Both will receive the answer "What type?"

If you want to know how to program databases, then you will probably want to read up on SQL (Pretty much the industry standard for Database interaction.) SQL is simple enough, and common enough, that I would suggest just googling "SQL tutorial" and read from there. That should give you a good idea of what you need to know about SQL and give you a good idea of what we mean when we say "Narrow it down a bit"

If you want to know how databases work, Well, I suggest taking a college level class for that. Databases, and especially relational databases, are tricky things. There isn't any sort of simple answer that will help you here. If you just generally want to know how they work, then that is what the wikipedia is for.

If you want to know how you should structure your database (most online tutorials don't really cover that topic). Then I suggest getting a SQL book for the specific SQL database that you are working with and read up. They should have some good pointers for database design tricks for your database of choice (What works with MySQL doesn't always work for Oracle or MS SQL)
 

citan x

Member
Oct 6, 2005
139
1
81
I guess the first basic concept you have to know about databases is, they hold data :awe:. They are a pretty broad topic, asking "Whats the best book about databases" is akin to asking "Whats the best book about computers?" Both will receive the answer "What type?"

If you want to know how to program databases, then you will probably want to read up on SQL (Pretty much the industry standard for Database interaction.) SQL is simple enough, and common enough, that I would suggest just googling "SQL tutorial" and read from there. That should give you a good idea of what you need to know about SQL and give you a good idea of what we mean when we say "Narrow it down a bit"

If you want to know how databases work, Well, I suggest taking a college level class for that. Databases, and especially relational databases, are tricky things. There isn't any sort of simple answer that will help you here. If you just generally want to know how they work, then that is what the wikipedia is for.

If you want to know how you should structure your database (most online tutorials don't really cover that topic). Then I suggest getting a SQL book for the specific SQL database that you are working with and read up. They should have some good pointers for database design tricks for your database of choice (What works with MySQL doesn't always work for Oracle or MS SQL)

This is a very nice response.

The thing is I am a beginner and I basically need to learn all these things. I started by wanting to include a database in some programs. I have Microsoft Access but that is sort of looked down upon. I want to do it properly and that led me into looking into SQL and designing databases.

I generally don't like online tutorials because I prefer to read books and I also find them to be less comprehensive. I am doing my own research into how to go about this as well, but I am asking here to get extra ideas and books.

As for college classes, I would like to take one, but that is not feasible for the moment. I could take an online course, but I don't like those either. I like my classes like I like my books. Nevertheless, I am not discounting anything yet.

Basically, I am just asking for some good beginner books about SQL and relational databases.
 

lyssword

Diamond Member
Dec 15, 2005
5,630
25
91
If you really properly learned to do some code by hand with Access, then the transition to sql would be no problem at all. The difference is more behind the scenes technicality (access is slower in some cases, have to transfer more data which saturates the network, doesn't scale as well for large traffic).
 
Last edited:

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
MySQL and Oracle are good places to look when wanting to learn Databases. There's a wealth of information out there for either of them, and they're also free. Oracle is a little bit of a pain to get installed, therefore most people prefer MySQL.

Oracle Express is the free version (Free to develop, not or commercial use), I think there's a free version of MS SQL for students as well.


Either way you go, Tech on the Net is a great resource.
http://techonthenet.com/
 
Last edited:

leeland

Diamond Member
Dec 12, 2000
3,659
0
76
I learned using Database Design for Mere Mortals, and found it to be good.

http://www.w3schools.com/sql/sql_intro.asp for a much more pointed tutorial.

I work as a DBA and when I started several years ago I thought the website bulldog linked was an excellent reference starting out.

I also really like the following website for articles and the forums...they are wonderful for any kind of question known the SQL

www.sqlservercentral.com

also...if I could make a recommendation...practice and read...that is the ONLY way you will truly learn.

If you have specific questions...don't be afraid to PM me...I will see what I can offer for help
 
Last edited:

ebaycj

Diamond Member
Mar 9, 2002
5,418
0
0
This is a very nice response.

The thing is I am a beginner and I basically need to learn all these things. I started by wanting to include a database in some programs. I have Microsoft Access but that is sort of looked down upon. I want to do it properly and that led me into looking into SQL and designing databases.

I generally don't like online tutorials because I prefer to read books and I also find them to be less comprehensive. I am doing my own research into how to go about this as well, but I am asking here to get extra ideas and books.

As for college classes, I would like to take one, but that is not feasible for the moment. I could take an online course, but I don't like those either. I like my classes like I like my books. Nevertheless, I am not discounting anything yet.

Basically, I am just asking for some good beginner books about SQL and relational databases.

Download SQL Server 2008 Express Edition, and play around with it. It's free and infinitely better than access. You also have a very easy upgrade path to the "real deal" if necessary (only a backup / restore required, should take no more than 30 minutes for everything). It's also VERY easy to interface with .NET. And the help files are REALLY good at explaining things. There's also MSDN, lots of forums online, and google. With google just add a "sql server 2008" or "sql server 2005" with your query and you will get good results 99% of the time.

Also, there is WAY WAY WAY more information out there for MS SQL than there is for Oracle. MySQL has a fair amount of info, but is less "enterprise-y" than MSSQL/Oracle/DB2.
 
Last edited:

ebaycj

Diamond Member
Mar 9, 2002
5,418
0
0
I work as a DBA and when I started several years ago I thought the website bulldog linked was an excellent reference starting out.

I also really like the following website for articles and the forums...they are wonderful for any kind of question known the SQL

www.sqlservercentral.com

also...if I could make a recommendation...practice and read...that is the ONLY way you will truly learn.

If you have specific questions...don't be afraid to PM me...I will see what I can offer for help

Same here, SQL 2005/2008 DBA for quite a while now. Currently dealing with 6000+ SQL servers at work. I got no problems answering questions, IF people really want to learn, and are willing to put some effort in.

DBA is a pretty good gig, except for the 24h on-call shifts (which, if you have your shit together with your servers, are not bad at all). If you know your shit, you can make some pretty good bank. I was making 90k+bonus less than 5 years out of school, in a fairly crappy job market. It's also kind of nice, because it's central to the programmers, end-users, and hardware, so you get to dabble in all three to some degree (variety is nice in IT). You also need to have a good knowledge of OS / Network / Programming / Hardware / Monitoring / CS fundamentals (Big-O notation, statistics, etc...). It's demanding, and you have to be dedicated, but it's interesting and fun as well.

And actually, based on my experience, what's needed REALLY REALLY badly in the industry is GOOD SQL programmers. Most programmers write their own SQL, and 99% of the time, it SUCKS LIKE A HOOVER performance and efficiency wise (if you know "normal" programming, think unnecessary nested loops of nested loops, it's usually REALLY bad).
 
Last edited:

DT4K

Diamond Member
Jan 21, 2002
6,944
3
81
Same here, SQL 2005/2008 DBA for quite a while now. Currently dealing with 6000+ SQL servers at work. I got no problems answering questions, IF people really want to learn, and are willing to put some effort in.

DBA is a pretty good gig, except for the 24h on-call shifts (which, if you have your shit together with your servers, are not bad at all). If you know your shit, you can make some pretty good bank. I was making 90k+bonus less than 5 years out of school, in a fairly crappy job market. It's also kind of nice, because it's central to the programmers, end-users, and hardware, so you get to dabble in all three to some degree (variety is nice in IT). You also need to have a good knowledge of OS / Network / Programming / Hardware / Monitoring / CS fundamentals (Big-O notation, statistics, etc...). It's demanding, and you have to be dedicated, but it's interesting and fun as well.

And actually, based on my experience, what's needed REALLY REALLY badly in the industry is GOOD SQL programmers. Most programmers write their own SQL, and 99% of the time, it SUCKS LIKE A HOOVER performance and efficiency wise (if you know "normal" programming, think unnecessary nested loops of nested loops, it's usually REALLY bad).

The on-call is why I'd never move to the DBA side. Although I have considered it. I'm a developer who has spent the last 8 years doing VB, .Net, and SQL dev.

I've actually spent this whole week with an MS consultant, doing training on analyzing our queries and optimizing our db's. After 8 years of writing SQL, it's about time I spent some time learning about execution plans and indexing.
Actually, most of the stuff we wrote in house wasn't too bad. All the really bad SQL we have running was written by our highly paid external consultants. So yeah, I'd agree. Good SQL developers are definitely needed.

Back on topic,
You can download SQL Express and play with that. Or you can use MySQL, but I'm not sure what tools it has. I've only used it for websites, so I only know about phpMyAdmin. Another good option for the basics is SQLite. There's a firefox add-in that you can use to manage SQLite databases.

If you want to do it right, you really need to understand the concepts of relational databases. I don't have any specific recommendations, but most of the general database books for beginners are going to cover the same information.

In a lot of my college db classes, the profs loved having us do everything on the command line. IMO, that's stupid. Using a nice GUI, like you get with MS SQL, makes it easier to look at your database, the tables, stored procedures, indexes, etc. and understand what's going on.
 

wiretap

Senior member
Sep 28, 2006
642
0
71
Start out by doing some Microsoft Access tutorials. (easily found by googling) That will get you the basics of databases. Relationships, queries, forms, tables, macros, etc. It's very easy to understand. From there, if you enjoy that sort of thing, you can get more in depth with the SQL stuff.

Lots of companies actually look for people with extensive database experience. Everyone I've worked for has had me work on database projects, both back-end and front-end stuff. It's a good thing to have in your knowledge box.
 

Tech_savy

Member
Nov 18, 2009
111
0
0
These is simple. Install database software and start the hello program.
And you can have The Complete Book (DS:CB), by Hector Garcia-Molina, Jeff Ullman, and Jennifer Widom 2nd edition.These have helped me.
 

KIAman

Diamond Member
Mar 7, 2001
3,342
23
81
And actually, based on my experience, what's needed REALLY REALLY badly in the industry is GOOD SQL programmers. Most programmers write their own SQL, and 99% of the time, it SUCKS LIKE A HOOVER performance and efficiency wise (if you know "normal" programming, think unnecessary nested loops of nested loops, it's usually REALLY bad).

Haha, I remember when I was programming right out of college and stuck in my programmer frame of mind. I wrote about 60 various stored procedures and triggers and got it to couple to my transport layer pretty good. Once I showed our resident DBA the code, he just about puked at the amount of cursors and loops I had in there. I learned quickly to write set based queries for fear of his wrath.

It isn't BAD programming that makes a programmer write loop based SQL. It is ingrained into a programmer's brain from their past experience and education because set based logic is foreign to non DB programming.

Back to the OP:

What do you know about databases so far? You have to start from somewhere. Logic would say you should know the following...

1. Databases hold data
2. Databases have methods for you to store and retrieve data
3. SQL is the standard database language

You are asking a broad question akin to asking "what's the meaning of life?" Learning to use a specific DBMS and learning database design and learning database programming are so different from each other, the only common element is the word "database".
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
You mentioned that you want to include a database in some of your programs. Is that your main motivation for learning databases?

I would start with MySQL, just start integrating it with your program and learn as you go. MySQL's own documentation is excellent and should have all the info you need to get started. You will also need to download the interface between your programming language and MySQL. For example JDBC connects Java to MySQL.

The finer details like efficient database design, etc.. I would learn later, once you know how to actually get a MySQL database up and running and working with your program.
 

mahesh2k

Junior Member
Jan 4, 2010
2
0
0
Two faster ways in my opinion are:
1) Start using SQLite and learn SQL quick
2) Start learning DB using MS-SQL server.
There are lots of good tutorials and videos for learning MS DB and MySQL DB. So search on google for that.
 
Oct 27, 2007
17,009
1
0
This book is very, very good, but it's also kind of dense and academic. I recommend reading it and NOT skipping the chapters on the relational algebra, it seems academic and useless but it's something you'll want to know if you want to seriously understand DB systems.
 

sao123

Lifer
May 27, 2002
12,653
205
106
well, I have a getting started DB question also... for a LONG time, i have been a simple C++ programmer... BUT, I have also built many access databases, (with no evil VBA), all purely using the staandard features of access: tables, forms, querys, reports, macros, and a main switchboard.

If I wanted to start making a front end, for a SQL express DB, what technologies do I need to take time to learn? (lets assume I am going with visual studio pro version 2005 or possibly 2008)...

Is C++ && ADO.net sufficient to do a fully featured, input/update/query/reports front end? Or do i need to learn C#/SQL/XML/Crystal Reports in addition to ADO.net?
ADO.net seems to be one of those buzzwords which everyone talks about, but never seems to explain what all it can do, and how to code it.
perhaps I need to go back to ODBC? another buzzword.
I should have no problem learning C#.net in a week or so, but database interface programming should be straight foreward, but seems anything but!!!
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
well, I have a getting started DB question also... for a LONG time, i have been a simple C++ programmer... BUT, I have also built many access databases, (with no evil VBA), all purely using the staandard features of access: tables, forms, querys, reports, macros, and a main switchboard.

If I wanted to start making a front end, for a SQL express DB, what technologies do I need to take time to learn? (lets assume I am going with visual studio pro version 2005 or possibly 2008)...

Is C++ && ADO.net sufficient to do a fully featured, input/update/query/reports front end? Or do i need to learn C#/SQL/XML/Crystal Reports in addition to ADO.net?
ADO.net seems to be one of those buzzwords which everyone talks about, but never seems to explain what all it can do, and how to code it.
perhaps I need to go back to ODBC? another buzzword.
I should have no problem learning C#.net in a week or so, but database interface programming should be straight foreward, but seems anything but!!!

If you are using C++, I would consider using OLE DB. ADO.Net is .NET managed code and there's no need to add all that overhead if you're writing a native C++ app, though it would be a good choice if you're using C#. ODBC is heading towards obsolescence, is kind of slow and won't support all the features of MS SQL Server. OLE DB is native and developed by Microsoft, so it should fully support MS SQL.
 

dfnkt

Senior member
May 3, 2006
434
0
76
I learned using Database Design for Mere Mortals, and found it to be good.

http://www.w3schools.com/sql/sql_intro.asp for a much more pointed tutorial.

I have read "SQL Queries for Mere Mortals" and it is probably the best book around for learning to query/update tables so I would only assume that the design book would be equally well written.

In the queries book they start out with a plain english sentence such as "Show me all employees hired since 1/1/09" and they then begin to slowly replace the words in the sentence such as Show with "select" and then remove the superfluous words from the sentence until you're left with a working query.

I would recommend looking into the design for mortals book.