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
 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.