Ever wonder what the Wikipedia database schema looks like?
upload.wikimedia.org
upload.wikimedia.org
The only thing that would make the png more valuable would be some accompanying discussion: I'd like to know
who was/were mostly responsible for the design. Seems like I had searched through WP itself one time but found surprisingly little.
what refactoring lessons they encountered during the history of the project.
Much good karma to someone who can get proper credit to the database team!
A lot of interesting info can be found here: http://dammit.lt/uc/workbook2007.pdf
Its absolutely drives you nuts because everything, from business information, to server configuration, and even even the interface - menu items, buttons, page layout, links, is stored in the database. Now this may make the software less 'bug free' and thus make less trouble for Oracle, but it is an absolute nightmare for the developer because everything has to be changed through the IDE, which is basically a retarded version of a database browser without the ability to run SQL update command, and only allows you to change one row at a time, you might as well as be a monkey. Working with the database directly is apparently against the rules of Oracle and will revoke the support from Oracle.
Good thing I stopped working there @_@
There's a good reason for this. At any big company, it's much easier to change a value in a database table than it is to make a code change.
We call it "the startup".
MediaWiki is an open source project that has had thousands of man-hours poured into it.
I agree with you on this point, and so I voted you up. I disagree with the implication, though. There are two possibilities that come to mind when people encounter contradictions and exceptions in a system:
1. There is no unifying model. The exceptions are truly exceptional, and have to be dealt with as their own case apart from the main logic and rules of the system.
2. The existence of a unifying model is unknown, because no one has thought to look for it yet. Additional cases that need to be resolved are assumed to be exceptions unless it is blatantly obvious they are not, and are immediately developed as such.
Experiences I and others have had suggest that the latter case is far more likely. So I agree that the nature of business as practices is full of exceptions and contradictions, but I disagree that being so is inevitable.
http://www.malcolmhardie.com/sqleditor/
Costs $70-something I think, but has a free trial and generates the SQL to set up the tables from your diagrams.
user_password is a concatenated md5 hash of user_id, a hyphen (-), and md5 hash of current password. ie. MD5(CONCAT(user_id, "-", MD5("PASSWORD")))
The reason for this is security, obviously.
The tinyblob then, is used for convenience/efficiency; it's a good way to store a hash. They might also do some tricks on the data (ie. convert to base 64 before it's stored, or something like that), but that's the general idea.
Thanks for taking the time Ezra.
>>> issubclass(wiki, database)
True
>>>
"""Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as "the simplest online database that could possibly work"."""
The SQL is just the datastore. The wiki is the real database. Now to show that the wiki is a complex database, you would show a diagram of all the hyperlinks between pages... and the many other ways the data is linked (categories, tags etc)
Personally, what I find surprising about this whole thing is that people are so amazed at the simplicity of the schema. A wiki is a fairly simple application. Think about it. If you were going to build one it's not much more than a basic CRUD application. You really only have articles (with versioning), user accounts, images/media and whatever other oddball features you want to have like statistics and IP restrictions. Hell, I remember seeing some beginning Ruby on Rails book that used a wiki as the tutorial application. This is pretty basic stuff.
The relations(links) are like the relations in an SQL database. The relations in the wikitext are like database relations.
Much of the logic is built into the document attributes(wikitext), coded in the php layer. Mediawiki is a very big, and complex database. 1.5 million LOC. Which is fairly small compared to other databases.
Anyway... I guess my point is that mediawiki is a database, and that it's relations are not in the SQL - but in the wikitext.
see you!
I think the question would be why would this exist in their coding guidelines.
>Although tablename.tablename_columnname sounds repetitive and verbose, it might in some cases be of help when one deals with too many tables and too many keys with the same name across tables.
tablename.tablename_columnname is not likely what's being done for their queries... in many RDBMS's, you can omit the "tablename." part if columnname is unique in the DB, so it will actually reduce repitition and verbosity, even if you hate typing "_" as much as I do.
It also makes dealing with "duplicate" names easier, because there will be no dupes: you won't have any columns or keys across tables that have the same name, because the prefix will differ, and in your queries and various etceras you won't ever have to think "which 'from' is this?"
With all of this, it also eliminates the need for (other, explicit) aliases, if you're doing it right.
Or at least that's the story: some people consider this equivalent to using Hungarian notation in Python ... I'm not one of those people, for the reasons above.
After a query you can also easily identify which table the field came from.
That's my guess at least.