8/14/2019 Assessment D.pdf
1/10
Adam Bullock 8035 P a g e | 1 19319
Assessment D
In this unit I am going to create a database to store a given set of data and extractuseful information. The dataset I have been given is called tickets and is in a CVS fileformat.
As you can see this data is difficult to interpret. As a result of this imported it into
Microsoft Excel so it was easier to read and analyze.
The next step was to look at the row headings and decide how I can split them upinto different tables. A table stores information on an object.These are the row headings from the dataset
8/14/2019 Assessment D.pdf
2/10
Adam Bullock 8035 P a g e | 2 19319
Order Number Temp Title First Name Last Name Address Line 1
Town County Post code Card Type Card Number Expiry Date Start Date
I have created a data dictionary to help me sort out which attributes/field names gowith which table/entity. I have also defined the type of data, field length and
validation(s).
Entity Name Attribute Data Type FieldLength
Validation Description
Performance Order Numbertemp
Number 5 - Primary keyRequired? No
PerformanceName
Text field 23 Lookupwizard
"BloodBrothers";"Chicago";"ChittyChitty Bang
Bang";"Evita";"Guys andDolls";"Jack and theBeanstalk";"LesMiserables";"MammaMia";"Phantom of theOpera";"Sound of Music";"South Pacific";"Wewill Rock You"
Required? YesPerformance
Date
Date/Time 16 Required? Yes
PerformanceType
Text 1 Lookupwizard
"E";"M"
Required? YesNumber of Tickets
Text 10 Validationrule
8/14/2019 Assessment D.pdf
3/10
Adam Bullock 8035 P a g e | 3 19319
Customer Order Numbertemp
Number 5 - Foreign keyRequired? No
Title Text Field 4 Lookupwizard
"Mrs";"Miss";"Mr";"Ms"
Required? YesFirst Name Text Field 25 Required? Yes
Last Name Text Field 25 Required? YesAddress Line 1 Text Field 25 Required? YesTown Text Field 16 Required? NoCounty Text Field 16 Required? YesPost Code Text Field 7 Input mask LL09#0LL
ValidationText
Incorrect Post Code
Required? YesCard Type Text Field 16 Required? YesCard Number Text Field 12 Required? Yes
Expiry Date Date/Time 16 Required? YesStart Date Date/Time 16 Required? No
I have created this data dictionary so that if i was going to get someone else tocreate my database for me they would be able to do the entity tables with only thisone sheet.
Below I have explained what some of the above terminology is.
o Data types - are there to help the database programme understand what
types of it is dealing with.o Field length is there to limit the number of characters that the user can
enter into the data field.o Validation is there to prevent the wrong data from being entered.
Validation type; Required this means that the field that the user inmust be filled out with the correct information.
Validation type; Lookup wizard is so that the user can choose froma preset range of data, so by choosing one of the given options theyare not entering incorrect data. E.g. th e title of a person; mr, mrs,etc.
Validation type; Validation text is what is displayed if the userenters the wrong information.
Validation type; Input mask to prevent the wrong data from beingentered. E.g a post code.
8/14/2019 Assessment D.pdf
4/10
Adam Bullock 8035 P a g e | 4 19319
The table below is showing the symbols and explanations for the input maskthat I have used for the post code.
Symbol Description0 Digit 0-9 (required)9 Digit 0-9 (optional)# Digit or spacesL Letter A-Z(required)? Letter A-Z (optional)> Make following characters uppercaseA Letter or digit (required)A Letter or digit (optional)& Any character or space (required)C Any character or space (optional)< Make following characters lowercase
For the post code I used the input mask of LL09#0LL
ERD Entity Relationship Diagram In order for these two to work together in a relational database a relationshipbetween the tables has to exist. This is done by identifying a primary key field (ordernumber temp from the performance table) and putting this field in the customertable. In the customer table it is called a foreign key. This can be representedgraphically.
This is a one too many relationship. Below are the screenshot showing me setting upthe relationship.
Order Customer
8/14/2019 Assessment D.pdf
5/10
Adam Bullock 8035 P a g e | 5 19319
The screenshot on the rightshows me setting up therelational database. This isstage one viewing thedifferent table
The screenshot on the leftshows me connecting the twotables together into arelational database.
The screenshot on the rightshows me again setting up therelational database; the stepshown on the right is the finalstep.
8/14/2019 Assessment D.pdf
6/10
Adam Bullock 8035 P a g e | 6 19319
Creating the DatabaseTo get all of the information that i was supplied in the dataset into Microsoft accessto create my database I had to first split up the tickets CSV into two different tables,performance and order.
This screenshot shows the tickets information in Excel, I had to copy and paste theinformation into two different tables, customer and order. This screen shot showsthe customer table, all the information relevant to the customer, name and addressetc.
This screenshot shows the order table for my tickets data. All of the information forthe performance is listed here, performance name, time etc.
8/14/2019 Assessment D.pdf
7/10
Adam Bullock 8035 P a g e | 7 19319
After I had decided all of this, I had to import this data into Microsoft Access. Thescreenshots below show the steps I took to import the data.
This screenshot shows meselecting the excel file thatneeded importing into access.
This screenshot shows meselecting which sheet of theexcel document I want to
import into Microsoft access.For this import I chose thecustomer sheet.
8/14/2019 Assessment D.pdf
8/10
Adam Bullock 8035 P a g e | 8 19319
This screenshot shows the nextstep of the import. In mostexcel documents the first wordin the top column are usuallythe column headers. This isaccess asking me if I wouldlike to keep the top row cellsas the column names.
This next screen shot is of theimport wizard asking if Iwould like to import the excelsheet into a new table or anexisting table. As I do not havean existing table I have to putthe data into a new one.
8/14/2019 Assessment D.pdf
9/10
Adam Bullock 8035 P a g e | 9 19319
This screenshot shows mesetting the table to have noprimary key for the time being.
8/14/2019 Assessment D.pdf
10/10
Adam Bullock 8035 P a g e | 10 19319
This shot shows me namingthe table tblCustomer andclicking to finish the import of this excel sheet.