Tuesday 17 November 2009

Session 7: relational databases

INM348 - Digital Information Technologies and Architectures
 
Databases are an efficient way for organisations to store data in a central repository so that it can be used by a variety of applications and users. The relational database stores this data in a set of tables, linked by 'keys', which can then be manipulated and interrogated by database management software (DBMS).

The database approach removes the need for different teams to store similar sets of data about the same things - client data, for example. Using a central database means the data can be managed and updated consistently, saving time and money.

Many relational databases use structured query language (SQL) to manage the DBMS. SQL uses standard commands to create database tables and we interrogate them using 'queries' to get the information we need.

An example: my company employs a team of account managers to manage long-term contracts with large public sector clients. We don't have a structured way to manage this information, so contact with our clients is often inconsistent. A simple relational database could help us match account managers to major clients, and record the services we provide to them.

So we could set up two tables. Our 'account_managers' table gives each Account Manager an ID number ('am_id'), which is the primary key for this table (Table 1 below).

Table 1. Account managers
am_id
name
job_title
email
location
01
Jim Boardman
Technical Director (Rail)
jb@mp.com
Manchester
02
Kate Robinson
Head of Business Development, (Energy)
kr@mp.com
London
03
Iqbal Shah
Commercial Director (Government Services)
iqs@mp.com
Woking
04
Jeena Keeth
Development Director (Education)
jk@mp.com
Woking
05
Bob Sabberton
Business Development Manager (Utilities)
bbs@mp.com
Liverpool

The primary key from the account_managers table is used as the 'foreign key' in the 'clients table' to identify which account manager handles each client (Table 2 below):

Table 2. Clients
client_id
client_name
account_manager
NWR
Network Rail
01
HWY
Highways Agency
02
HCC
Hertforshire County Council
03
OCC
Oxfordshire County Council
03
ISA
Islington Technical Academy
04
SCW
Scottish Water
05
THW
Thames Water
05

To get a list of which account managers handle which clients, we can use this query:

SELECT client.client_name, account_managers.am_id, account_managers.name, account_managers.job title, account_managers_location FROM clients, account managers WHERE account_manager = am_id;
Fig 5. Example query from database tables. 

The result can help us judge whether the right people in our company are managing the right clients, and we can adjust our business strategy accordingly.

Word count, excluding figures, tables and captions: 283 words.

Monday 16 November 2009

Session 6: CSS

INM348 - Digital Information Technologies and Architectures
 
Cascading Style Sheets (CSS) are a means of communicating the visual and aesthetic elements of web pages in an effective way. The first CSS specifications were introduced by the World Wide Web Consortium (W3C) in December 1996. Previously, all presentational elements for web pages had to be included in the HTML, often repeatedly, making web code unwieldy and complex.

The combination of CSS and HTML is generally thought to be an elegant solution. You can specify all your layout rules for a group of web pages in a single place - a cascading style sheet - and simply link to them.

You can import different style sheets to the same page; the Zen Garden web site shows how you can use style sheets to give a different appearance to a website without disturbing the content [URL: http://www.csszengarden.com/]. You can import several different style sheets if necessary, for example to aid accessibility for visually-impaired users.

You can use the rules in your CSS to apply layout to the parts of the page you want, such as specifying a font or colour for a heading or paragraph text. You can use the 'class' command to add different styles to the same tag. And you can use 'positioning' to arrange your elements on the web page interesting way, without having to use tables.

As a demonstration, I have set up a simple style sheet for my public web page [URL: http://www.student.city.ac.uk/~abhd820/index.html]. You can see the CSS here: http://www.student.city.ac.uk/~abhd820/paulspage.css.

While most agree that the separation of content from presentation that CSS embodies is a good thing, there are some limitations. For example, different types of browsers tend to interpret CSS inconsistently; and some commentators feel that CSS specifications still lack flexibility - the wikipedia page for CSS summarises these concerns under 'Limitations of CSS'. [URL: http://en.wikipedia.org/wiki/Cascading_Style_Sheets]

Word count: 300 words.

Session 5: XML

INM348 - Digital Information Technologies and Architectures

Back in session 3 we looked at HTML as a way of presenting our text and images on a web page using tags. XML - eXtensible Markup Language - uses tags too. However, XML is designed to allow people to harness the power of the web to manage and interrogate data in efficient but sophisticated ways.

XML is a tool that enables people to create languages to manage and transport their data. For me, although XML has strict rules governing the syntax and grammar of the languages that are created, it can still help me, in my role as a corporate information manager, to manage the vast amounts of corporate information that my colleagues need to carry out their jobs more effectively.

One such example relates to the mountain of Health & Safety information my company is legally obliged to keep. I could use an XML language to order a library of documentation we now have, according to:
  • what the document is (ie title and abstract of content)
  • whether it is a policy, a process or a form
  • which corporate entities it applies to (main company, joint ventures etc)
  • who is ultimately responsible for it - our chief executive, our health and safety director or our business unit heads
  • when it was last updated
The DTD is shown in Fig 1. You can see the DTD and examples of the XML code on my personal webspace: http://www.student.city.ac.uk/~abhd820/H&S-library.xml.
<!ELEMENT HSlibrary (HS-doc)*>
<!ELEMENT HS-doc (doctitle, doctype, applicableto, approvedby, lastupdated, link, abstract)*>
<!ELEMENT doctitle (#PCDATA)>
<!ELEMENT link (#PCDATA)>
<!ELEMENT lastupdated (#PCDATA)>
<!ELEMENT abstract (#PCDATA)>
<!ATTLIST HS-doc doctype (Policy|Process|Form) #REQUIRED>
<!ATTLIST HS-doc applicableto (all_Mouchel|Liverpool2020|EnterpriseMouchel|Impact_Partnership) #REQUIRED>
<!ATTLIST HS-doc approvedby (Mouchel_CEO|HS_Director|BU_Head) #REQUIRED>
Fig 4. Health and Safety library DTD

By writing it in XML, we could publish it on our corporate intranet, but also exchange it with joint venture companies who may need to combine it with other information and publish it on their intranets.

Word count, excluding figures and captions: 278 words.

Saturday 14 November 2009

Session 4: images

INM348 - Digital Information Technologies and Architectures
 
Most of the things we see on a computer screen – words, numbers and pictures - are presented to us by software as images. These are presented to us digitally using either a raster model – which divides space into a rectangular grid – or a vector model, which represents areas of space as co-ordinates on an axis.

Both techniques can represent pictures via a browser. I can use html tags such as  <img> to make my web page appealing [URL: http://www.student.city.ac.uk/~abhd820/index.html] or use the  <a href>  tags to link to an image held elsewhere, as below:



Fig 3. World map. Image source: Web Resources Depot (free vector maps page).
[URL: http://www.webresourcesdepot.com/free-vector-world-maps-collection/]


Most software formats used for images on web pages - Graphics Interchange Format (.gif), JPEG (.jpg) and Portable Network Graphics (.png) - use raster techniques, and employ some compression to reduce the size of images.

GIF [URL: http://en.wikipedia.org/wiki/Graphics_Interchange_Format] is an 8-bit format, enabling up to 256 colours to be used. Each image keeps colour information in a separate ‘lookup table’ which helps keep file size down.

JPEG [URL: http://en.wikipedia.org/wiki/JPEG] is a 24-bit format, which enables it to display many colours. JPEGs maximize compression which make them great for using on the web. However, the ‘lossy’ compression techniques used by the format often leave ‘artefacts’, which can be noticeable in images with large areas of a single colour (the GIF format is better for this type of image). The degradation is often less noticeable in photographs, which contain many different colours.

PNG [URL: http://en.wikipedia.org/wiki/Portable_Network_Graphics] is a 24-bit format that uses ‘lossless’ compression to avoid this degradation. The compression is not as great as with JPEG files, so file sizes are often bigger.

These image formats give me flexibility when working as a corporate information officer. I can use jpg files for our website [URL: http://www.mouchel.com/services_atoz/default.aspx]  taking advantage of the better compression ratios. In contrast, for technical charts, GIF or PNG files may be a better option.

Word count (excluding figures and captions): 299 words.