BUS1MIS Management Information Systems Semester 1, 2012 Access: Creating a Database Week 6 Lecture 2
In this lecture the key ideas are: A broad understanding of a relational database is important knowledge for business managers. A relational database organises data into multiple related tables. An effective relational database minimises data redundancy. Also included will be: An overview of creating a relational database in Microsoft Access 2007
At the core of a Management Information System is a database (or many databases)
Customer ID Customer Name Customer Address Customer Phone 6512JonesBendigo SinghCatlemaine NgEchuca Customer Table Field Record The key component of a database is a table.
A table stores data about some entity in the real world. For example, customers, orders, items of stock. A table has rows and columns like a spreadsheet. Each column describes an attribute of the entity. For example, customer name, customer address. An individual column in a table is called a field. Each row describes an instance of the entity. For example, a customer, an order, an item of stock. An individual row in a table is called a record.
Comparison between a database table and a spreadsheet A blank spreadsheet is an open book. You can add whatever you want in whatever structure you want. A database table has a predefined structure. Each row in the table has an identical structure.
A business manager needs the knowledge to be confident that the database underlying an important MIS has been correctly designed by the IT person responsible. If a database is not correctly designed the data may be…… poorly organised and/or incomplete and/or inaccurate and/or duplicated …. then management will receive poor quality reports and poor decisions are likely to be made.
Let’s try “simple is best” first and put all our data in the one table. See the next slide for the example to be used in the lecture What is the correct design for a database?
CJC’s Images Order Form Order #: 1927 Order Date: 12/5/09 Customer Name: Liam Customer Address: Brisbane Item # Item Name Qty Ordered 3720 Large Framed Small Unframed Small Framed 1 Let’s design a single table to store this data
Order # Order Date Cust. Name Cust. Address Item#Item Name Quantit y /5/09LiamBrisbane3720LFramed /5/09LiamBrisbane2917SUnframed /5/09LiamBrisbane1129SFramed1 Assume there are other orders as well /5/09KirstySydney1129SFramed /5/09KirstySydney1800LUFramed /5/09LiamBrisbane3720LFramed /5/09LiamBrisbane2917SUFramed /5/09LiamBrisbane1129SFramed /5/09LiamBrisbane1800LUFramed1 If Liam changes address, how many changes need to be made to the table?
Putting all our data in a single table means we have ended up with ……. Data Redundancy …. the scourge of all database design.
How do we avoid data redundancy in our database design? Most business databases use a relational database design. The database consists of multiple, related tables Any piece of data is only stored ONCE
If we apply a relational database design to the Order Form in the previous slide we would have 4 related tables. Cust Name Cust Address LiamBrisbane KirstySydney Order # Order Date Cust Name /5/09Liam /5/09Kirsty /5/09Liam Item # Item Name 1129SFramed 1800LUFramed 2917SUFramed 3720LFramed Order # Item # Quantity ……………… If Liam changes address, how many changes need to be made to the database?
To maintain the links between the tables we need … 1.A field in each table which uniquely identifies each record (called a primary key) 2.Some software to maintain the links The primary key is nearly always a number, as in a Student ID. The software to create the tables and maintain the links is known as a Database Management System (DBMS) We will be using Microsoft Access as a DBMS.