Ask Database Guru Brian Aker 232
Brian Aker is Director of Architecture for MySQL AB. He has also worked on the code (and database) that runs Slashdot, and is well-known in both Apache and Perl circles. Outside of the arcane world of open source "back-end" programming, though, hardly anyone has heard of him. This is your chance to ask Brian (hopefully after looking at his blog and Wikipedia listing) about anything you like, from Perl to database architecture to open source philosophy to upcoming events in Seattle. We'll send Brian 10 of the highest-moderated questions approximately 24 hours after this post appears. His (verbatim) answers will appear late this week or early next week.
You & Google (Score:5, Interesting)
Object databases? (Score:5, Interesting)
Re: (Score:2, Informative)
It has a Java and a
Re: (Score:2)
But even the authors of db4o say that it's not suitable for multi-gigabyte enterprise databases. For example, queries and query optimizer in db4o is a joke. Restructuring and versioning are primitive, etc.
Re: (Score:2)
Design goals of MySQL? (Score:4, Interesting)
At the same time, MySQL has traditionally excelled for things like light-weight web content management and the like. It is almost as if MySQL was designed originally for this sort of task as its core market.
What were the original design goals for MySQL? Has MySQL outgrown them and moving on to become something else?
Re: (Score:2)
Re: (Score:2)
Relational databases support SQL, which is somewhat fragmented with vendor peculiarities, but is nonethless a standard of sorts (as well as being a real standard).
Object databases have a standard interface, but to a first approximation, nobody implements it.
Re: (Score:2)
Well, maybe you did, but I didn't understand.
Re: (Score:2)
I'm not sure if any database can do this but what an OODBMS should really do is allow you to execute queries over an arbitrary navigational structure. For instance I should be able to ask questions like, "Can I get to an object O satisfying O.x+O.y=O.z by start
Re: (Score:2)
Document databases (or textual databases, for that matter) simply aren't a good fit with the relational model, so you're unlikely to see them incorporated with MySQL any time soon.
CouchDB is interesting, but I'd steer clear of it for the simple reason that it doesn't have any support for any relevant standards (e.g. Z39.50, MARC, XQuery). Vendor lock-in is bad, even when it's open source.
Re: (Score:2, Interesting)
Document databases (or textual databases, for that matter) simply aren't a good fit with the relational model
Well, one might argue also that hierarchical data is also not a good fit with the relational model. Or what do you think about "hacks" like Materialized Path or Nested Sets model, or even native XML data type? If we already have XML data type in many DBs, what prevents us having Document data type like what's in CouchDB (yes, it's proprietary, but so are many of the features in current RDBMS). MySQL is also backend storage engine agnostic and it has already a support for many different (and somewhat specia
Re: (Score:3, Informative)
True enough.
It's the way you interact with it that's critical here. Think about how you work with your favourite SQL DBMS and with Google, and you'll see that they're quite different at a very basic leve.
The fundamental re
A few options: (Score:3, Informative)
2) PgAccess (a TCL front-end and form builder for PostgreSQL)
3) Once:Radix (a web-based front-end builder for PostgreSQL).
OnceRadix is quite new and I think it is well thought out in a lot of ways.
Slashdot's Future (Score:5, Interesting)
Also, why do you select the nickname "Krow" for both Slashdot & your blog?
Re: (Score:2)
I'm going to take a blind stab and guess that the reason is because blogging or posting on slashdot is precisely the opposite of "work". Probably wrong, though.
With the reversed spelling there's got to be a Soviet Russia joke in here somewhere but I can't find it.
Archie McPhee's (Score:3, Interesting)
I've only been to their store once, but I mail order stuff all the time. Great cubicle toys. The best rubber chickens money can buy outside an art museum
Misconceptions (Score:5, Interesting)
As a Guru... (Score:5, Interesting)
Replication (Score:5, Interesting)
Example, slaves that can be started blank and copy all necessary files without needing to have a copy of the databases already.
Re:Replication (Multi-Master) (Score:4, Interesting)
Large corporation bashing aside, Active Directory and Oracle clusters do this very nicely, with low replication traffic volume. Is there any chance this feature will be added and improved upon in Mysql?
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Distributed databases Re:Replication (Score:2)
Re: (Score:2)
Re: (Score:2)
Insert into mytable (myvalue) values (random());
so well.....
Actually once you start getting into stored procedures, race conditions and the like could play havoc with statement-level replication. I would not use that unless I had no other choice and then only for a few narrowly defined sets of databases.
Largest challenges (Score:5, Interesting)
Re: (Score:3, Funny)
It's spelled "grammar".
Re: (Score:2)
Mirror? I'm on a roll.
Why MySQL? (Score:5, Interesting)
Re: (Score:2)
I stopped working with MySQL when PostgreSQL 7.3 came out. Prior to that, I did most of my prototyping on MySQL and then would move the scripts over to PostgreSQL (which I did since PostgreSQL 6.5). The basic facts are:
1) Prior to 7.3, PostgreSQL, while superior in many ways, was just a pain to deal with when trying to prototype databases (dropping a column was one of the big issues... you couldn't). MySQL was so much easier to work with.
2) Firebi
Big Ah Ha moments (Score:4, Interesting)
The Moneys (Score:5, Insightful)
I mean, come on, you can't tell me you've never been offered more money (although probably a lower position) at another company. What 'keeps' you at MySQL AB?
Data Truncation (Score:5, Funny)
Re: (Score:2, Offtopic)
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Where the community cannot reach consensus, no default should be specified and the user should be asked.
Re: (Score:2)
The problem is a fundamental one relating to an attitude that data integrity checking should be an optional feature available to the client. As long as
Re: (Score:2)
...as opposed to the completely freakin' insane default settings. As long as the defaults are totally broken, many people will regard it as a toy database. Whether it is or not, these are the issues that give it that reputation.
Re: (Score:2)
Authentication systems (Score:4, Interesting)
Are there any plans to enhance the authentication capabilities of the server to match what's available with Postgres/Oracle?
One thing I've always wished for is the ability to authenticate user/service access to databases and tables via other backends (pam_krb5, SASL, ldap, etc). This ability (imho) would result in wider adoption in certain IT shops where compliance officers and checklist junkies would opt to instead shell out for Oracle Advanced Security or something similar.
-s
Re: (Score:2)
It would be much nicer to have a nice system like PostgreSQL has, where you can assign various hosts to auth methods, but usernames are unique. Also external auth methods like Kerberos and PAM would be nice (PostgreSQL already has these, though I think that the Kerberos suppor
Re: (Score:2)
Podal pistol?
mySQL vs. PostgreSQL (Score:5, Funny)
Re:mySQL vs. PostgreSQL (Score:5, Funny)
Re: (Score:2)
"It's fleeing from our Database Harpoon. So how we frighten it? It can't get away! And that's why you should use my plan."
Sometimes you have to stoop to their level.
Re: (Score:3, Funny)
but the fish are good for both the dolphin AND the penguin...
Re: (Score:2)
So, let me get this straight: you (mySQL) use a dolphin to fetch data while PostgreSQL uses an elephant to fetch data. Would that explain why PostgreSQL is better at fetching large datasets? Like, the elephant can haul more, but is slower while the dolphin is faster, but can't carry as well? Have you thought about using a non-animal to fetch your data? Maybe a racecar? Those are fast and could probably haul as much as an elephant. Plus, then I wouldn't need to have fish or peanuts in my server room.
Of course, they say an elephant never forgets.
On the other hand dolphins probably get more sex. Hm.
Re: (Score:3, Funny)
Tabular vs hierarchal arrays (Score:2, Interesting)
SELECT name FROM table WHERE key='xyz'; seems so archaic and limited compared to something PHP-like such as $table['xyz']['name'] where $table is a disk-based global variable accessible from all scripts and automatically sy
Re: (Score:3, Insightful)
Basically the short answer is that the relational model has had much more time and more people working on it to mature, and a move to a different system as mainstream would have a totally insane impact on the workflow of enterprise level software development, from functional analysis to all the echosystem of tools to design and maintain applications...
On top of that, object databases are amazingly fast for quick CRUD an
Re: (Score:2)
Re: (Score:3, Informative)
Key/value systems have their place, but doing very normal RDBMS things in them is a pain.
Re: (Score:2)
The basic issue is that a relational database management system is basically a big math engine which allows you to express any sort of complex operation mathematically, and get a usable result out of it. SQL is basically an imperfect representation of relational algebra (quite frankly, I think that Codd's 12 rules have one subtle issue as well, but that is be
Re: (Score:2)
Because we've tried the hierarchical model in all its iterations and it sucks. To specify integrity constraints, you have to use graph theory. And while certain modes of access work, ad hoc queries are painful. Normalizing your data is often impossible. If you can't make sure the data is what it's supposed to be, and you can't make sure you only have one copy of it (normalizing) and you can't run arbitrary queries, your DBMS sucks.
The only rea
Re: (Score:2)
As far as specifying constraints why not use type theory. We know how to use crazy shit like algebraic and recursive types to say that something is a linked list or other complex data structure. We can do the same thing with an object database if you want.
However, I think fundamentally this is an unfair comparison because the reason the constraints on object dbs are hard is simply that you are asking the constraint to do much more.
Re: (Score:2)
Tabular databases have one edge that hierarchical databases will never be able to match: mathematically powerful manipulations can be described mathematically. For example, aggregates and joins don't make sense in a hierarchical database (you would probably fetch all rel
Re: (Score:2)
"Give me all inetOrgUsers who's state attribute is 'Kentucky' and whose OU is 'Sales'"
The larger problem is that hierarchical databases have representational issues which prevents the flexibility that you get in a relational model.
Re: (Score:2)
The basic idea is that an object is a set of named attributes (names may be duplicate) attached to a path specification. The dn or distinguished name is actually just the path to the object.
For hierarchical querying you can do things like:
"Give me all InetOrgPersons with the zip of 12345"
"Give me all OU's which are children of dc=example,dc=com whose name begins with s"
"Give me all child objects of OU=sales,O=Example,dc=example,dc=com"
"Give me all
Japanese Animation (Score:5, Interesting)
- What's your favorite Myazaki movie to date?
- What's the reason for this choice?
- And finally: I also love Myazaki's movies, but lately I have been struggling to find anime that I really enjoy.
They all seem repetitive and cliché. Would you dare recommend one? =)
Thank you a lot.
My best wishes for you and your cats!
Re: (Score:2)
Where to Start? (Score:2)
What one book or example would you recommend to someone who wanted to learn LAMP?
Why will MySQL not revisit some key design flaws? (Score:5, Interesting)
There are several behaviors in MySQL that are quite key to the core of the system, and which are still not being revisited. For example:
These affect performance of almost any large system. However, even with the new storage back-end, some of these fundamental "characteristics" aren't being revisited, in particular the universally derided failure to support foreign key constraint checking.
Why is MySQL so fundamentally incapable of revisiting decisions that have proven to be incorrect over time? I mean, Monty may have had reasons for making his database incapable of supporting key relational database constructs. But why are you incapable of accepting that for MySQL to have much wider scale adoption you have to remove the Monty Personality Constructs from the core limitations of the system?
For those of you who are interested, the key part here is that systems like InnoDB (which are able to process FK constraints internally) aren't able to do so efficiently, because the core locks them into row-at-a-time constraint processing, meaning that large inserts into fact tables with small dimension tables are painfully slow if you don't turn of FK constraint checking)
Date and the Third Manifesto (Score:5, Insightful)
Database Models (Score:5, Interesting)
Are relational database the end-all, or do we have other promising database models to look out for? OO-databases apparently went the way of the Dodo, but what else is out there that you find interesting?
Re: (Score:2)
But there's at least 2 other things that are heavily in the radar... OLAP systems have various non-relational ways of going ar
Re: (Score:2)
I suggest we combine the "what does the future likely hold" questions into a list for Brian to select from. Example:
Re: (Score:3, Insightful)
Multiple CPUs and multithreading (Score:2)
Do you think there is a better way of handling multithreading than mutexes and semaphores? If so, what would set of primitives do you think would best suit the task?
Client GUI Tools? (Score:5, Interesting)
MySQL on the other hand has a poorly-implemented, not-well-supported equivalent to Query Analyzer called MySQL Query Browser: http://www.mysql.com/products/tools/query-browser/ [mysql.com] It's slow, crashes often (especially when called upon to list large datasets), and has tons and tons of usability flaws (the most glaring being the impossibility to select/copy the dataset to any other applications, and the failure to support standard keyboard shortcuts like Control/Command-A to Select All.)
It seems to me that MySQL Query Browser is treated, at best, as a second-class citizen in the MySQL world. Is that the case? If so, is it simply due to a lack of qualified developers for it, or is it part of a larger strategy to keep more resources working on the back-end?
In my opinion, MySQL could benefit greatly from having some really great (or at least passable!) client-side tools.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Does it show the execution path of the query so I can optimize it? Can I use it to generate a printable schema of the database tables? Will it help me do a export of a database (including schema) into a new database on the same, or a different, server without touching any SQL? If so, does it then let me schedule that to run at 3:00 AM every third Tuesday? Does it handle all kinds of collations/character se
Solid-State Storage (Score:5, Interesting)
It strikes me that a lot of the work that has gone into optimizing databases in the past (especially storage, index structure, and buffer management) works on the assumption that the database will be stored to a hard drive, which is way slower than main memory and has variable access times depending on the relative position of the disk head and the required data.
Nowadays there's a lot of large solid-state flash drives coming out, and as time goes on we can expect to see sizes increase and costs decrease. For small-to-medium size databases, it's now reasonable to keep the whole database on, say, one of the new 64GB memory drives [slashdot.org]. The use of drives which have a fixed, cheap cost for random access seems to invalidate and simplify a lot of the assumptions made about conventional back-end data storage, and opens up possibilities for new types of optimization (binary tree indexes instead of B+ trees, more use of indirection).
I'm wondering what you see as some of the biggest opportunities for memory-resident databases, and what work is going into MySQL to take advantage of the changes that are happening in storage.
Mod parent up -- interesting! (Score:2)
Columnar Database (Vertica) (Score:2)
how do you feel about other free databases? (Score:5, Interesting)
Hardware (Score:2)
Integrated Auditing (Score:2)
I've implemented various solutions, usually consisting of copying the row into another table, slapping some sort of version id on it, and the updating the row with new values.
When a new column is added to a table you typically have to add one to your auditing table. Then there is the concept of who made the change. I've implemented a solution using triggers and generic table to hold the chang
Dynamic RDBMS? (Score:2)
I'm wondering if you've considered the idea of "dynamic" RDBMS for rapid prototyping or rapid app development?
Column types would be optional, and new columns and tables could be added willy-nilly by a regular INSERT or UPDATE statement. There would be no (default) distinction between non-existent columns/tables and empty columns/tables.
One could later and incrementally add validation to enforce types or existence to selected tables or columns. In other words, the "lock-down" could be gradual as the project
Re: (Score:2)
The whole point of a database is that it safely manages data. It's not any good to have a heap of bits when what they represent doesn't match reality.
With this model you'll end up with tables and columns created due to typos in the source, misunderstanding between what is the datatype for a column supposed to be. Is column called "item" a boolean (the row's type is "item"), or is it an integer (item number), or is it a varchar (item code), etc?
Lockdown later won't work well, because at lockdown time yo
Re: (Score:2)
Re: (Score:2)
It's pointless to store things that look like facts but aren't. If there's no such thing in the system as a product that costs -$5, a customer with no name, or an order row floating around in the void unrelated to any company, then it mustn't be possible to store such a thing in the first place.
Re: (Score:2)
Besides, RDBMS should probably not be your primary validation tool anyhow; for their error messages are too cryptic and too divorced from the app's perspective. And there are ways to write nightly batch reports that point out accounts with suspicious info.
I actually disagree with you here. The database should be your primary validation tool, and the application only does secondary checking. The reason is that this is the best way to remove invalid data bugs from an application later on. Think about it this way, DQL DDL gives you the ability to define data storage and presentation formats in ways which allow for powerful checking. Applications should trap the errors and at least inform users that some data was not of an acceptable format. Of course, at
Re: (Score:3, Insightful)
A question about data models. (Score:2)
For example:
What is the best way to set up your data model to deal with recurring schedules? How do you store the schedule for something that needs to be performed every other tuesday after 10:00 AM but before 5:00 PM at location X. How to you generate the individual events. How do you deal with someb
The Future of DBMSs: Specialization and Objects (Score:2)
Language and OS Integration (Score:3, Interesting)
Do you think these trends will continue and we will see even greater integration of DBMS technology into the operating system itself? Will (should?) we one day regard database like structured data storage as an indispensable OS level feature like a filesystem? If so do you worry that Apple, MS and Linux will make MySQL irrelevant by integrating this functionality into the OS? Do you think that something like SQL will remain the primary interface to this sort of structured storage or will programming languages implement an integrated native syntax for both transactional memory and database access?
Hardware Support and Transactional Memory (Score:3, Interesting)
What, no Cobalt? (Score:2)
tradeoffs between InnoDB and PG storage (Score:2)
InnoDB and Oracle both use rollback segments (I may be mistaken here), while postgresql uses non-overwriting storage and reclaims it later
Re: (Score:2)
Not sure what they did with it as of SQL Server 2008 though, maybe its default there.
Where are MySQL sequences? (Score:2, Interesting)
After all this time, why does MySQL not have sequence support?
Mod up, please. (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
But I speculate.