PDA

View Full Version : SQL - How to Get Started?


ABC123

Steve Workings
03-20-2008, 11:03 AM
I know there are other threads on getting started with SQL, but I'm still unclear. What do I acquire to get started?

#1 oughta be a piece of software, right? If I get Microsoft's SQL Developer's Edition for $49.00, do I have everything I need?

#2 oughta be an additional learning tool, like a book. Another thread on this board has, as one suggestion, a free download to Learn SQL in 21 Days. I got it already and intend to be much smarter in 3 weeks than I am today.

Is this a good start? Am I headed the right direction? Am I missing something or doing something wrong. Dunno, but would love for someone to let me know.

Expiring minds want to know....

Thanks!

Bill Griffin
03-20-2008, 11:37 AM
Steve,

You can also check out Mysql.com. If you want to play around, you can download all of the software you need for free.

http://dev.mysql.com/downloads/

The Mysql community server section is where you can download the free versions. It runs on windows, linux etc. You would probably want to download the Mysql GUI tools as well.


I am just getting my feet wet as well, but the setup was pretty easy.

Bill

Steve Workings
03-20-2008, 12:20 PM
But if I have a customer that's specifying SQL, do I need SQL or can I also do everything I need with MySQL?

Bill Griffin
03-20-2008, 12:32 PM
Steve,

I would love to say SQl is SQL, but I am sure there are some differences between them and most are in the Tools that you use to get to the data, bot in the database engine themselves. SQL and MySql are a new world to me. If you are using Alpha as the front end, the differnces should be transparent. If your customer has some SQL guru, then they may have a preference. Is there a reason they are specifing SQL?? Are they already using a particular flavor on their website?

Bill

NoeticCC
03-20-2008, 12:51 PM
SQL stands for Structured Query Language

It is a syntax/programming language for querying databases

SQL is not a product, it is a programming language

The SQL database is the product you need (mySQL is free), and that usually runs on a central server

You usually set up your client PC to connect to the database via ODBC, or you set up a connection profile to the database from the web server, if you are talking about a web app...

http://en.wikipedia.org/wiki/SQL

NoeticCC
03-20-2008, 12:52 PM
But if I have a customer that's specifying SQL, do I need SQL or can I also do everything I need with MySQL?

Your customer needs to specify better! There is no such thing as "SQL" (e.g. they don't own a database software/engine called SQL), see post before this one... What database engine/software do they own? Examples are mySQL, SQL Server, Oracle etc...

Just have a read through the "Working with SQL Databases" bit of A5 help - that explains very clearly that SQL isn't a product or software, but that it is a variety of SQL Databases (products listed in the help entry) that you can connect to with A5: http://support.alphasoftware.com/alphafivehelpv8/Client_Server_Tutorial/!--Working_with_SQL_Databases_Title.htm

Steve Workings
03-20-2008, 02:04 PM
Thanks Andrea. I hadn't gone through that help. I'm working through it now. This isn't hard at all, and the guide is a very good start.

NoeticCC
03-20-2008, 02:41 PM
Thanks Andrea. I hadn't gone through that help. I'm working through it now. This isn't hard at all, and the guide is a very good start.
There's sooo much in that help file... unfortunately some of the bits relating to Oracle (which is our database system - the bits I couldn't get to work turned out to be a bug anyway and are now fixed :) ) were not very detailed, but I always find it best to start swotting up on these things in a way that actually relates to A5, because you can become an expert in a database and in SQL queries and still not have a clue how it applies to A5.

Of course, that help file "only" relates to A5V8, just read everything relating to passive link tables (e.g. you can read from SQL databases but only write to them using Xbasic or through a web form/grid control) with the notion in mind that V9 also has active link tables, which let you update data in an SQL database from web forms too :)

It does sort of sound like what your customer is after is a web front end though, for which theoretically V8 Enterprise would do the trick :)

Raymond Lyons
03-20-2008, 03:55 PM
Hi Steve,

Possibly repeating some of what others have said, I would start by downloading the free version of MYSQL along with whatever free tools they have. What I did is also download the free version of DBManager from http://www.dbtools.com.br/

I found DBManager to be be very helpful for troubleshooting and dealing more directly with a mysql database and its tables. You can use it to create tables and a database to experiment with, plus you can use it as an A5 independent way to change data, see what should be in an active link field (testing), etc..

In any case, set up a test mysql database on your development machine and then use the A5 tools to play with it. I think it is best to start by using the genies to connect and do all kinds of things and then maybe later to you use what you learn to do other things more directly with xbasic, etc.

Be aware (as others have said) all the various SQL databases (mysql, sql server, Oracle, etc.) do things slightly differently. If you let it, A5 takes care of most of these differences but not all. For example, I think it is still true that in A5 for a mysql DB that has a stored procedure, if you want to call the stored procedure you have to put "call" in front of the name of the stored procedure--something you do not have to do with sql server.

Good luck and get on it quickly so I can come to you for help!

Ray

Steve Workings
03-20-2008, 03:55 PM
This is for a web front end. Big project that'll use V9.

NoeticCC
03-20-2008, 04:03 PM
This is for a web front end. Big project that'll use V9.

OK but just FYI you don't need V9 to work fully with SQL databases with web front ends... :)

mariusm
03-20-2008, 04:04 PM
PostgreSQL is another SQL engine that's free - you can find it here:
http://www.postgresql.org/

Connects with JDBC, although I believe it works with ODBC as well (never tried that myself)

NoeticCC
03-20-2008, 04:05 PM
Be aware (as others have said) all the various SQL databases (mysql, sql server, Oracle, etc.) do things slightly differently. If you let it, A5 takes care of most of these differences but not all. For example, I think it is still true that in A5 for a mysql DB that has a stored procedure, if you want to call the stored procedure you have to put "call" in front of the name of the stored procedure--something you do not have to do with sql server.

True, theoretically the "portable" SQL syntax in A5 should work on all supported databases but I have found that a lot of the joins etc. need to be coded in native Oracle syntax in our case... that may be due to how our database was set up (long before A5) though... Although I get the same problems with Oracle 9i and XE too...

NoeticCC
03-20-2008, 04:05 PM
PostgreSQL is another SQL engine that's free - you can find it here:
http://www.postgresql.org/

I haven't tried this against V9 Platinum but didn't manage to get it to work properly in the query genie etc. Unlike Postgres, mySQL is fully supported by A5 and seems to work well, you can even create tables from the connection string manager, even in V8.

mariusm
03-20-2008, 04:10 PM
I played with it and Java and RR, but not with Alpha. I'll have to try.

NoeticCC
03-20-2008, 04:12 PM
I played with it and Java and RR, but not with Alpha. I'll have to try.

Let me know if the tables listing in the external database manager works... it didn't for me, but then it didn't for Oracle either and THAT was a bug. Since they use similar structures for schema/table allocations, this may be related..

Steve Workings
03-20-2008, 06:18 PM
OK but just FYI you don't need V9 to work fully with SQL databases with web front ends... :)

Yabbut I want the AJAX and other stuff V9 brings with it.

gkeramidas
03-20-2008, 07:02 PM
steve:

microsoft has their sql express you can try:

Brief Description
Microsoft SQL Server 2005 Express Edition is a free, easy-to-use, lightweight version of SQL Server 2005. It is fast and easy to learn, allowing you to quickly develop and deploy dynamic data-driven applications.

http://www.microsoft.com/downloads/details.aspx?FamilyID=31711d5d-725c-4afa-9d65-e4465cdff1e7&DisplayLang=en

DaveM
03-20-2008, 11:56 PM
mysql seemed easier with a5 than the other(several) ones i tried and the free tools were able to bring over dbf tables to mysql. V9 seems to like mysql, so I am there. I have spent nothing in money to date.

I just hope I can afford v9 and the extras I need/want.

NoeticCC
03-21-2008, 07:46 AM
mysql seemed easier with a5 than the other(several) ones i tried and the free tools were able to bring over dbf tables to mysql.



You can export from V9 to SQL DB tables by creating an export operation too :)