23 Mar 2010 @ 12:14 AM 

Today I came across what I predict will be the next big paradigm shift in the world of database design. This brilliant work I stumbled upon has been created by 4 students at the Koninklijk Atheneum of Sint-Niklaas, an innovative institute devoted to developing bleeding edge technologies. It is a completely new way of structuring MySQL database tables, the next epoch in design if you will.

Before we have a look at the code, let’s first consider the strong points of this new way of structuring database tables.

Benefits:

  • It does away with all the confusing field type’s – just use INT’s for ID’s, and text for all the rest.
  • Create only one table, which then holds all your data. This can be done by creating fields such as peopleWith1pc, peopleWith2pcs, peopleWith3pcs, ect. Brilliant no?
  • To make it even more easy, it also does away with any sort of naming convention, after all, it’s only confusing!

Let’s have a look at a simple example where the new pattern is applied to a database in which survey results are stored. The table stores ‘answers’ of people who took the survey. The field names are in Dutch, but this should not prevent you from deducing the overall awesomeness.

Code:

CREATE TABLE IF NOT EXISTS `antwoorden` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `geslacht` text NOT NULL,
  `studeren` text NOT NULL,
  `geboorteJaar` INT(4) NOT NULL DEFAULT '0',
  `gsm` text NOT NULL,
  `prijsGsmToestel` text,
  `herlaadmanier` text,
  `provider` text,
  `bedragPerMaan` text,
  `smsPerDag` text,
  `belPerDag` text,
  `mp3` text NOT NULL,
  `prijsMp3` text,
  `gebruikMp3` text,
  `pc` text NOT NULL,
  `aantalPc1` text,
  `aantalPc2` text,
  `aantalPc3` text,
  `aantalPc4` text,
  `aantalPc5` text,
  `aantalPc6` text,
  `aantalPc7` text,
  `aantalPc8` text,
  `aantalPc9` text,
  `aantalPc10` text,
  `prijsPc` text,
  `pcWerk` text,
  `pcSchool` text,
  `pcGamen` text,
  `pcFilm` text,
  `pcComm` text,
  `pcSociaal` text,
  `pcMuziek` text,
  `pcAndere` text,
  `pcGebruik` text,
  `pcProvider` text,
  `pc2000` text,
  `pcXp` text,
  `pcVista` text,
  `pc7` text,
  `pcLeo` text,
  `pcSnowLeo` text,
  `pcLinux` text,
  `pcUnix` text,
  `pcAndereBest` text,
  `pda` text NOT NULL,
  `prijsPda` text,
  `pdaWerk` text,
  `pdaSchool` text,
  `pdaGamen` text,
  `pdaAndere` text,
  `pdaGebruik` text,
  `pdaProvider` text,
  `tv` text NOT NULL,
  `tvGebruik` text,
  `tvProvider` text,
  `gamen` text NOT NULL,
  `play1` text,
  `play2` text,
  `play3` text,
  `xbox` text,
  `xbox360` text,
  `psp` text,
  `pspGo` text,
  `gameCube` text,
  `wii` text,
  `ds` text,
  `gameAndere` text,
  `consoleAantal` text,
  `prijsGames` text,
  `digiFoto` text,
  `filmCamera` text,
  `extHD` text,
  `memStick` text,
  `videoRec` text,
  `dvdSpelRec` text,
  `bluRay` text,
  `dlToetsMuis` text,
  `gameToeb` text,
  `surround` text,
  `printer` text,
  `webcam` text,
  `scanner` text,
  `enqueteLeuk` text NOT NULL,
  PRIMARY KEY  (`id`)
)

References:

Posted By: Jeroen De Dauw
Last Edit: 23 Mar 2010 @ 12:18 AM

EmailPermalinkComments (1)
Tags
 23 Feb 2010 @ 10:24 PM 

Two weekends back, me and two friends went to the cinema in Sint Niklaas, a city in East Flanders, Belgium. Some lol’ed stuff happened though:

As usual, we bought our tickets at one of the ticket machines at the entrance. To be more precise, our favourite machine, which, as all others there, runs on Windows XP (win!), but is a little more bugged, since it allows you to get rid of the reservation application in several ways. For some reason we got blank tickets, with nothing printed on them :o We tried to go to the room where the film we wanted to see (The Book of Eli) was played, but did not get access, since they first had to check the misbehaving machine. In the meanwhile, two other people had bought a ticket at that machine, but didn’t get anything out of it at all. After 5 mins of waiting they came to fix up the machine by resetting some stuff, and we could finally go and see the movie we came for. It’s so typical this happens to use, and we have to wait there for 5 mins!

You have absolutely no reason to think I somehow managed to get free tickets from the machine, and then mess it up, so we could go watch the film for free. Therefore the title of this blog post is obviously highly misleading.

Lol'ed ticket machine

The Book of Eli

Posted By: Jeroen De Dauw
Last Edit: 23 Feb 2010 @ 10:24 PM

EmailPermalinkComments (0)
Tags
Tags: , , , , , ,
Categories: Fail
 22 Jun 2009 @ 1:23 AM 

Yesterday I got back my result of my last year of school in secondary education. I passed (yay!), and so did the rest of my class (congrats to all). This means I don’t have to learn the ridiculously restarted crap I had to study any more, and can focus on things relevant in a post-stone-age world. Of course, I’m entirely grateful for all the training I got, cause now I’m prepared for getting thrown back into time through some gap in the space-time-continuum :)

After doing a lot of searching for a school with a good course, I decided to go study Industrial Engineer Informatics at the University of Gent. Although I know most of the programming study material for the first two years, I’ll also get electronics, physics and chemistry.

Note: I re-posted this after my blog DB got lost, and only posted part of the original message.

Posted By: Jeroen De Dauw
Last Edit: 26 Aug 2009 @ 09:49 AM

EmailPermalinkComments (1)
Tags

 Last 50 Posts
 Back
Change Theme...
  • Users » 4740
  • Posts/Pages » 197
  • Comments » 156
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.