MySQL: Building User Interfaces
What's in the book? The first chapter guides the reader through the basics of MySQL and how it compares to Access 2000 and SQL Server 97. Next, a code listing demonstrates the basics of connecting to MySQL via C using the MySQL C API. the book gives an all-too-brief whirlwind tour to the basics of MySQL. The next four chapters are a tutorial on how to use GTK+ and GLADE, focusing on how these toolkits are similar and different from their Visual Basic counterparts. GTK+ was chosen in this book because of its cross-platform compatibility with both Windows and Linux / UNIX operating environments. The second part of the book takes what was learned about MySQL and GTK+ with GLADE and uses it to create a stand-alone application (a real-world order-entry application). What's Good? Throughout MySQL: Building User Interfaces, Stuckey describes exactly what he is doing and why he is doing it that way. The introduction to GTK+ in the first part of the book describes just about every GTK+ widget available (menus, buttons, sliders, status bars, etc.), and creates a monster busy-box application (not to be confused with the busy-box application by Bruce Perens) demonstrating those widgets by themselves. Later in the book Stuckey uses Glade to put applications together, but not using Glade early on gives the reader a chance to see what is happening under Glade's abstraction. During the building of the order-entry application, Stuckey explains the design decisions behind the widgets. Each window of the application is introduced first with a diagram describing where the widgets will be followed by the code for each widget. The design looks like a Visual Basic application designed by a a programmer, with an eye toward the functional rather than the aesthetics of user interface design, but as an introduction to GTK+ programming it works well. What's Bad? If there was ever a book that required a CD-ROM to accompany it, this book gets my nomination. Authors have to walk a fine line between presenting code snippets that don't make sense by themselves, or risk boring readers with page after page of code that might confuse readers who aren't yet ready to view full code listings. MySQL: Building User Interfaces chose to include the full code listing for everything. This is both a blessing and a curse: readers have the code right in front of them and don't have to worry about being in front of a computer while reading the book, but the flow of the book is interrupted every time something is introduced.
The descriptions also suffer, because those code listings are expected to explain in more detail what is going on. In the GTK+ introduction, widgets are introduced with short paragraph introductions. The real-world application, which should be the focus of the book, reads like an assembly line: A screen is introduced, the widgets are placed, and the code is listed. Worse, files which make little sense without a computer (such as files generated by glade) are presented along with the code listings. This makes reading this book a chore. Thankfully, there is an FTP site with the code ready to use, but future versions of this book would be best served to include it on disc.
Perhaps a balance can be struck in a future edition where important code concepts are highlighted without sacrificing seeing the code in a meaningful context.
So, what's in it for me? Windows programmers who need a hand in getting their applications to Linux or UNIX may find this book helpful (but overwhelming) as they learn. This book stands out as a bridge for Windows programmers to make their transition to Linux and UNIX smoother, but the emphasis and amount of code listings in this book may make Windows programmers choose a different route.You can purchase MySQL: Building User Interfaces from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
MS Access has the advantage (on Windows machines anyway) of being a stand-alone database without needing a service to be installed. For a app where you don't want to have to install MySQL server and have it waste resources, you might consider SQLite. Unlike MySQL embedded, it's release under the public domain. MySQL Embedded is licensed under the GPL and has the following requirement:
Although, depending on what you want to do with the software, this may not be a problem. I'm all for free and open source software, but a brother's gotta eat too.
amazon link
isbn.nu link
half.com link
No affiliate tags are used above. But here's the amazon link with my tag, if you feel generous.
I have read this book, and used it to my advantage. However, they don't properly explain some parts about what you're doing, and why you're building the interface. I was hard pressed to find the exact reasoning they used for some of the things they did, but other than that, it's a great resource for mysql developers such as myself.
Before all the naysayers start in on what a flaky database MySQL is, how it doesn't do this or that, that it just a toy, please visit their web site and see what its current feature set is.
"Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
Before that, the dang thing doesn't support nested subqueries, or any kind of subqueries on inserts and deletes. Found that out the hard way recently (the docs don't make it very clear) and had to rewrite a bunch of elegant SQL as less elegant Perl loops and wacky joins.
Still, I love MySQL. Postgres is more full featured, but for the smallish web-based applications I write, it's overkill.
- None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
I've been working through this book for quite some time, and now that I've extracted all i can I have to declare myself delighted with it. The examples are good, deep enough to convey the lessons but shallow enough that not too much is irrelevant. I now have, as the author promised, several applications that will compile easily under both linux and win32. If i can fault the book at all , my only reservation is that is would have been nice to see all the necessary software included on the cd. Downloading all of the required applications and libraries (particularly for windows) led to a treasure hunt accross the web. That aside I would recommend this book to anyone who is not new to programming and databases, a little prior knowledge will be required as this is definately not a complete beginners book.
I read most of this book (maybe an older version?) last year. I found it very interesting because it basically gave me the idea to let the staff members of my web site update the site through a windowed interface as opposed to a web interface. MySQL doesn't have to be running on the same computer as the program is running on, so this would be simple. That way you could provide a rich client (for staff members, not end-users) to update a web site based on MySQL.
I know, it's not an original idea, but it's interesting because the book was a nice, step by step guide to doing just this. For what it's worth, I enjoyed it.
On the other hand, I ended up spending time with XUL instead.
It is an open source program similar to Microsoft Access. It works with MySQL too. It even runs on Windows.
Nero-burning ROM for Linux!
The > in the title disappeared.
- None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
MySQL: Building User Interfaces chose to include the full code listing for everything. This is both a blessing and a curse: readers have the code right in front of them and don't have to worry about being in front of a computer while reading the book
Since when do people read computer books on the throne? I would think anybody who's interested in this book (yes, you two hiding at the back!) would be reading it in front of a computer, trying out the sample code to learn what's going on.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Recently I had to write a mysql demo for a tradshow. I had
never worked with mySQL before. I got this book and was
able to complete a full fledged demo in a matter of three
days, working part time. The book is very well organized,
easy to read and understand and best of all the examples
work without modifications. I highly recommend this book
for beginners. I would have done so for all levels but
I'm not an advanced user of mySQL.
If you're thinking of getting started on mySQL this is the
book.
I have this book on my desk currently, its definitely a good resource on using MySQL for programs. The only gripe I had with it was that it didn't come with the source code, like was said in the review. I like how it focuses on converting the VB programmer over to GTK conventions.
Maybe someone should send Mike Rowe a copy after he gets out of Redmond-Training.
Slashdot sucks
Would you *reallY* like users installing MySql on their machines with the easiest to use options (read:insecure options) by default? GUIs are much worse. Best to stick with raw SQL and text files, that way you *have* to learn to secure the system.
Nero-burning ROM for Linux!
from the sql lite page it looks like multiple users can select silmultaneously but only write to the database one at a time. Locking for writes is not record level, page level or even table level - it is the whole database.
Too bad- because MySQL really does not replace Access but neither does this- unless it will only run internally to one user.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
But do we really want the book to only scratch the surface in many languages rather than give it thoroughly indepth with a single language? I often find it frustrating when chapter upon chapter is dedicated to a language I'll never use. If however you want lots of other languages covered, the MySQL Cookbook by O'Reilly has good scenario based discussions of using MySQL with PHP, JSP (as you wanted) as well as Python and Perl.
There are also quite a few over the over-the-shelf Java JDBC components and tools that you can buy as well in case you're building a commercial application.
To each his own I guess.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
Look at your own gotchas before laughing at others!
Nero-burning ROM for Linux!
Plleeeaassseee... BBeee moooreee ssseennnsssiiiittttiiivveee.....
Iii aaaammm aaaa hhaannnddiicaapppedd mmaaannn.
Right out of the box you can connect to mysql, nothing else required.
if you are a windows programmer then you must be retarded
I know many retarded people that would be offended by that statement.
Seriously though, making sweeping statements like that just makes it obvious that you were never good enough for the high school debating team...
As a self-employed database developer (for 10 years) I've been using Borland's Delphi to talk to MySQL.
Although Delphi is not open source, I prefer it to the typical MS Access / VB answer for Windows platforms, and Delphi has a very mature IDE (developer interface) which is most important when building lots of applications.
...might be to use a higher level language wrapper like Ruby/GTK.
Prototyping an app will probably take less time if you don't have the compile/link cycle... worth a try, anyhow.
The Army reading list
Couldn't the author have made a little more recent comparison to database technologies? AFAIK, SQL server is at version 2k, and Access at version 2k3.
Computers are useless. They can only give you answers.
-- Pablo Picasso
Don't confuse stupidity with lack of political engagement / ethics / knowledge / possibilities. I know quite a few people who are more or less stuck with Windows for various reasons (the main one being their employers' decision to - willingly or not - support Microsoft), but who would like to learn more and be able to break free. If a book like this can help even a few people gain some of the skills they need to migrate, it's a good thing.
This signature is not in the public domain.
I don't get why so many people are stuck on MySQL. It's lacks some very, very basic features: Views, Triggers, Stored procedures, nested selects. Sure, they promise support for all this in future version, but PostgreSQL supports it NOW. If you want a full-featured open source database, don't use MySQL, use Postgres.
Not that I'd be interested in a comparison between MySQL and SQL Server (midrange C/S replacement for Access/FoxPro - OK. Enterprise RDBMS? No)... but still.
MySQL is listed with OVER 20.
It's not about being a postgres fanboy/troll.. reality is that MySQL DOES NOT have features comparable to Oracle/PostgreSQL/SQL Server. When are you going to understand this??
As a DBD (db developer) I CAN'T use MySQL - it's feature set is too WEAK. MySQL is starting to get some of these features now and good for them but the argument was always about the feature set.. fuck some of you are dimwits...
And yes I've just fed a troll but fuck it, now im all pissed off and want another coffee..
"If you are a Windows programmer looking to create or move your stand-alone database applications away from Microsoft-specific tools such as Visual Basic, Visual C++, Access or SQL Server, MySQL: Building User Interfaces is written just for you."
Very few Windows applications are written in 'C' these days so converting an existing application to use MySQL would be pretty painful. You should have a better reason to port your code then simply avoiding MS tools.
Perhaps the book is better suited for developers who wish to switch to Linux for future development.
Yes, and then compare the sheer volume of MySQL gotchas to Postgres gotchas.
...if you don't use transactions, stored procedures, triggers, views, sequences (read: real ones), or if you actually want your database to be typesafe and have your insert/update to throw an error (or at least a warning!) on invalid data. Otherwise MySQL is most certainly not a viable replacement, although the codebase which used to be called SAPDB is. Firebird also qualifies for a replacement.
Also, if you need advanced XML querying tools for your database, none of the open source RDBMSs can currently act as a reasonable drop-in replacement for MS SQL Server.
If you don't need any of those features (and especially haven't actually used any of them in existing code), then MySQL could be added to the list of open source RDBMSs that fit the requirements for your project.
- I don't need to go outside, my CRT tan'll do me just fine.
and I contemplated about my tardiness all the way to the bank
I once used access. Even tried to make a VB front end. Couldnt get the damn thing to work. So I stopped using dbs for a time. Then someone showed me the pure beauty of MySQL and PHP (Thanks Andrew!!!!!!!!!) and since, I have never looked back. I tried Postgre, and didnt like it. Feature overkill...
Meh.
"In technology, there will always be 2 people with 200 opinions"
Hey, I just made a quote!
The parent is a content-free comment
Good point: mysql has 25 listed gotchas, whereas PostGreSQL has 2.
(FWIW, I'm using mysql, but I suck.)
Jesus was all right but his disciples were thick and ordinary. -John Lennon
...You are absolutely correct. As a matter of fact, I am currently engaged in doing exactly that.
JDBC is an incredibly complete data access solution that is almost like using DAO or ADO or whatever Access guys use these days. Swing, as done in Java 1.4 is plenty quick for DB GUI's and JBuilder Foundation's GUI Builder is about what an access of VB form developer would expect. I'm using all of these with no complaints and my apps run without change or recompile on Windows, Linux, and OS X.
In fact, in the time it'll take most to read this book and adapt the first tentative hello world project, I will have completed another third of my real project.
But, since this is Slashdot: "Ooh how I hate Java!". (secretly returns to work making $$$ doing Java apps)
"That naive cube! How long must I suffer this!" --Sheldon J. Plankton
They got shafted by TheKompany and need some help so download it a send a few bucks their way if you like it. Runs on Linux and Windows.
Help fight continental drift.
MS Access can be usedeither as a standalone DB app or as a front end to a larger SQL DB. Obviously the advantage of a SQL DB is its ability to serve multiple users at the same time, which Access on its own, can't do. So, use the right tool for the right problem...
...wouldn't the effort be better spent in actually bringing mySQL up to the point where it *can* replace SQL Server?
MySQL seems to occupy a rather subtle and narrow niche, perhaps the 'single smallish website' niche. I can't really imagine wanting to use it when most applications are liable to grow beyond that niche.
PostgresSQL looks a lot more encouraging, feature-wise, although it doesn't seem to offer many concrete benefits over SQL Server. Still, to me, a book on migrating to PostgresSQL or another full-featured RDB would be more useful.
Whence? Hence. Whither? Thither.
Check it out: www.runrev.com.
Windows, Linux, MacOS 9/X.
Looks much nicer than GTK or Java.
Much easier to script.
MySQL, Postgres, OpenBase, Oracle, ODBC, etc.
Also works with Valentina- a pretty darn fast Mac & Windows embedded database engine.
It's not for everything, but if you want cross-platform RAD, it should be in your bag of tricks.
Anybody know if it's still on the go ? I remember thinking how great the windows versions were for programming compared to the early versions of access which were more likely to crash and corrupt your data than actually do anything useful.
Comment removed based on user account deletion
- Obviously not everyone has Access. Many do, or have access to it via work or school (access to Access?!?)
- There were certain things that were easier to implement in an HTML-based setting (conversely, there's things I still can't equal that were accomplished easily using VB & Active-X. Things such as a customized file browser with a built in image viewer)
-
While some of my VB code and Active-X'ing would have been transferable to the web, it would have required requiring that the user of my system use IE to administer it. Not gonna happen!
-
I just don't like Microsoft enough to make my product only available to users of their software. The above IE example would have required my admins to IE; Access would require users to have Access; Having Access implies that the user must also run Windows (Wine just isn't there for Access usage I'm afraid. At least not for very advanced usage)
But for other projects I have, who's target audience is Windows users, Access is a great way to quickly build some impressive mySQL-based applications. IMHO, of course. 8)=SwingSet is an open source toolkit for writing database-aware/enabled Swing applications.
So there still isn't a production-quality MySQL server.
- I don't need to go outside, my CRT tan'll do me just fine.
SQL is a crappy relational language. The industry should focus on finding a replacement rather then be stuck with the Cobol of relational languages.
Table-ized A.I.
In most modern operating systems, inactive processes can be swapped out in favor of disk buffers and the like as well. Besides that, the memory used by an inactive MySQL process is closer to "rounding error" than "waste of memory."
But if you're still worried about it, an extra 256MB is hovering around $30 on Pricewatch.com. Hmmm... $30 and never having to worry about it or any other inactive daemons on my system again or...
I don't know about you, but my time is worth more than that.
- I don't need to go outside, my CRT tan'll do me just fine.
ok, so postgresql has two issues with syntax, and mysql has dozens of situations in which it will silently fail.
r /manual_Introduction.html#Bugs
And that's comparable?
If you want to read something amazing, go ahead and read the MySQL manuals, look for design deficiencies: http://www.mysql.com/documentation/mysql/bychapte
You'll see more than just minor syntax issues - you'll see that mysql spends most of its time in silent error mode.
Good point. All new users must be encouraged to test all their code before they deploy it!
I've seen the licensing fees - and if I remember right, they charge by concurrent user. So, if you want to support 1000 concurrent users @ $500/user on a mysql-based web portal, wouldn't that be something like $500,000? Sounds commercial to me anyhow.
you just need to know where to be careful, since when they fail they won't reliably tell you the way most other databases will. What they'll do, and what most of mysql will do is to do whatever will allow the operation to complete. So, as long as you know what & when to test - you get can good transaction support out of mysql. Not a big deal if you know what to look for and don't mind writing that code. Personally, I wish they'd get their shit together and fix this crap since I'm getting very tired of writing this kind of code.
Finally..some rational thought in here.
I've used Access and/or VB to talk to a backend Oracle or SQLServer DB. Different office has needs for different views/functionality? Deploy them a different MDB, talking to the same tableset.
At least not ones that conform to the ANSI SQL definition of sequences.
Sending a NULL to an AUTO_INCREMENT field is not the same as an SQL sequence.
Can you skip numbers easily in MySQL (eg. tell the DB to continue from some arbitrary number next)? Can you put explicit values into the column without the AUTO_INCREMENT overriding you silently? (My favorite part: MySQL changing the values you enter without even telling you.) Can you tell a MySQL sequence to have a maximum value lower than the maximum value of the underlying datatype or a starting value of higher than 1? (No, multiple inserts and then deleting them after doesn't count.)
The syntax may be different between all three, but when you pull back the curtain, the one in MySQL are a very different and limited beast.
- I don't need to go outside, my CRT tan'll do me just fine.
And don't forget those who are oh I dunno, concerned about selling their product. You don't go to a customer site and say, no no, you need to reformat and install Linux, you'll love it honest... your other programs? What no, you don't need those. Not a good way to make a sale.
...who modded me flamebait. Since I don't feel like reposting all of it, here's another one of my comments that covers this:
An example of MySQL suckage
Production quality doesn't just mean "doesn't crash." Production quality for a DB means "keeps my data safe."
Once again, there still isn't a production-quality MySQL server.
- I don't need to go outside, my CRT tan'll do me just fine.
What's worse, his/her product "Jahshaka" runs on Windows...
Go figure!
"Send an Instant Karma to me" - Yes
I hardly consider GTK+ + MySQL to even be in the same league as Access when it comes to ease of use and interface design. Sure, Access isnt that great of a program, but it is extremely easy to create a simple database+frontend in. Another nonfree alternative is Filemaker Pro. This is a very nice application.
Tis better to be silent and thought a fool, than to open your mouth and remove all doubt --Abraham Lincoln
MySQL is just a package of different database engines. Now they have added SAP DB (Adabas) under MaxDB by MySQL, which is now marketed as the open source enterprise database. Before that MySQL was marketed as ready for the enterprise. Sometimes I wonder if the people behind MySQL ever write a line of code. They need to get rid of all the other stuff, and write their own database engine, if they want to be taken seriously. If I wanted an open source database, I would go for Postgresql or Firebird. Data corruption with MySQL is very common. As for those that talk about features, do you care more about the data or about one more feature on how to extract it? Now for desktop applications, you have to be a bloody idiot to use MySQL for that, Access is much better, or BerkeleyDB from SleepyCat. SQLite is a piece of crap. What kind of a moron thinks that the only type in database should be STRING? It is very slow on INSERT, but fast on SELECT. Access (Jet Database) is dying, it hasn't been updated in a while (2000). Longhorn and it's sql server file system over NTFS killed access. MySQL is a joke and it should be treated as such. If those PHP zealots would know a thing about databases it wouldn't be the "most popular open source database". There is a reason why IBM, Microsoft, and Oracle are the 3 standards.
Could someone explain to me the difference between the two? (I've had a database course, so it's OK to get technical) There was that top 10 database article a while back, and while I saw MS SQL in there a few times I NEVER saw MySQL. What is MySQL better than MS SQL at, and vice versa?
...without downloading cygwin...native win32 support was meant to be in 7.4 but didn't make it. I deploy to FreeBSD but develop on windows (because some apps I rely on still don't run in Xover office and are too damn slow in vmware under linux). Don't get me wrong, it works fine in cygwin, but it doesn't sit well with me having to do that. Let's be honest here, PostgreSQL doesn't have an important feature of Oracle, the HAL (or whatever oracle call it), PostgreSQL has to be ported manually and it's taking a long time. True, it's a lovely system, but they need to sort this out before they start making even greater inroads. Also, visiting the PostgreSQL site doesn't sit well with PHB's. mysql.com looks very businesslike with licensing options and online stores, plus loads of documentation. Bring up postgresql's site and look at this message in the top right hand corner: "Tech Support requests to this address will be ignored! Please use the appropriate mailing list."
That wouldn't fill me with enough confidence to ok deployment of a mission critial app if I didn't know what you and me both know, PostgreSQL kicks ass.
I am NaN
Dumbest. Post. Ever. If you're going to make a half ass attempt at cut and paste trolling, at least use something that isn't part of the freaking article! If you were making a serious post, you have the worst case of ADD I've ever seen.
I'm looking at my previous post, but I can't seem to find that statement. Where did you see me write that? Nice misquote. You missed not only the spirit, but the letter of what I said. I only brought up Perl and PHP because those are examples of languages where many people are just starting out -- Perl was one of my first as well. I also brought those up because, unlike statically typed languages, errors can go through easily because there's no catch to say "this is supposed to be a number between 0 and 255" for example. Everything else you inferred was from your own defensiveness I think.
As for the PostgreSQL gotchas page, as a user of PostgreSQL, I can safely say that I have not come across anything like what was found on the MySQL gotchas page; There was nothing even close with regard to scope. And in the event that some weird behavior comes up, I'm pretty sure that PostgreSQL will at least warn me about it.
If the MySQL page were written with the rigor of the PostgreSQL page, there would be far more "gotchas" for MySQL. For example, the two PostgreSQL issues were differences with the official SQL spec -- not data consistency issues. If you were to include all of the aspects of MySQL that did not conform to the ANSI SQL standards (any of the ones over the years not to mention the most recent ones), the gotchas page would be about as long as the main MySQL documentation. Yes, it's that bad.
Now then, as for the failure to quote the third sentence, I'd be very surprised to find that "a few more gotchas to follow" would come to equal the twenty seven gotchas that MySQL has. There are twice as many categories of gotchas in MySQL than there are total gotchas for PostgreSQL.
But fair's fair. I'll add a few for PostgreSQL.
"MySQL with MyISAM tables is faster for selects and mostly read-only databases." Then again, I haven't accurately benched it myself. When I make a database schema in PostgreSQL, it cannot be mapped to MySQL easily. The only way to make a comparison is to strip my PostgreSQL database of many of its advantages both in performance and maintainability like triggers, views, rules, stored procedures, foreign keys that actually prevent you from dropping related tables, domains, schemas, real SQL sequences, etc.
Oh wait! MVCC (Multiversion Concurrency Control) doesn't apply when trying to check for duplicates with a SELECT followed by an INSERT. In other words, short of locking the table, you can't guarantee that if a SELECT comes up empty, that another client doesn't INSERT something before you get there. This of course is followed by an error as opposed to silent do-whatevers of MySQL coupled with the fact that MySQL can't do any better with this problem and frequently does worse.
Here's one: PostgreSQL cannot restrict access to just a column. The only workaround is to make a view without that column and set the rights appropriately. Finally, a real issue. I should submit that one to the PostgreSQL gotcha page maintainer.
Is PostgreSQL the end-all be-all? No, of course not. I never said it was. I only assert that MySQL is only fitting to a project with a very loose set of requirements -- requirements that don't include safety of your information, the raison d'etre of a RDBMS.
So if you want to store data, be able to retrieve it quickly, don't do too many inserts or updates, only access from a limited amount of simultaneous clients, don't care too much about crap accumulating in the tables, and have a good reason to eshew a custom data storage structure tailored to your specific needs, then by all means, MySQL is the database for you!
Use what you like, but choosing a toy (Yes! I'm calling it a toy!) to a real RDBMS seems a little bit unfair.
- I don't need to go outside, my CRT tan'll do me just fine.
...where you got that I thought "professional == statically typed." It was the comment about Fortune 100 companies wasn't it? Hmmm...
No, that was not my intent. Truth be told, I doubt they are using Perl or PHP to any large extent. Or even C++ for that matter. Chances are that the workhorses for those companies predate the creation of Perl and PHP...probably even C++ in its CFront days. Those companies have tons of COBOL that, while it works, they will never ever mess with. If their infrastructure were written in Eiffel, it wouldn't be going anywhere. If it were written in BASIC, as long as it has worked for twenty years and continues to work, no one is touching it.
Once again, I brought up those languages because of the legions of 31337 coders whose claim to greatness is a 500 character long, single line Perl script. They're not dumb or inferior. They just don't know any better yet.
- I don't need to go outside, my CRT tan'll do me just fine.
No contribution to the story at large here, I just wanted to comment on your slashdot id. Excellent beer. :) Nice to see someone else knows what it is.
:-P
Umm, unless you're really creative and that was the name of your last D&D character or something.
There are other alternative servers that allow access from other development platforms. The world does not boil down to M$ SQL and MySQL (and Postgres, etc.) as most of you seem to think.
.NET. In addition, the ODBC driver and OLE DB Provider open up tons of other development environments. (And, they have php, perl, and ODBC clients that work on Linux, so you can develop Windows or Linux clients.)
.so] that can be used free of charge!)
Take for instance, Advantage Database Server. Advantage supports development in Borland Delphi (and now Kylix), Borland C++Builder, as well as Java through the new Type 4 JDBC driver, php, Perl, and, yes, all Microsoft development environments, including
In addition, the server supports Windows systems, Linux, and NetWare. So, there are a variety of development platforms, as well as server platforms. And, while it's not open-source (sorry), it comes at a fraction of the cost of Oracle or M$ SQL.
Please remember that other options exist! (And, if you want a no-cost way to store data, Advantage has a Local Server dll [or
LAMP (Linux-Apache-Mysql-Php). Oreily calls it the open source web platform and has a webpage about it. Why would you use GTK and limit your platform?
Because its a server application the program doesn't have to be installed on different machines (except the web browser), which makes it easier to install. Programming some stuff in a web interface is tough, but not too too bad.
I actually did the demo on an ibook (ran the database/webserver, client browser on one machine. . used fink to install MySql and a php package from entropy.net. So easy to install I was amazed. although if I deploy I'll compile myself to set the options exactly as I want.
People are talking about high-level Languages to interface to MySQL and other DBs yet no one has mentioned Python.
:\)
It has connectors to MySQL, Postgres, Oracle, DB2, MSSQL (only if its hosted through IE I think
- browse to Cygwin d/l page
- CYGWIN SETUP
- Select install from Internet
- Open databases tree
- Select Postgress
- Install
It doesn't get much easier.I'm pretty sure the beer was named after the medical condition.
There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
INSERT INTO test
(id, num1, num2, num3, price, code)
VALUES (
0,
99999999999999,
NULL,
'A quick brown dolphin...',
21474.83,
'ABCDEFGHIJK'
);
Now the syntax should be kosher.
And I applaud you for that. It's good to know that you never make mistakes, are always fully rested, are never up against a hard deadline, etc. I'm not questioning your coding skills or your intelligence. On the contrary, I think that extra checks are always worth it. What I am saying is that the database, the final repository for your data, should be making at least the same amount of effort.
When the string 'A quick brown dolphin...' is passed to an integer field because I'm overly tired, a collegue hasn't been as rigorous as I usually am, some crack-smoking intern had a brain fart, or whatever, the fact remains that MySQL detected that it wasn't an integer. It didn't try to throw it in as the first 32-bits of the binary string. The table needed a number, MySQL had no idea what number you meant, and it decided to put in the default value for the column according to its datatype. In other words, it placed a value that I didn't explicitly specify through the client or schema and did not warn the client that it had done so.
Imagine if all of those POSIX networking functions didn't return an error code. Why not? I'm sure there are folks out there who will say, "But my network is always up, the cables are of highest quality, and in all the time I've worked there, I have never had a socket connection fail; so why do I need the error code back?" No matter the preparation, no matter the training, no matter how good the conditions are, when the rubber hits the road, I would like to be able to see out of the windshield to see if I've spun out.
This is the salient point that people (including the pager-adorned gentleman in the parent post) appear to blithely ignore. It's the giant pink elephant in the corner that everyone notices but no one wants to talk about.
By all means, perform the extra checks. Perform a check at compile time, at deploy time, and at runtime. Why are MySQL folks so averse to having a check at insert/update time as well? Why is it such an affront to want your database to do its own data integrity checks? Why is it so horrible to expect a relational database to do its job!? I honestly want to know. I would very much like some insight into this rather than picking on my choice of salad fork.
- I don't need to go outside, my CRT tan'll do me just fine.
I'm going to take this opportunity to plug Haccess, A set of fast, cross-platform, thread-safe C++ libraries for accessing Microsoft Access database files.
So far written entirely by my friend Oliver, it badly needs some dedicated C++ programmers to help out. I believe it has already made its way into OpenOffice as a filter.
Never trust a man in a blue trench coat, Never drive a car when you're dead
but you'd be wrong. I often read huge swathes of text just before bed. I let it sink in. Then I try to implement, using teh book as a reference, but the initial thought process happened away from the screen.
Yay me!
WTF is SQL Server 97?
Do you mean SQL Server 7?
WTF? Over?
Idiot.
Isn't sql lite for embedded apps? That would imply (to me) that its for PDA style applications. Which would mean that there would only be one users and database level locking wouldn't be an issue.
"Thanks to the remote control I have the attention span of a gerbil."
Access is not a stand-alone database. It is a stand-alone database *file*. Too often, developers make the mistake of confusing Access files with an actual production-capable database. It's great for prototyping and for use as an embedded database, but that's about it. Some important things to understand.
First, the term "Access" is a misnomer. Access is an application, part of the Microsoft Office suite. It is simply a front-end GUI to the JET database library.
Second, interaction with a JET database is conducted on a pure file-base level. In a multiuser environment, each user accessing the database file must do so as if they were reading a simple file across a network. If you execute a query against that file, you must copy that file down into your local memory for manipulation. This is because there is no JET "Server" to marshall calls to the database file from multiple clients. If you want this functionality, you must develop a server process that listens for requests. If you're going this extra step, you might as well use a real database server (e.g. SqlServer, mySQL, Postgres, Oracle, etc). If you're not in the business of writing a database server, it's much better to let someone else do it.
Third, JET files use a very primitive method of data locking. I might be a little behind in the current implementation, but as of Jet 3.5, you could not do row locking. Data in JET is managed in pages. IIRC, the page size is 4k. So, if you need to lock a row of data, you actually end up locking several rows, depending on the size of the rows involved. This creates greater data contention and impacts performance. Again, this might have changed recently, but it is still inefficient.
Fourth, JET is very easy to corrupt. Since each client accesses the database file simultaneously, if one of those clients crashes, they can end up hosing the database. Contrast this with a server where if the client crashes, the database server can manage the crash, as it is an independant process.
Five, JET does not have any ability to maintain itself. It cannot rebuild its own indexes, purge deleted rows or compress itself without manual intervention. Again, this is because there is no server. A maintenance scheme must be developed whereby these functions are performed on a periodic basis. For a database of appreciable size and use, this could be as frequent as hourly and as minimal as daily. In order to pack/compress the database, the maintenance program must have an exclusive lock on the entire database file. If you maintain a 24/7 system, this can have a severe impact. Plus, there is the issue of forcing client applications out of the database programmatically. Easy enough to set up, but still a pain in the ass.
Full database servers perform these functions on their own, in real-time, without excluding the clients.
There are still other reasons not to use JET for anything but the most trivial programs, but I think I've kicked it enough.
So that I am not misunderstood, JET does have its uses. It's suitable for stand-alone applications where the maintenance processes can be integrated within the app itself. It's ubiquity on the Windows platform (since Win2000) allows you to minimize your installation package size and, of course, it's free. However, just like everything else, it's important to know what is appropriate and what should be left for more robust and capable solutions.
Standard disclaimers apply, IMHO, YYMV, yadda yadda.
Ryosen
One man's "Troll, +1" is another man's "Insightful, +1".
Sad fact is a significant number of applications out there that can require a database could perform just as well using postgresql. (After reading the mysql gotcha's list and experimenting with it over the past week I don't think i'll be recommending that DB for awhile. Unless its for a website backend or something.) But for some reason management things they need to spend hundreds of thousands of dollars on a commercial DB.
I try to stay away from licensing but yesterday I priced Oracle for a server were going to put in.. I almost fainted. With these up and coming OS databases the big boys are going to have to make some serious cuts to their pricing scheme or start releasing stripped down versions.
"Thanks to the remote control I have the attention span of a gerbil."
Most real DBA's that I know of (and I know quite a few being one myself) don't understand why mySql is so popular. As mentioned numerous times above this thread, it allows you to insert crap into your database.
Sure, for simple websites mysql or small startups without capital its fine but for the job i'm paid to do, I won't risk it on mysql.
"Thanks to the remote control I have the attention span of a gerbil."
Look let's get it straight once and for all. MySQL sucks, hands down, it is crap. MS Access sucks, hands down it is crap.
If you want to Mickey Mouse your careers and use MySQL or MS Access to develope applications, then be my guess. A month after your done, your client will be hiring me to rewrite their application using MSSQL because your app can't handle then load.
The bottom line is this, if you want to develope enterprise level applications, you have no choice but to use MSSQL, Oracle or Sysbase. Using MySQL shows how unexperienced you are as a developer.
And don't get me started with the morons out there saying that they don't need triggers, stored procedure or views. Let me ask you this, morons: When you develope a database application, how do you start? Do you just start coding your application and build you database as you go along? Or do you actually sit down and design the database first, putting in all the referential integity and business rules in? If you take the first road, then idoit, answer me this. What happens when someone goes to enter data in directly into the database and not from you application, and this will and does happen. Your database is going to get corrupt because the person now can by pass all the your business rules that you, the wondeerful programmer that you are, coded into your PHP application instead of putting them into the database.
I personally cannot stand people who think MySQL should even belong in the same product line as MSSQL or the other commercial, real, databases out that.
We have an old saying in the windows world: "Friends don't let friends use Access." Which means Access is great for a personal, jerk off app, but if it will ever be commercial, you need to use MSSQL. I think you OSS people out there need a similar saying.
MSSql, Oracle and IBM's DB2 all come in a cut down version for around $5000 per processor. Ok, so you don't get some of the nice features like advanced clustering and replication, but if you absolutely have to have oracle (i.e., running something like SAP/3 for a small shop) then that's the way to go. The problem with Oracle and DB2 is that even once you've bought the products, you need to pay a DB guru to keep them ticking over, they can't just be setup and left, like PostgreSQL and MySQL. We use MySQL for a lot of simple websites. My companies flagship product however uses a database abstraction layer, so you can use it with any database that has the base requirements.
I am NaN
I stand corrected
- I don't need to go outside, my CRT tan'll do me just fine.
Unions are not supported either in MySQL 3.x. It is easy to replace it with several queries, but not convenient when you have a lot of SQL code that relies on unions.