Saturday, 16 October 2010

DITA Session 03 Structuring and querying information stored in databases 11-10-2010

Moving on from the principles of digital data and information stored on file servers, web servers, and hyperlinks using URLs, where the limitations of storing files in folders come with large amounts of data and information. Without some form of relationships (save the links to individual documents e.g web pages) in a filing structure, it become very easy for information across a large organisation, like a university for instance to become both out of date, and not consistent across departments. The information is duplicated, but could easily become inconsistent in both content and format. e.g. a finance department may set up one file or filing structure to store employee information, HR another where the relational data model  they could share a need for the same information for instance employee details, maintaining data integrity.

The relational Database and relational data model provides a much more robust way to store and retrieve data and information, which includes both data and documents, for example electronic journals in pdf format,  in two dimensional tables.

Traditional Data Base Management Systems"consisting of two parts: sequential files and inverted files. The sequential file is the database source, containing containing information organised records in the field-record-database structure. Called the sequential file because records are order in the sequence they take when they were entered into the database. The inverted file (or index file) provides access to the sequential file, according to given search queries. It is called the inverted file because the order in which the information is presented (I.E. access point first, locator's second) is the reverse of that in the sequential files (i.e locator's first, access point second.)" (Heting 2003)

The importance of indexing comes from the fact that records need to be identified as unique, the term primary key, refers to the unique identifier for a given record in a selected table. This then allows tables of "related" information to be linked, and records to be retrieved from more than one table to suit the needs of the user.

Planning a database structure, fields used in tables must be split into "entities". An entity refers to a 'thing' that has its own set of attributes or fields, thus each entity must represent a single thing (Butterworth Macfarlane Lecture notes 2010). Providing there is a common field in two or more tables, or the 'primary key', the user has the ability to query and return results from more than one table by matching these keys.  Relationships between the tables are defined where relationships or "joins" are made between two or more tables. The idea is to minimize redundant data, and allow records to be added, deleted or amended in one table without effecting any other. The process of ensuring the only fields that represent one entity in a table is called normalisation. Whatif.com website goes on to say "normalisation may have the effect of duplicating data within the database and often results in the creation of additional tables. While normalization tends to increase the duplication of data, it does not introduce redundancy, which is unnecessary duplication. ( http://searchsqlserver.techtarget.com/definition/normalization Accessed 17-10-2010).

Creating, updating and query relational database management system is done through queries most commonly SQL or Structured Query Language. "SQL was one of the first languages for Edgar F. Codd's relational model in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks"[5] and became the most widely used language for relational databases.[3][6] " (http://en.wikipedia.org/wiki/SQL Accessed 17-10-2010

The next post will show some SQL examples, using simple statements such as CREATE TABLE, SELECT to select specific records to display,  and use the WHERE clause to filter only the data the user is interested from 1 or more tables.


.

No comments:

Post a Comment