A SAMPLE DATABASE


Overview

Overview This RLO on a sample database is designed for a corporate training. The training is aimed on employees of several departments and offices in the United Nations. United Nations staff in Administration, Finance, Logistic and other occupations are the target audience of this course. The participants are expected to have some working knowledge on computer and general applications such as word processing and spreadsheets. This training helps the participants building a concept about database, its components and structure, creating a simple database, table, form and report. After completion of this training, the staff can be able to organize the data records in their daily works. This document is compliant with CanCore standards regarding Learning Object Metadata (LOM).

What is a database?

What is a database?

A database is a organized collection of data in a related subject.

Since you've used computer and have some knowledge of wordprocessing and spreadsheets, chances are you've already had some experience with a database. Simply put, databases are used to store and manage information. Databases are probably one of the most common uses of computers, and are available on just about every type of computer.

You probably deal with many different databases everyday without realizing it. Anytime you lookup a phone number in directory, do a transaction at the bank, pay for something with a credit card, or purchase something on the Web, you're using a database.

Databases are not specific to computers. Examples of non-computerised databases abound: phone book, dictionaries, almanacs, etc. (although in actuality these are examples of printed reports generated from databases). One classic database example is the Rolodex card file found on many desktops. It is used to store contact information for people and businesses you deal with on a regular basis. One popular feature of the Rolodex is the ability to separate your contacts alphabetically. One problem with this solution is that once you've decided to organise your Rolodex by, for example, Last Name, it's very difficult to find someone by Company Name, or First Name, or any other piece of information contained on a business card.

Electronic databases were designed to overcome this problem, and to take advantage of the enormous power available in modern computers. Computers are designed to process information using a variety of tools, or applications. Each application is designed to solve a particular task; word-processing, number crunching (spreadsheet), e-mail, and web surfing. In addition to these common tasks, computers are most often used for storing and manipulating data, the task of a database. Some databases have specialised interfaces for specific tasks, such as Accounting, CRM (Customer Resource Management), Inventory Control, Order Entry, etc. It's safe to say that just about every business has at least one use for a database application.


Database Examples

Database Examples

We can see many databases in our daily lives.

Some examples of databases:

  • Purchases from the supermarket
  • Purchases using a credit card
  • Booking a holiday at the travel agents
  • Using the local library
  • Taking out insurance
  • Renting a video
  • Using the Internet
  • Studying at university

The list can grow long.


Database Development Environment (Database Management System)

Database Development Environment (Database Management System)

While a database is simply the structured collection of data (usually handled by a database engine), applications that utilise information contained in databases are typically created with a database development environment. These development tools are unlike traditional programming environments in that they provide tools to create applications that allow users to manage data easily, without having to deal with the low-level details normally associated with traditional programming (such as memory management, etc.) Instead, database development environments typically have tools for creating forms using a form editor, some kind of scripting environment or specialised high-level language for controlling the interface and access to the database engine, and other high-level tools specifically designed for manipulating information.

While most large databases (ORACLE, Sybase, etc) are only database engines, they are commonly accessed from a separate "client" application via a special database access language. Integrated database development environments usually contain their own (often proprietary) database engine, making the creation of self-contained applications much easier. However, if a database application requires access to an external database engine using a database access language (such as SQL or ODBC), then this is also possible.


Relational Database

Relational Database

When talking about databases, the term "relational" is often heard. This is used to describe database engines that are able to work with more than group (or table) of information at the same time. This allows for much efficiency when dealing with most types of data. For example, in the above Rolodex example, say that more than one person worked at the same Company. If the company address changed, each card (or record) in the People file (table) would have to be changed. With a relational database, a second table which contained just Company information (one company per record) would be created, and each person would link (or relate to) a single company. When a field in the Company record changes, the new data is immediately available to any related Contact records.

Examples of such database development environments are Microsoft Access, SQL Server and oracle. These tools allow the creation of sophisticated commercial level applications with custom interfaces, and complex reports; the main difference is the ease in which solutions can be created, and scaled as your needs grow.


Understanding Tables, Fields, and Records

Understanding Tables, Fields, and Records

In a database, data is organised and stored in data structures known as tables. A table contains information about one thing. For example, a contacts table would store information about contacts, and only about contacts.

The data stored in a table is divided and structured into attributes that comprise the thing for which the table is storing data. For example, a contacts table would need to store at least the following attributes of a contact: First name, Last name, Address, Zip Code. In the resulting data structure, the term "field" is used in place of "attribute".

One way of visualizing the data stored in a table is to think of a spreadsheet, since a spreadsheet presents data in a tabular format comprised of columns and rows. In this case, the spreadsheet is the equivalent of a table, and the columns are the attributes or fields.

In a table, or a spreadsheet, each row contains the set of data for all attributes/fields for one instance of the thing for which the table is storing data. For example, in a contacts table, a row would be the set of data attributes for one contact- the contact_s First name, Last name, Address etc. The set of attributes for one instance of the thing for which the table is storing data, is known as a record.

So in a database we have records of data, comprised of fields, stored in tables. Records are written to disk for permanent storage.


A database sample

A database sample

Following is a database of employees working for the UN in Kosovo. There are two tables - one is STAFF that contains data specific to staff and another is DEPARTMENTS that stores data related to departments. These tables are related.

The table STAFF has a column(field) called Department that links the records in STAFF to DEPARTMENTS. Similarly, DEPARTMENTS has a column called Chief_ID that links records with the STAFF table.


Primary and Foreign Key

Primary and Foreign Key

The power of a relational database system such as Microsoft Access comes from its ability to quickly find and bring together information stored in separate tables using queries, forms, and reports. In order to do this, each table should include a field or set of fields that uniquely identifies each record stored in the table. This information is called the primary key of the table. Once you designate a primary key for a table, the DBMS will prevent any duplicate or Null values from being entered in the primary key fields.

IDNumber in STAFF and Department in DEPARTMENTS are the primary key fields.

Foreign Key: One or more table fields (columns) that refer to the primary key field or fields in another table are known as Foreign Keys. A foreign key indicates how the tables are related.

The field Departments in STAFF and Chief_ID in DEPARTMENTS are the foreign keys.


Creating a Database in Microsoft Access

Creating a Database in Microsoft Access

Microsoft Access provides two methods to create an Access database. You can use a Database Wizard to create in one operation the required tables, forms, and reports for the type of database you choose - this is the easiest way to start creating your database. Or you can create a blank database and then add the tables, forms, reports, and other objects later - this is the most flexible method, but it requires you to define each database element separately. Either way, you can modify and extend your database at any time after it has been created.

Create a database by using a Database Wizard:

  • Click New on the toolbar.
  • In the New File task pane, under New from template, click General templates.
  • On the Databases tab, click the icon for the kind of database you want to create, and then
  • click OK.
  • In the File New Database dialog box, specify a name and location for the database, and then
  • click Create.
  • Follow the instructions in the Database Wizard.

Note: You can't use the Database Wizard to add new tables, forms, or reports to an existing database.

Create a database without using a Database Wizard

  • Click New on the toolbar.
  • In the New File task pane, under New, click Blank Database.
  • In the File New Database dialog box, specify a name and location for the database, and then click Create.

The Database window appears, and you can create the objects that you want in your database.


Create a table (Microsoft Access)

Create a table (Microsoft Access)

Create a table by using the Table Wizard:

  • Press F11 to switch to the Database window.
  • Click Tables under Objects, and then click New on the Database window toolbar.
  • Double-click Table Wizard.
  • Follow the directions in the Table Wizard dialog boxes.

Create a table in Design view:

  • Click Tables under Objects, and then click New on the Database window toolbar.
  • Double-click Design View.
  • Define each of the fields in your table.
  • Click in the Field Name column and type a unique name for the field.
  • In the Data Type column, keep the default (Text); or click in the Data Type column, click the arrow, and select the data type you want.
  • In the Description column, type a description of the information this field will contain. This description is displayed on the status bar when adding data to the field and is included in the Object Definition of the table. The description is optional.
  • Define a primary key field before saving your table. Select the field or fields you want to define as the primary key. To select one field, click the row selector for the desired field. To select multiple fields, hold down the CTRL key and then click the row selector for each field. Click Primary Key on the toolbar.
  • When you are ready to save your table, click Save on the toolbar, and then type a unique name for the table.


Creating a Form (Microsoft Access)

Creating a Form (Microsoft Access)

A form is a type of a database object that is primarily used to enter or display data in a database.

  • In the Database window, click Forms under Objects.
  • Double click 'Create form by using wizard'.
  • Under Tables/Queries, select the table or query that includes the data you want to base your form on.
  • Under Available Fields, select the fields you want to display in the form.
  • Click on Next button.
  • Select a layout that would you like for your form and click on Next button.
  • Select a style that you would like and click Next button.
  • Type a name you want for your form and click Finish buttion.

Create a form Using Design View:

You create a basic form and customize it in Design view to suit your requirements.

  • In the Database window, click Forms under Objects.
  • Click the New button on the Database window toolbar.
  • In the New Form dialog box, click Design View.
  • Click the name of the table or other record source that includes the data you want to base your form on. If you want to create a form that uses data from more than one table, base your form on a query.
  • Click OK. Microsoft Access displays the form in Design view.
  • Add fields and design your form and Save it.


Creating a Report (Microsoft Access)

Creating a Report (Microsoft Access)

A report is a type of a database object that is primarily used to display data in a database.

Using Report Wizard:

  • In the Database window, click Reports under Objects.
  • Double click 'Create Report by using wizard'
  • Under Tables/Queries, select the table or query that includes the data you want to display in the report.
  • Under Available Fields, select the fields you want to display in the report.
  • Click on Next button.
  • Select a field if you would like to add any grouping levels(eg. Department) and click on Next button.
  • Select one more fields if you would like to sort the report by and click Next button.
  • Select a layout and page orientation for your report and click Next button.
  • Select a style that you would like and click Next button.
  • Type a name you want for your report and click Finish buttion.


Quiz

Quiz

End User Training:

Questions:

  • What are the examples of non-computerised databases?
  • What is a database?
  • How do you describe the term relational?
  • Give some examples of the relational database development environment.
  • What is a table?
  • Define fields and records.
  • What is a primary key?
  • What is a form?
  • What is a report?

Answers:

  • Phone book, dictionaries, almanacs, etc. are examples of non-computerised databases.
  • A database is simply the structured collection of data.
  • The term 'relational' is used to describe database engines that are able to work with more than group (or table) of information at the same time.
  • Examples of relational database development environments are Microsoft Access, SQL Server and oracle.
  • In a database, data is organised and stored in data structures known as tables.
  • The data stored in a table is divided and structured into attributes that comprise the thing for which the table is storing data. These attributes are known as fields. Each row contains the set of data for all attributes/fields for one instance of the thing for which the table is storing data. These rows are known as records.
  • A table should include a field or set of fields that uniquely identifies each record stored in the table. This information is called the primary key of the table.
  • A form is a type of a database object that is primarily used to enter or display data in a database.
  • A report is a type of a database object that is primarily used to display data in a database.


About Reusable Learning Objects (RLOs)

About Reusable Learning Objects (RLOs)

Introduction:

This learning module is compliant with CanCore standards regarding Learning Object Metadata (LOM). CanCore is a set of best practices for interpreting and implementing IEEE LOM standards. The CanCore initiative has been coordinated by Athabasca University and funded by Industry Canada/CANARIE, Alberta Learning, Netera Alliance, TeleCampus.edu, and the Electronic Text Centre at the University of New Brunswick. CanCore is used throughout the U.S., Canada, U.K. and France. Some examples include Athabasca University (http://adlibx.athabascau.ca/ADLib/LOR/args0/ADLib/args1/Home/?text=about), BC Campus (http://www.bccampus.ca), CELTS (China), Desire2Learn (http://www.desire2learn.com), Eisenhower National Clearinghouse (http://www.enc.org/), Canadian Treasury Board, National Science Digital Library (http://www.nsdl.org/), and UK LOM Core (http://www.cetis.ac.uk/profiles/uklomcore/).

Meta data refers to information that describes the characteristics of the learning object. IEEE (p1484) identifies the following LOM categories: General, Life Cycle, Meta-Meta Data, Educational, Technical, Rights, Relation, Annotation and Classification. The IEEE standard does not define how a learning technology system will represent metadata. The purpose of the standard is to facilitate interoperability. By providing a common taxonomy, users can more easily search, evaluate, acquire, catalog, inventory and use learning objects across organizations and cultures. Learning technology systems should be able to automate this process. A sample of metadata, implemented using the CanCore LOM standard, is illustrated in the Metadata section of this document. (The underlying XML of this metadata can be found in RLO.XML). For a detailed description of the CanCore standard, complete with definitions and examples, see http://www.cancore.ca/en/dynamic/.

A Reusable Learning Object (RLO) is an entity, digital or non-digital, that may be used and reused for educational purposes. RLO's (also known as lessons) are viewed as data structures made up of smaller objects called Reusable Information Objects (RIO's, also known as topics). These RIO's may be reassembled as desired to provide customized RLO's. The following is a sample hierarchy developed by Cisco for the Canadian Navy RLO project:

  • Curriculum
  • Unit
  • Module
  • Lesson (RLO)
  • Topic (RIO)

The document you are currently reading (i.e. entitled A Sample Database) has been implemented as an RLO, and each of the topics (including this topic of About Reusable Learning Objects (RLO)) have been implemented as RIO's.

XML has been chosen as the format to store content, with DTD to enforce data structure, and XSL to define presentation format. Some of the advantages of this approach are as follows:

  • XML is an international standard, which helps protect our investment in electronic information.
  • XML is strong in describing educational metadata
  • Allows separation of content (XML) from presentation format (XSL)
  • Machine readable. Most languages and databases now offer XML support.
  • Data structure can be enforced using DTD files, including multiple DTD's per document.
  • XML is human readable and similar to HTML

RDF is another good alternative. RDF represents data using a directed graph structure, whereas XML represents data using a tree structure. Just as a tree strcture is one possible configuration of a directed graph, XML is one possible syntax of RDF.

Design:

This learning module contains the following files:

  • RLO.XML: Used to store actual content
  • RLO.XSL: Used to define the format of the final presentation
  • RLO_Content.XSL: Used to define the format of the content page
  • RLO.DTD: Used to ensure the validity of the content of the RLO.XML file

When RLO.XML, RLO.XSL, RLO_Content.XSL and RLO.DTD are placed in the same directory as BuildHTML.BAT and BuildHTML.BAT is executed, the final presentation in HTML format is created. Contents.HTML is the table of contents and RLO.HTML is the learning material itself. There is also a subdirectory called Images which contains all of the GIF files to which the hyperlinks in RLO.HTML point.

In RLO.XML, educational content is organized using the following tags:

  • RLO: Root tag for the entire learning module
  • TITLE: The title of this learning module
  • OVERVIEW: An overview of the entire learning module
  • RIO: A topic or lesson. There may be many RIO's within an RLO.
  • SECT: A major section within an RIO
  • PARA: A paragraph within an RIO.
  • TEXT: A text paragraph within a PARA.
  • LIST and ITEM: A list of items within a PARA, either numbered or bulleted.
  • IMAGE: A picture as a part of a RIO. Images are saved under Image folder.
  • SUMMARY: A summary of what was covered in the learning module.
  • METADATA: The metadata for this learning module (CanCore compliant).

This design approach helps to organize content, so that it may easily be referenced or reused, while still providing curriculum designers the flexibility to organize it as they wish. Material may be reorganized or combined with other material by simply copying and pasting "RIO" sections of text from one XML document to another. The XSL file does all the work of modifying the presentation format.

The RLO.XSL file is the design template for the final HTML presentation. As long as the XML file follows the above structure, a single XSL file will work on all XML files, regardless of their content. Thus, there is no hard-coding of content into the XSL file. All references to content are dynamic, not static. This allows users to enforce a common look and feel for all presentation materials, without having to change each individual module.


Summary

Summary

Database Concepts:

A database is a organized collection of data in a related subject.Anytime you lookup a phone number in directory, do a transaction at the bank, pay for something with a credit card, or purchase something on the Web, you're using a database. Databases are not specific to computers. Examples of non-computerised databases abound: phone book, dictionaries, almanacs, etc. Electronic databases were designed to overcome the sorting, filtering and other data management problems in manual databases, and to take advantage of the enormous power available in modern computers. Some examples of databases are: purchases from the supermarket, purchases using a credit card, booking a holiday at the travel agents, using the local library, taking out insurance, renting a video, using the Internet, studying at university, etc.

The applications that utilise information contained in databases are typically created with a database development environment. Database development environments typically have tools for creating forms using a form editor, some kind of scripting environment or specialised high-level language for controlling the interface and access to the database engine, and other high-level tools specifically designed for manipulating information.

The term 'relational' is used to describe database engines that are able to work with more than group (or table) of information at the same time. This allows for much efficiency when dealing with most types of data. Examples of such database development environments are Microsoft Access, SQL Server and oracle. These tools allow the creation of sophisticated commercial level applications with custom interfaces, and complex reports.

Table, Record and Field:

In a database, data is organised and stored in data structures known as tables. A table contains information about one thing. For example, a contacts table would store information about contacts, and only about contacts.

The data stored in a table is divided and structured into attributes that comprise the thing for which the table is storing data. For example, a contacts table would need to store at least the following attributes of a contact: First name, Last name, Address, Zip Code. In the resulting data structure, the term "field" is used in place of "attribute".

In a table, each row contains the set of data for all attributes/fields for one instance of the thing for which the table is storing data. For example, in a contacts table, a row would be the set of data attributes for one contact: the contact's First name, Last name, Address etc. The set of attributes for one instance of the thing for which the table is storing data, is known as a record.

So in a database we have records of data, comprised of fields, stored in tables. Records are written to disk for permanent storage.

Primary and Secondary Key:

The power of a relational database system such as Microsoft Access comes from its ability to quickly find and bring together information stored in sePARAGRAPHte tables using queries, forms, and reports. In order to do this, each table should include a field or set of fields that uniquely identifies each record stored in the table. This information is called the primary key of the table. Once you designate a primary key for a table, the DBMS will prevent any duplicate or Null values from being entered in the primary key fields.

One or more table fields (columns) that refer to the primary key field or fields in another table are known as Foreign Keys. A foreign key indicates how the tables are related.

Creating a Database, Table, Form, Report in Microsoft Access:

Microsoft Access provides two methods to create an Access database. You can use a Database Wizard to create in one operation the required tables, forms, and reports for the type of database you choose: this is the easiest way to start creating your database. Or you can create a blank database and then add the tables, forms, reports, and other objects later: this is the most flexible method, but it requires you to define each database element separately. Either way, you can modify and extend your database at any time after it has been created.

Similarly, we can create tables, forms and reports in Microsoft Access by either using the wizards or designing ourselves.

About Reusable Learning Objects (RLO):

This learning module is compliant with CanCore standards regarding Learning Object Metadata (LOM). CanCore is a set of best practices for interpreting and implementing IEEE LOM standards. A Reusable Learning Object (RLO) is an entity that may be reused for educational purposes. RLO's (or lessons) are made up of smaller objects called Reusable Information Objects (RIO's, or topics). These RIO's may be reassembled to provide customized learning content. e.g.: Curriculum, Unit, Module, Lesson (RLO), Topic (RIO).

This document uses XML as metadata format, with DTD to enforce data structure, and XSL to define presentation format. Advantages include international standardization, strength in describing educational metadata, separation of content from presentation format, machine readability, enforcement of structure, and human readability of XML. RDF is another strong alternative. The IEEE standard defines a conceptual data schema for learning metadata, although it does not define how a learning technology system will represent metadata. The purpose is to facilitate interoperability by providing a common taxonomy. Cancore provides guidance in interpreting and implementing these standards. The metadata associated with this document is contained within a "Metadata" tag in the RLO.XML file.


Metadata
Metadata

    General:

    Last Modified:

      2005-07-29

    Title:

      A Sample Database

    Language:

      en

    Description:

      This RLO on a sample database is designed for a corporate training. It contains basic concepts about database and its components and starting knowledge on using the Microsoft Access to create database and its different objects such as tables, forms and reports.

    Structure:

    • Source: LOMv1.0
    • Value: Hierarchical

    Aggregation Level:

    • Source: LOMv1.0
    • Value: 3

    Key Words:

    • A sample database
    • Database, records, fields
    • Tables, forms, reports

    Meta Meta Data:

    Meta Meta Data Identifier:

    • Catalog: SeeWithin
    • Entry: local source

    Contributor Role:

    • Source: LOMv1.0
    • Value: creator

    Contributor Entity:

      BEGIN:VCARD VERSION:1.0 N:Kattel; D.; FN:D. Kattel ORG:United Nations Mission in Kosovo END:VCARD

    Contribution Date:

      2005-07-29

    Meta Data Schema:

    • LOMv1.0
    • CanCore v.2.0

    Meta Data Language:

    • en

    Technical:

    Technical:

    • Format: text/html
    • Location: http://intranet.unmik.dpko.un.org/etraining/RLO.html

    Educational:

    Learning Resource Type:

    • Source: LOMv1.0
    • Value: narrative text

    Intended End User Role:

    • Source: LOMv1.0
    • Value: teacher

    Educational Context::

    • Source: LOMv1.0
    • Value: Corporate Training

    Typical Age Range:

    • Adult

    Rights:

    Rights Cost:

    • Source: LOMv1.0
    • Value: no

    Copyright And Other Restrictions:

    • Source: LOMv1.0
    • Value: yes

    Rights Description:

    • Only for use within United Nations Organization.

    Relation:

    Kind of Relation:

    • Source: LOMv1.0
    • Value: ispartof

    Relation Resource:

    • RLO.html

    Classification:

    Classification Purpose:

    • Source: LOMv1.0
    • Value: discipline

    Taxon Path source:

    • DDC

    Taxon:

    • ID: DDC
    • Entry: Information and Communications