Assignment
Database Management System (DBMS)
Preamble
Dr George Martini retired in 2010 after a long, but relatively boring, career as an accountant. To keep busy and to fulfil a lifelong dream, Dr Martini started a Memorabilia mail order business, specialising in Game of Thrones Memorabilia related products called the "The Seven Kingdom Collective" and began selling various types of imported Game of Thrones merchandise such as statues, replicas, giftware, clothing and other assorted Game of Thrones paraphernalia to customers via mail order around Australia. These types of Game of Thrones merchandise have become very popular, especially since HBO TV series and Dr Martini has experienced a rapid growth in his mail orders. When Dr Martini first retired, he bought his own home computer to help manage the business's books and finances.
The Seven Kingdom Collective is located at Shop 4, 891 Kings Landing Close, Toowoomba (about 100 km west of Brisbane). Dr Martini can be contacted via phone on (07) 4637 7869; fax on (07) 4637 7860; or email on [email protected].
Dr George Martini is extremely impressed with our computing firm "Night's Watch Systems" and he has contracted our firm to assist him in setting up his various computer-based information systems. Please use our new business contact details as follows: 25 Westeros Street, Toowoomba; Phone (07) 4632 5821; fax on (07) 4632 5827; email [email protected].
The first computer-based information system that Dr Martini is interested in is a Database Management System (DBMS) utilising Microsoft Access 2007/2010/2013. The DBMS will be used to store all of the business's customer details, information about the stock items that the business sells, the suppliers that the business uses and all postal order transactions for the business. It will allow Dr Martini to run a number of queries on the data which he has specified below and he wishes to be able to print out an invoice for each customer at the end of each month.
All phases in this project must be developed with professionalism and user-friendliness in mind.
Your firm's Systems Analyst has developed a database structure that has been determined to be suitable to create a database to store Dr Martini's customer, items, supplier and postal orders data for the business, which has been provided as follows:
Table Specifications
Table:
tblCustomers
Fields: Cust ID (Primary Key), Title, Family Name, Given Names, Date of Birth, Address, City, State, Postcode, Freight Distance (Km), Mobile Number, eMail Address, Mailing List.
Table:
tblItems
Fields: Item ID (Primary Key), Type, Description, Size, Freight Weight (Kg), Supplier ID, In Stock, On Order, Cost Price (SVN) , Cost Price (BB) .
Table:
tblSuppliers
Fields: Supplier ID (Primary Key), Supplier Name, Address, City, State, Postcode, Phone Number, Recommended MarkUp
Table: tblOrders
Fields: Cust ID, Item ID, Order Date (Primary Key), Dispatch Date, Order Qty
Note: The primary key of the Orders table is a combined multiple-field key. It has three fields in one key.
Dr Martini has provided to us a partial list of his customers, stock items, and suppliers and a partial list of his postal orders for the second quarter 2014 (April - June) to use as test data in four comma delimited text files which can be found on your firm's Intranet (CIS1000 Study Desk).
Mr Carl Dreago, your manager, has set up the following tasks for you to complete for this phase of the project:
1. Create a Database and import the four (4) Text files into four (4) Tables
2. Modify Table Design
3. Set Primary Keys
4. Create Relationships between the Tables
5. Create Data and Update Queries
6. Create Data Display Forms
7. Create an Invoice Report
8. Write End of Project Communication to the Client
Task 1: Create and Import
Create a new blank Access 2007/2010/2013 Database and name it [lastname] [initial] _ [student number] _ [course code] _ assign1.accdb (eg. genrichr_0050051005_cis1000_assign1.accdb).
Import the four sets of data from your firm's Intranet (CIS1000 Study Desk).
The easiest and quickest way to import data into Access is by using the Import Text Wizard. The following steps must be followed carefully to ensure the data is imported correctly:
Importing Tab Delimited Text files into Access 2007/2010/2013 using the Wizard
1) On the External Data tab, in the Import & Link group, click the Text File data source icon.
2) In the Get External Data - Text File wizard popup, browse to find the ‘Assignment01 Text File Customers.txt' text file and select the
Import the source data into a new table in the current database option - then click OK.
3) Select the Delimited - Characters such as commas or tab separate each field option on the first page of the wizard - then click Next.
4) Select the Tab option on the second page of the wizard and turn on the First Row Contains Field Names check box - then click Next.
5) Set the following for each field on the third page of the wizard:
• Field Name - keep the field name as it appears when imported
• Data Type - giving each an appropriate data type
Note: Numbers that will not be used for calculations should be set as Text. Numbers such as Freight Weight and Order Qty must be carefully and logically set to avoid loss of data (numbers without decimal places should be set to be either binary, integer or long integer; and numbers with decimal places should be set to be single or double).
See the Beskeen et al textbook Access 2010 Unit E for more details on setting appropriate Data Types
• When you are sure that each field has the appropriate data type, click Next.
6) Select No Primary Key option on the forth page of the wizard - these will be set in Task 2 - then click Next.
7) Name the table tblCustomers on the final page of the wizard and click Finish.
Repeat the above 7 steps for the rest of the text files naming each Database Table as follows:
Text File Table Name
Assignment01 Text File Items.txt tblItems
Assignment01 Text File Suppliers.txt tblSuppliers
Assignment01 Text File Orders.txt tblOrders
Note: Table names must conform with the Leszynski Naming Convention (LNC) as per the Naming Convention for Access Database Objects document in Appendix 2.
Task 2: Modify Table Design
Modify the four imported tables' structures using the given Table Specifications, from the section above, in Microsoft Access using Table Design View:
• Use the above table specifications, checking that you have the correct table names and field names.
• Check that all fields have the appropriate Data Type from the following:
o Text, Number, Date/Time, Currency, Yes/No, Hyperlink.
• Add an appropriate Field Descriptions to describe the data field.
• Ensure that you also set properties for each field where appropriate. You MUST set the following:
o Field Size - set appropriate logical fields sizes for all Text and Number data types (numbers without decimal places should be set to be either binary, integer or long integer; and numbers with decimal places should be set to be single or double)
o Caption - set an appropriate English caption for all fields where the field name is not in English (eg. Customer ID for CustID)
o Format - set an appropriate format for all: Yes/No and Date data fields; Text data fields that should be stored in Upper-Case (State); and numbers that contain currency or percentages
Note: SVN is the country code for Slovenia - should be formatted in Euros; BB is the country code for Barbados - should be formatted in Dollars.
o Decimals - set an appropriate number of decimal places for any single or double numbers
o Default Value - set an appropriate default value for all Yes / No data fields
o Required - set any data fields that must contain data to Required and leave any fields where data is optional as unchecked.
o Validation Rule and Validation Text - include appropriate Validation Rules for any data fields where there are a limited number of options (eg. Title and State)
See the Beskeen et al textbook Access 2010 Unit E for more details on appropriate settings for each Data Type
For example:
Before proceeding to Task 3, check the Data in the four tables against the Data in the four text files to ensure that there has been no loss of Data during Task 1 and 2.
Task 3: Set Primary Keys
Set the Primary Keys for the four (4) Tables as per the following table specifications in Microsoft Access using Table Design View:
Table Name Primary Key(s)
tblCustomers CustID
tblItems ItemID
tblSuppliers SupplierID
tblOrders CustID, ItemID, OrderDate
Note: The primary key of the Orders table is a combined multiple-field key. It has three fields in one key.
See the Beskeen et al textbook Access 2010 Unit A and the Video provided in the Course Content section for creating primary keys
Task 4: Create Relationships between the Tables
Create the following relationships between the four (4) tables:
• tblCustomers to tblOrders
• tblItems to tblOrders
• tblSuppliers to tblItems
Check that the correct table names and field names are listed in the ‘Edit Relationships' screen.
Ensure that you ENFORCE referential integrity, but do not set Cascading Updates or Cascading Deletes.
You should check that the computer has identified correctly the 1 to 8 relationships between the four (4) tables.
Note: This must be done after you have established the primary keys
See the Beskeen et al textbook Access 2010 Unit E and the YouTube videos on the StudyDesk for more details on creating relationships
Task 5: Create Data and Update Queries
Create the following five (5) queries using the Query Design View. Use the names given for each query to avoid confusion for the client (make sure you submit them in the order given below).
Note: Not all queries will require the inclusion of all four tables; you must decide which tables are appropriate for the generation of each query's output. Only tables needed should be included in the query design as extraneous tables could cause problems with the query results.
Note: Query names must conform with the Leszynski Naming Convention (LNC) as per the Naming Convention for Access Database Objects document in Appendix 2 - including the Query Number and Two Meaningful Words to describe the query eg. qry1XxxxxxXxxxxx.
See the Beskeen et al textbook Access 2010 Unit B, Access 2010 Unit F and Access 2010 Unit K for more details on creating queries
• Query 1: Unfulfilled Plush Toys Orders:
Dr Martini would like to see how many Box Sets orders were ordered for Father's Day but were unfulfilled due to the items being out of stock. In the past the majority of Father's Day Box Sets orders were placed in April and were for items greater than 0.5 kilograms.
Create a Select Query that will display the full Customer's Name (including Title, Given Names and Family Name), Full Item Details (including Type, Description and Freight Weight), Order Date and Order Qty for all Box Sets orders, placed in the month of April (using the BETWEEN criteria tool), weighing more than to 0.5 Kg, and that are currently not in stock.
Display the results sorted by Order Date, check that have you included all necessary fields and ensure that you only display the required fields.
Note: This Query will display 28 rows of data if done correctly.
• Query 2: Eastern Australian Jewellery Orders from a Supplier:
Dr Martini would like to have a query that he can reuse with a manually entered Supplier Name, which will allow him to see how many customers living in Eastern Australia (Queensland, New South Wales and Victoria) have purchased Jewellery obtained from the Supplier he has specified.
Create a Select Query that will display the full Customer's Name (including Title, Given Names and Family Name), and Full Customer's Address for customers who live in Queensland, New South Wales and Victoria (using the IN criteria tools), and the Item Type, Description, Dispatch
Date and Order Qty for all Customers who have purchased "Jewellery" obtained from a user specified Supplier.
Note: As no supplier name has been given, this query must use a Parameter in place of the supplier name.
Display the results sorted by Family Name and State, check that have you included all necessary fields and ensure that you only display the required fields and test using Supplier's Name of "Barojan Inc.".
Note: This Query will display 37 rows of data if done correctly
• Query 3: Import Duty Slovenia (SVN) Cost Price Increase:
A new Australian import duty of 6.75% has been added for all products being imported from Slovenia and Dr Martini has asked you to develop a query that will update the Cost Price from Slovenia of all items that are currently on order. As it would be considered profiteering he has also asked that the query does not update the Cost Price of items already in stock.
Create an Update Query that will raise the Slovenia (SVN) Cost Price for all items on order that are not in stock by 6.75%. It is always good practice to backup any data before running an update or a delete query. The following steps should be followed to achieve this Query:
• In the List of Tables, copy the table called tblItems and paste it with the new name tblBackupItems.
Use tblItems for this Update Query, not your back up table tblBackupItems. If you have difficulties with this query and need to restore your data to the original values, you can copy columns as necessary from tblBackupItems to tblItems and start again.
• Create an Update Query that will increase the Cost Price (SVN) in tblItems by 6.75% for all items currently not in stock but on order.
• Include rounding to 2 decimal places with the update calculation by placing the following function around the update formula: ROUND( update_formula ,2)
Hint:
ROUND( Cost Price (SVN) + Cost Price (SVN) * 6.75% ,2)
Note: Percentages must be converted to decimals in Update Queries.
Do not post formulas to the StudyDesk Forums; it may result in academic misconduct.
Make sure you DO NOT change the Query Type - keep it as an Update Query and do not run the Update Query more than once.
Note: This Query will update 30 rows of data if done correctly - compare the following four Items (ItemIDs 164, 186, 239, & 259) between the tblItems and tblBackupItems to see if the update has been applied successfully.
• Query 4: Late Dispatched Orders Form Query:
Dr Martini would like to have a query that he can display within a form (Task 6: Form 1) that will allow him to see how many customers living in South Australia or Western Australia have had items dispatched late (between 2nd June and today) but where the item was ordered before the 30th May and the item is in stock.
Create a Select Query that will display the CustID, Full Customer's Name (including Title, Given Names, and Family Name), Full Customer's Address, Date of Birth, eMail Address, MailingList, ItemID, Full Item Details (including Type, Description, Size, Freight Weight and Supplier Name), OrderDate, Dispatch Date and OrderQty for those customers living in South Australia or Western Australia (using the OR criteria tool across at least two criteria rows), who have placed Orders before the 30th May 2014 but where these orders were only dispatched between the 2th of June 2014 and today (using the BETWEEN criteria tool and the DATE() function), and where the business currently has that item in stock.
Display the results sorted by State and Order Date, check that have you included all necessary fields and ensure that you only display the required fields.
Note: This query will display 11 rows of data if done correctly.
• Query 5: Invoice Query with Calculated Fields:
Dr Martini would like to have a query that he can use to produce customer invoices (Task 7) that will allow him to see how many customers living in Queensland ordered a Direwolf related product in the months of April and May where the item was in stock. He would also like to calculate the selling price and order total, both of which will be needed on the customer invoices.
Create a Select Query that will display the CustID, Full Customer's Name (including Title, Given Names and Family Name), Full Customer Address, ItemID, Full Item Details (including Type, Description, Size, Freight Weight and Supplier Name), OrderDate, and OrderQty. Include two calculated fields - Selling Price (AU) and Order Total (AU) and limit the query to only those customers living in Queensland who ordered a Direwolf related product (using the LIKE criteria tool), who have placed orders in the months of April and May (using the BETWEEN criteria tool), and where the business currently has that item in stock.
Note:
• SellingPrice(AU) - CostPrice (BB) x Exchange Rate x (1 + Recommended MarkUp)
• OrderTotal(AU) - SellingPrice x Ordered Qty
Exchange Rate BB to AU: 0.8807
Include rounding to 2 decimal places for the Selling Price Calculated Field by placing the following function around the formula:
ROUND( calculated_field ,2)
SellingPrice and OrderTotal must be formatted to the appropriate currency and provided with meaningful captions in the properties for these two calculated fields.
Display the results sorted by CustID, ItemID and Order Date, check that have you included all necessary fields and ensure that you only display the required fields.
Do not post formulas to the StudyDesk Forums; it may result in academic misconduct.
Note: This query will display 6 rows of data if done correctly.
Task 6: Create Data Display Forms
Create the following two (2) data entry forms using the Form Wizard and Form Design.
Note: Form names must conform with the Leszynski Naming Convention (LNC) as per the Naming Convention for Access Database Objects document in Appendix 2 - including the Form Number and Two Meaningful Words to describe the query eg. frm1XxxxxxXxxxxx.
Form 1: Late Orders Form Display with Calculated Fields:
Using all fields from Task 5 Query 4, create a professional user friendly Display Form (using either the Columnar or Justified Form Wizard
Templates) that will allow users to view order details stored in the Database Management System (DBMS).
Include two calculated Textbox fields that will calculate:
• Customer's Age in whole years (using the DATEDIFF function - see video Assignment 1 Extra Resources).
• Dispatch Delay in whole days (Dispatch Date - Order Date).
Do not post formulas to the StudyDesk Forums; it may result in academic misconduct.
The form should demonstrate the following form controls:
• Image -an appropriate logo at the top of the form
• Label -an appropriate Form Title and appropriate Section Headings
• List Boxes or Combo Boxes - demonstrate for Title, State and Type Fields
• Check box - demonstrate for MailingList Field
• Buttons - demonstrate the following four (4) Navigation Buttons (First Record, Previous Record, Next Record, Last Record).
• Form 2: Supplier Items Display Form with Subform:
Create a professional user-friendly Display Form (using either the Columnar or Justified Form Wizard Templates) and a sub-form that will allow users to view each supplier record's details stored in the Database Management System (DBMS).
The main form should contain All Supplier details, the sub-form should contain a Datasheet view of the items sold by that particular Supplier (including at least Type, Description, Size and Freight Weight) - name the subform: frmItemsSub.
The form should demonstrate the following form controls:
• Image - an appropriate logo at the top of the form
• Label - an appropriate Form Title and SubForm Heading
• List Box or Combo Box - demonstrate for State Fields
• Buttons - demonstrate the following four (4) Navigation Buttons (First Record, Previous Record, Next Record, Last Record).
Note: Adjust the data field width on the subform so that all columns fit on the main form using the Property Sheet - Format width option.
See the Beskeen et al textbook Access 2010 Unit C and Access 2010 Unit G and the Videos provided in the Course Content section for more details on creating forms
Note: Each Image on the forms must be inserted using the Image Control and must have the following properties:
Properties Options
Picture Type: Embedded
Control Source: Blank
Picture: [File Name]
Task 7: Create an Invoice Report
Dr Martini has provided you with the following sample Invoice. He wishes you to develop a similar invoice for his business.
Using all fields from Task 5 Query 5, create in the Report Wizard (using the Block Report Wizard Template) a single Report called rptCustomerInvoice that produces a professional looking invoice for the business.
The invoice must have the following attributes:
• The report must contain at least all the elements displayed in the sample invoice (above).
• The report must be grouped by CustID.
• Each Customer's invoice must be on a separate page.
Note: To do this, in the Report Design View, right click on ‘CustID Header', choose ‘Properties', find the ‘Force New Page and change it to ‘Before Section'. You should only view the Invoice in Print Preview to test that this is working - Report View will not put the Customers on separate pages.
• Each Customer's invoice must have the Customer's name merged into a single field including Title, Given Names and Family Name by modifying one of the fields to include:
[Title] & - - & [GivenNames] & - - & [FamilyName]
• Each Customer's invoice must have part of the Customer's address merged into a single field including City, State and Postcode by modifying one of the fields to include:
[City] & - - & [State] & - - & [Postcode]
• Each Customer's invoice must have Today's Date in the Page Header
• Each Customer's invoice must have an Invoice Total for each customer
• Each Customer's invoice must not have any extraneous data including Grand Totals, Page Numbering, nor Summary Information.
• Each Customer's order must have the Order Date in the Details Section
• Each Image on the invoice must be inserted using the Image Control and must have the following properties:
Properties Options
Picture Type: Embedded
Control Source: Blank
Picture: [File Name]
See the Beskeen et al textbook Access 2010 Unit D and Access 2010 Unit L and the Videos provided in the Course Content section for more details on creating Reports
Note: Report names must conform with the Leszynski Naming Convention (LNC) as per the Naming Convention for Access Database Objects document in Appendix 2.
Task 8: End of Project Communication to the Client
Mr Carl Dreago has asked you to provide a professionally developed business letter (about one to two pages in length) to the client, Dr Martini, outlining the process that was taken in the development of this Database Management System. Create a Word 2007/2010/2013 Document and name it ‘[lastname] [initial] _ [student number] _ [course code] _ [assignment number' (eg. genrichr_0050051005_cis1000_assign1.docx). Make sure that your professional business letter has the following elements:
• A professional looking Business Letter-Head containing our Business Name, Address, and Other Contact Details and a Business Logo.
• The letter should be addressed to the Client - the city and state of the client's address should be entered in capital letters, and the client's name and the business's name must be included.
• The date of writing should be in the format day/month/year with the month written in full - not abbreviated as a number (e.g. 3 March 2014).
• The body of the letter should generally take the form of a ‘good or neutral news' letter and should contain:
o A positive opening: usually a straightforward statement indicating our thanks to the client for providing us with the opportunity to be involved in the project.
o Body of the Letter: Mr Carl Dreago has listed a number of items that he wishes you to include in the letter:
• Define what is a Database Management System.
• Define what is a Relational Database.
• Explain why a Database Management System is the appropriate tool for this project.
• Explain why this Database Management System was developed as a Relational Database.
• Describe what a Database Query is and discuss briefly the five queries that were developed for this project.
• Describe what a Database Form is and discuss briefly the two forms that were developed for this project.
• Describe what a Database Report is and discuss briefly the report that was developed for this project.
o A goodwill message and signature: a courteous closing in which you express your pleasure at being able to provide the above-mentioned information and state your willingness to discuss any issues in person.
• The letter should be using a proportional font (eg. Arial, Times New Roman etc.), with a font size of 11 or 12, and be laid out using single line spacing.
Note: It is expected that you will use the Baltzan et al and Beskeen et al textbooks to answer the items Mr Carl Dreago has given you for the body of the letter. There is no need to reference any materials taken from these textbooks, however if you include materials from other sources, you need to include a brief Bibliography on a separate page (see the following USQ website for referencing help: https://www.usq.edu.au/library/help/referencing/harvard.htm).