In a recent conversation with Neil the significance of database access in ActionScript dawned on me. Whilst this feature has undoubtedly been driven by requests from those with previous experience of databases, there must be a huge amount of Flash/Flex devs who’ve never had to worry themselves with the wonderful world of DBMS’s (“Database Management Systems” or “databases” for the non anal). So I thought I’d put together a number of introductory posts on the essentials of databases.
A couple of things to note first: I have not touched databases in AIR before now, in fact despite the number of posts on Apollo, i’ve not touched Apollo/AIR in any decent capacity before now (purely due to the rare commodity of time). However, I am pretty well versed in other common databases namely MS SQL Server, MySQL, Oracle and of course, Access (barf).
Another thing to note is: to all you guys who spend all day every day creating amazing, interactive, fun and flashy things in Flash and Flex… databases might seem a bit dry. In fact sod that, they are dull as dishwater, paint drying and grass growth in comparison. However, if you’re planning on making some kick-ass AIR applications and don’t want to rely on webservers, server-side scripting and hard to setup and manage database servers and/or want to make use of the nice offlineyness in AIR, bear with it because it will be a very useful string to your AIR RIA (gotta love these acronyms) bow.
So what are these essentials of which I speak?
The below is a rough list of topics I’m going to cover. I’m starting from a real “assume no knowledge” level so please feel free to wait for the later articles if you’ve already some exposure to databases. I’m hoping to get these out over the next few days but if you have any comments, questions or suggestions please fire away and i’ll try to include as much as i can. I’m going to be creating plenty of simple examples using Flex3 (although this is already proving troublesome as my poor old laptop can’t hack it – but i’ll sort something out). Anyway, on with the planned topic list.
- What is a database? – duh! Okay to put it a better way, how do databases in AIR compare to other databases that I’ve heard of?
- What’s in a database (an AIR database) – Tables, Views, Triggers, Indexes
- SQL – The mother tongue of nearly any database you’re likely to use.
- Normalisation – ugh! initially this wont seem important and certainly not interesting. As soon as you want to start doing more advanced databasey stuff – you have to get this.
- Database best practice – this is yet to be defined in the AIR world, however there are many databases in application best practices we can draw from other languages and databases to get us started.
As mentioned, if you think there’s anything unclear or you think I’ve missed let me know and I’ll try to cover it. First topic coming up shortly…