You are on page 1of 105

1

Nathan Gajewski
100246576
Advanced Database
Development
6CC519
Word Count =2,124
Not including Title page, content page, Reference, Appendixes

Nathan Gajewski 100246576


Content
1. Entity Relation Modal …………………………………………………………………………………………………….(3-5)
2. Normalization – First Normal Form (1NF).………………………………………………………………………….(6)
3. Normalization – Second Normal Form (2NF).……………………………………………………………….…….(7)
4. Normalization – Third Normal Form (3NF)…..……………………………………………………………….…….(7)
5. Normalization – Boyce-Codd Normal (BCNF)….…………………………………………………………….…….(8)
6. SQL Statement …………………………………………..….……………………………………………………………..(9-10)
7. Optimizing the Database…….……………………..….…………………………………………………………….……(11)
8. Users and Roles………………………………………………………………………………………………………………...(12)
9. View…………………………………………………………………………………………………………………………….(13-14)
10. Website Interface……………………………………………………………………………………………………………..(15)
11. Reference………………………………………………………………………………………………………………..…..(16-17)
12. Appendix A……………………………………………………………………………………………………..……………(18-69)
13. Appendix B - Populated Tables…………………………………………………….…………………………….(70-110)

Entity Relation Diagram

Nathan Gajewski 100246576


3

Entries Attributes
Customer Customer ID, Customer Name, Email address, Credit card
Number, Name on credit card, Expiration Date, Security
number, Address, card type, username , password
Event Event ID, Customer ID, Tour Event, Lecture Event. Workshop
Event, Linking ID, Date Booked
Lecture Lecture ID, Room ID, Title, Description, Starting Time,
Finishing Time, Price, Review
Speaker Speaker, Speaker Description, picture, rating
Tour Tour ID, Tour Information, Price, Opening time, closed dates,
picture, description, period , date range, meeting point,
address Rating , Reviews
Tour Guide Tour Guide ID, Name, Description, Languages, rating , review
Workshop Workshop ID, Room ID, Name, Descriptions, Room ID, Time,
duration, level, Price , Reviews
Room Room ID, Room Number, Building
Nathan Gajewski 100246576
Book Locator Book Location ID, Store ,Description of the store, Address
Product Product ID, Customer ID, Family Tree, Books, Magazine, Date
booked
Family Tree Family Tree ID, hours, Price
Books Books ID, Categories, Author, Description of book,
Audience,Price, Rating , Reviews
Magazine Magazine ID, Category, Name, Description, expire date,
Rating, Review, Price per magazine, Mag a month, duration

Constraints

1) Average Rating is only out of 5.


2) Family Tree research hours (Hours) are only 10/20/50/100
3) The book categories are only: 20 th century, Ancient world, Medieval, Regency, Scottish,
Tudors, Victorian, USA History, Middle Easten History, Far East History, World History.
4)Magazines can only have a half a year, year or 2 year subscription.
5) The discount for the different subscription is set to 10% for a year and 20% for two years.
6) Only customers who have purchased or booked a product/event are allowed to give ratings
and write reviews.

Assumptions

1) Customers can be registered and non-registered


2) Non-registered customers are only allowed to search book stores' locations. They cannot
book any events or buy any products.
3)The vast majority of customers are from the UK.
4) One customer can only give one rating and review to one purchase.
5) The company owns a single campus that has a number of buildings and many rooms to hold
lectures and workshops.
6) A room can hold a workshop or a lecture.
7) A lecture is a single event, but a workshop can consist of a number of lessons.

Nathan Gajewski 100246576


5

Normalization
First Normal Form (1NF)
Atomic issues

To comply with atomic level 1NF rule, tables ( customer, book, tour,book_location and workshop)
were expanded. For table(customer),field (name) was split into 2 fields( firstname, surname),
field ( name_creditcard) into 2 fields (firstname _creditcard , surname_creditcard) and field
( Address) into 5 fields( Street, City, Region, Country, Postcode). (See Table 1 in Appendix). The
field (Author) in table (book) was also split into 2 fields(first name, surname) (See Table 3 in
Appendix).For tour table, field (address) needs to be put into 4 fields (Street, City, Region,
Country)(See Table 4 in Appendix).In table(book_location) many advantages can be gained by
atomizing the field (Address) into 5 field ( Address, City, Region, Postcode, Country,). Customers
can search using a number of inputs, such as searching by city, region, Country or postcode, and
the system could do more services using this. (See table 5 in Appendix ).Lastly, field ( time) in
table(workshop) can be divided into fields (starting time, finishing time, time). The text field
(time) will allow the teacher to decided on a number of variables such as, number of lessons per
week or month and the time of the workshop. (See table 6 in Appendix)

Removing Redundant Data

Table (event) has redundant Booleanfields (Tour Event, Lecture Event, and Workshop Event). If we
add a new product or service, NULL values will be created for all the old records. To solve this
design issue, new purchasing tables ( booking_book, booking_tour, booking_lecture,
booking_magazine, booking_family) must be included. ( See table 6 in Appendix). With this
solution, we can delete tables (product, event) from the database. (See table 6 and 7in Appendix)

Adding Primary Key

A new primary key had to be added to the table (speaker) because although it is unlikely that two
famous speakers will have the same name, it is still a possibility. ( See table 8 in Appendix)

Adding foreign key


Nathan Gajewski 100246576
A foreign key(speaker_id) was added to tables ( lecture) to link it with the speaker table.( See

table 9 in Appendix)

No Action required

No actions were required to achieve 1NF for tables( tour_guide, room , book ,magazine)(see
table 10 in Appendix )

Second Normal Form (2NF)


Security concerns

The customer table can be divided into 3 tables( Customer, Credit Card , Password ). New fields
( Credit Card ID , Password_id) were created for protection in the Credit Card table. By using a
Credit ID instead of the Credit Card Number as a primary key, we can set the credit card and
password access level much higher. For example, a number of managers may need access to the
customer information for various reasons, but no one but the database administrator will be able
to see the credit card information or customers’ passwords.In addition, I also added 5 fields
( Street, City, Region, Country, Postcode) for the address information. This was impossible to do in
one table as it would have created multiple identical fields, and so would have failed 1NF. (See
table 11 in Appendix)

Problems with individual fields

Review and rating tables( lecture, tour , workshop , books, magazine) need to be created for the
review and rating information, as more than one review or rating can be assigned to one lecture.
The new tables(lecture review, tour review, tour rating, workshop review, book review, book
rating, magazine review , magazine rating ) can search the booking table by using the foreign keys
( customer_id, ) to check whether the customer has paid for the lecture. By doing this option,
more detailed information can be easily added onto the table. The new review fields ( Date,
Helpful , Unhelpful) also can better organize the reviews for customer. (See tables 12 – 16 in
Appendix )

No Action required

All the 2NF requirements were fulfilled for numerous tables(See table 17 in Appendix )

Non key attributes not depending on the whole

The book store location is divided into 2 tables by converting field (Postcode) into a foreign key,
and creating a new address table for the book store location table.(See table 18 in Appendix )

Third Normal Form (3NF)


Barring 2 tables (Customer, Credit card) all tables fulfilled the 3NF requirements. Tables
(Customer, Credit Card) could delete fields (Street, City, Region, Country,) as the table (postcode)
has already been created holding that information. (See table 19 in Appendix)

Nathan Gajewski 100246576


7

Boyce- Codd Normal (BCNF)


The final tables ( See Appendix B for all tables and example data ) all fulfill the BCNF
requirements.

SQL Statements

Operator In Appendix
JOIN, SELECT customer_id, firstname, surname, address, city, region, country Figure_1
FROM customer
JOIN address
ON customer.POSTCODE = address.POSTCODE;
JOIN, SELECT name, Review, helpful Figure_2
ORDER BY FROM magazine_review join Magazine
Nathan Gajewski 100246576
ON magazine.magazine_id=magazine_review.magazine_id
ORDER BY helpful DESC;
Subquery, SELECT title, firstname, surname, price, count(booking_book.ISBN) AS Figure_3
JOIN, amount_sold FROM book JOIN booking_book
GROUP BY , ON booking_book.ISBN=book.ISBN
AS WHERE price >(SELECT AVG(price) FROM book)
AVG Group by title, firstname, surname, price ;
Count, SELECT Figure_4
AS, ( SELECT COUNT(*) FROM Customer ) AS total_customers, ( SELECT
JOIN COUNT(*) FROM BOOKING_BOOK ) AS total_booking_orders,
SUM ( SELECT SUM(price)FROM book JOIN BOOKING_BOOK ON book.isbn =
Sub query, booking_book.isbn) AS Overall_book_sales
FROM dual
Mathematica Select tour.site, description, price Figure_5
l FROM tour JOIN historical
Statement ON tour.site = historical.site
WHERE tour.price>= 50 AND tour.price<= 150.00;

COUNT SELECT category, count(book.isbn) as number_of_books FROM Figure_6


JOIN book_and_magazine_category JOIN book
GROUP BY On
book_and_magazine_category.CATEGORY_ID = book.CATEGORY_ID
GROUP BY category;
Alter table Alter table TOUR_TIME rename column 'TIME', 'OPENING_TIME'; Figure_7
Rename
column

AS select site, saturday, sunday, TOUR_CLOSING.TIME AS days_closed Figure_8


3 Table Join FROM HISTORICAL
JOIN TOUR_DAYS
ON HISTORICAL.DAY_ID = TOUR_DAYS.TIME_ID
JOIN TOUR_CLOSING
ON HISTORICAL.CLOSED_ID = TOUR_CLOSING.CLOSED_ID
WHERE SATURDAY = '1' AND SUNDAY = '1';
Max select title, review, max(helpful) from book_review JOIN book Figure_9
JOIN ON book_review.ISBN = book.ISBN
Sub query Where helpful = (Select max(helpful) from book_review)
Group by title, review;
Select select * from BOOK Figure_10
Like where DESCRIPTION LIKE '%SAS%' OR TITLE LIKE '%SAS%';
Case when SELECT firstname, surname, Figure_11
CASE country
WHEN 'USA' THEN 'North America'
WHEN 'Canada' THEN 'North America'
WHEN 'UK' THEN 'Europe'
WHEN 'France' THEN 'Europe'
ELSE 'Unknown'
END Continent
FROM customer
Join address
on customer.postcode = address.postcode
ORDER BY firstname, surname;
Nathan Gajewski 100246576
9

Optimizing the Database

SQL Search statement Index code Evidence


select surname, firstname ,title from book Composite index Figure 12
where surname = 'White' and firstname = CREATE INDEX AUTHOR_NAME_IX
'Ronald' ; ON book (SURNAME , FIRSTNAME , title );
select customer_id, review, helpful from B-structure Index Figure 13
book_review join book
on book.isbn = book_review.isbn create index review_ix on
Where helpful > 10 book_review(helpful desc);
Select customer_id, firstname, surname from Function based index Figure 14
customer CREATE INDEX customer_search_ix ON
Where UPPER(SURNAME) = ‘BRUCE’; customer (UPPER(surname)) ;

SELECT SITE, ADDRESS ,CITY , COUNTRY Index Organized Table - Figure 15


FROM TOUR_LOCATION JOIN COUNTRY
ON TOUR_LOCATION.COUNTRY_ID = added to the create table statement
COUNTRY.COUNTRY_ID
SELECT category, count(book.isbn) as Index Organized Table - Figure 16
number_of_books FROM
book_and_magazine_category JOIN book added to the create table statement
on
book_and_magazine_category.CATEGORY_I
D = book.CATEGORY_ID
GROUP BY category;
select name, price_per_mag * Function based index Figure 17
Magazine_month as Total_cost from CREATE INDEX magazine_cost_ix ON Magazine
Magazine (price_per_mag * Magazine_month) ;
where PRICE_PER_MAG *

Nathan Gajewski 100246576


MAGAZINE_MONTH < 30
select * from booking_book B-structure Index Figure 18
where date_booked >= '01-10 月-16' create INDEX booing_orders_ix
ON booking_book (date_booked desc)

Users and Roles


Roles What do they need to Appendix What they are Appendix Privileges
do restricted from
doing.
Customer 1. sign in Figure 19 1) Updating any Figure 20 1) Grant Connect to
2. search products and record from any customer;
events products or events. 2) Grant select on all
3.Update password 2) Altering a table tables to customer;
and customer 3)Deleting any 3) Grant insert on
information - records customer, postcode, all
4. Add reviews and rating , all review to
ratings to Products and customer .
Events 4) Grant update to
password, customer,
postcode, all reviews to
customer;

Staff 1.add products and Figure 21 1) Deleting Figure 22 1) Grant Connect to Staff
events customer's 2) Grant insert and update
2.sign in information , on books, magazine, tour,
3.search products and events or products. lecture, speaker, book
events 2) Accessing the location, Book's location
4.update products and Credit Card Table. address, workshop to
event 3) Altering a table Staff.
5 Seeing customer's 4 ) Deleting 3 ) Selecting all the tables
basic information Products or Events above and customer
5) Can't select table.
information about
sales figures and
booking order.
Managem 1 delete products and 6. Alter tables 1) can't create users Figure 23 1) Grant connect to
ent events to add more , tables , index, Management
2 update products and information or function , views, 2) Grant insert on all
event services. references
3 search booking 7. delete 2) Can't revoke
3) Grant update on all
information customers privileges 4) Grant delete on all
4 search products and
events
5 search all customer
Nathan Gajewski 100246576
11

information

View

Users Statement Appendix


Staff CREATE VIEW all_products AS Figure 24
Managment SELECT book.title , price
FROM book
UNION
SELECT lecture.title,price
FROM lecture
UNION
SELECT magazine.Name ,magazine.price_per_Mag *
magazine.Magazine_month
FROM magazine
UNION
SELECT workshop.name ,price
FROM workshop
UNION
SELECT site ,price
FROM tour
Management CREATE VIEW customer_creditcard_info as Figure 25
select
customer.firstname, customer.surname,
card_number,credit_card.firstname as
CC_FIRSTNAME, credit_card.surname as
CC_SURNAME, card, expire ,security_number,
address, city, region , country , customer.postcode
from customer join address
ON customer.POSTCODE = address.POSTCODE
join credit_card
on customer.creditcard_id =
credit_card.credit_card_id
Customer, create view display_lecture AS Figure 26
Staff SELECT title, lecture.description ,price,
Management starting_time, finishing_time, Building,
room_number, speaker, speaker.description AS
speaker_description, picture
FROM lecture JOIN room
ON lecture.room_id = room.room_id
JOIN speaker
ON speaker.speaker_id = lecture.speaker_id
Management create view book_booking_info as Figure 27
select title, count(booking_book_id) as total_sales
from booking_book join book
on booking_book.isbn = book.isbn
Group by title
Management CREATE VIEW all_customer_info_view AS Figure 28
SELECT customer_id, firstname, surname, address,
city, region, country
FROM customer JOIN address

Nathan Gajewski 100246576


ON customer.POSTCODE = address.POSTCODE;
Management create view customer_book_orders as Figure 29
select surname,firstname,customer.customer_id,
count(booking_book_id) as total_book_sales
from customer join booking_book
on customer.customer_id =
booking_book.customer_id
Group by surname,firstname,customer.customer_id

Website Interface (WI) & PHP Script

Aim WI Appendix PHP Appendix

(Figure) (Figure)

Search Lectures 24 25
By date
Search Lectures from 26 27
keywords in the title and
Description
Search Lectures by speaker 28 29
Search Lecture by Month 30 31
Display Information about 32 33
Chosen Lecture
Nathan Gajewski 100246576
13

Adding Speaker 34 35
Adding Lecture 36 37
Updating Lecture 38 39
Update Speaker 40 41
Delete Lecture 42 43
Delete Speaker 44 45
Homepage 46 47

Reference
1) FreeIconsPng.2016. Tour, Tourist, Travel, Traveler, Vacation. [Online]. Available at: http://
http://www.freeiconspng.com/free-images/vacation-icon-6427 [Accessed: 03 September
2016].

2) Historvius.2015.Discover More. [Online]. Available at: http://www.historvius.com/ [Accessed:


03 September 2016].

3) Hotcourse.2015.Hot Courses [Online]. Available at: http://www.hotcourses.com/courses/


[Accessed: 03 September 2016].

4) National Association for Gift Children. 2015. A Brief History of Gifted and Talented Education
[Online]. Available at: http:// http://www.nagc.org/resources-publications/resources/gifted-
education-us/brief-history-gifted-and-talented-education [Accessed: 01 September 2016].

5) Portals.2015. Portals. [Online]. Available at: http://50.6.129.243/Portals/38894/images/past-


history.jpg [Accessed: 01 September 2016].

6) SmartDolphins.2014. SmartDolphins[Online]. Available at: http://smartdolphins.com/wp-


content/uploads/2014/08/Restricted-access.jpg [Accessed: 03 September 2016].

7) TED. 2007. The search for humanity's roots [Online].


Available at: http://www.ted.com/talks/zeresenay_alemseged_looks_for_humanity_s_roots
[Accessed: 03 September 2016].

Nathan Gajewski 100246576


8) TED.2008. A dig for humanity's origins [Online].
Available at: http://www.ted.com/talks/louise_leakey_digs_for_humanity_s_origins [Accessed: 03
September 2016].

9) TED.2008. The hunt for General Tso [Online]. Available at:


http://www.ted.com/talks/jennifer_8_lee_looks_for_general_tso[Accessed: 03 September
2016].

10) TED 2011. The history of our world in 18 minutes. [Online].


Available at: http://www.ted.com/talks/david_christian_big_history [Accessed: 03 September 2016].

11) TED. 2012. Archaeology from space. [Online]. Available at:


http://www.ted.com/talks/sarah_parcak_archeology_from_space [Accessed: 03 September
2016].

12) TED.2012. The greatest machine that never was [Online]. Available at:
http://www.ted.com/talks/john_graham_cumming_the_greatest_machine_that_never_was
[Accessed: 03 September 2016].

13) TED.2015. Why public beheadings get millions of views[Online]. Available at:
http://www.ted.com/talks/frances_larson_why_public_beheadings_get_millions_of_views
[Accessed: 03 September 2016].

Nathan Gajewski 100246576


15

Appendix A
Table 1 – Fulfilling the Atomic Requirements for Customer Table

Customer_id Name Email Credit Name Expiration Security Username Password A


card on Date Num
Num Credit
Card
Card type Username password

Customer ID
First Name
Surname
Email address
Credit card Num
First Name on Credit Card
Surname on Credit Card
Card type
Expiration Date
Security Num
Street
City
Region
Country
Postcode
Username
Password

Table 2- Adding Fields( first name and surname) to Fulfill the Atomic Requirements

Book ID Categories Author Description Price Rating Review


Nathan Gajewski 100246576
Book ID Categories First name Surname Description Price Rating Review

Table3-Fulfilling the Atomic Requirements in the Tour Table

Tour ID Tour Price Rating Reviews Days open Closing


information days
Meeting period description Address Date range
point

Tour ID Tour site Price Rating Reviews Days Closing


Guide ID open days
Meeting period descri Addre City Country Date
point ption ss range

Table 4- Fulfilling the Atomic Requirements in the Book Location table

Book Location ID Store Description Address

Book Store Description of Store Addres City Regio Postal Code Country
Location ID s n

Table 5 –Atomic level - Adding a fields (Start time / finish time )

Workshop ID
Room ID
Name
Descriptions
Time
Price
Review
Level
Duration
Workshop ID
Room ID
Name
Description
Nathan Gajewski 100246576
17

Start Time
Finish time
Duration
Price
Review
Level
Time

Table 6– Removing the Boolean Redundant Fields

Event ID Customer Tour Event Lecture Workshop Linking Date Booked


ID Event Event ID

Booking Book ID Customer ID ISBN-13 Date

Lecture Booking ID Customer ID Lecture ID Date

Tour Booking ID Tour ID Tour guide ID Date

Magazine Purchase ID Customer ID Magazine ID Duration ID Date Booked


INT INT INT INT DATETIME

Family tree id Customer id Hour id Date

Table 7 - Removing a Redundant Table

Product ID Customer ID Family Tree Books Magazine Date Booked

Table 8– Adding a Primary Key to the Speaker Table


Speaker Description Picture

Speaker ID Speaker Description Picture


1 Sir Ken Robinson

Table 9 – Adding a Foreign Key

Lecture ID Room ID Title Description Starting Time Finishing Time Price Review
1

Lecture ID
Room ID
Speaker ID
Title
Description
Starting Time
Finishing Time

Nathan Gajewski 100246576


Price
Review

Table 10- No changes needed for 1NF ( Tour Guide, Room , Book , Magazine)

Tour Guide Id Name Description Language Picture Rating

Room ID Room Number Building

Magazine Duration Name Description Expire Rating Review Price Mag a


ID month

Family tree_ id Hours Price

2NF TABLES
Table 11 – Security Concerns for Customer Information

Customer ID
First Name
Surname
Email address
Credit card Num
First Name on Credit Card
Surname on Credit Card
Card type
Expiration Date
Security Num
Street
City
Region
Country
Postcode
Username
Password
Nathan Gajewski 100246576
19

Credit Card ID 1
Credit card Num 1561651816
First Name Nathan
Surname Smith
Expiration Date 12/12/2021
Security Num 323
Street 122 Xing lu
City Shanghai
Region Shanghai
Country China
Postcode 9230394
Customer ID 1
First Name Nathan
Surname Smith
Email address Smith@hotmail.com
Street 122 Xing lu
City Shanghai
Region Shanghai
Country China
Postcode 9230394
Credit card ID 1
Password_id 1

Password _id Username Password


1 Apple Apple

Table 12 - Problem with the Review and Rating Field in the Book Table

Book ID Categories First name Surname Description Price Rating Review

Rating ID
ISBN
Customer ID
Review
Nathan Gajewski 100246576
Date
Helpful
Unhelpful

ISBN 1
Categories
Firstname
Surname
Description
Price

Rating ID
Customer ID
ISBN
Rating

Table 13 – Problem with the Review and Rating Field in the Lecture Table

Lecture ID
Room ID
Speaker ID
Description

Nathan Gajewski 100246576


21

Starting Time
Finishing Time
Total Space
Price
Review

Lecture ID
Room ID
Speaker ID
Description
Starting Time
Finishing Time
Total Space
Price
Review ID
Lecture ID
Customer ID
Review
Date
Helpful
Unhelpful

Table 14 –Problem with the Review and Rating Field in the Tour Table
Tour ID Tour site Price Rating Reviews Days Closing
Guide ID open days
Meeting period descri Addre City Country Date
point ption ss range

Nathan Gajewski 100246576


Tour ID
Tour Guide ID
Site
Price
Days
Description
Days open ID
Days closed ID
Period ID
Location_id
Meeting point

Review ID
Tour ID
Customer ID
Review
Date
Helpful
Unhelpful

Location_id
Address
City
Country

Rating ID
Tour ID
Customer ID
Rating
Helpful
Unhelpful

Table 15 - Problem with the Review and Rating Field in the Workshop Table

Workshop ID Room ID Name Description Time Spaces Price Review

Nathan Gajewski 100246576


23

Workshop ID
Room ID
Name
Description
Time
Spaces
Price
Review ID
Workshop ID
Customer ID
Review
Date
Helpful
Unhelpful

Table 16 – Problem with the Review and Rating Field in the Magazine Table

Magazine Category Name Description Rating Review Price


ID

Rating ID
Magazine ID
Customer ID
Review
Date
Helpful
Unhelpful

Magazine ID 1
Category
Name
Description
Price
Rating ID
Magazine ID
Customer ID
Rating

Nathan Gajewski 100246576


Table 17 –Fulfills all the 2NF Requirements

Speaker ID Speaker Description Picture

Tour Guide Id Name Description Language

Room ID Room Number Building

Booking Book ID Customer ID ISBN-13 Date

Lecture Booking ID Customer ID Lecture ID Date

Tour Booking ID Tour ID Tour guide ID Date

Magazine Purchase ID Customer ID Magazine ID Duration ID Date Booked


INT INT INT INT DATETIME

Family tree id Customer id Hour id Date

Family tree_ id Hours Price

Table 18 - Make the Non-Key Attributes Depend on the Whole Key.

Book Store Description of Addres City Region Postal Code Country


Location ID Store s

Postcode
Address
City
Region
Country

Book Location ID
Store
Description
Postcode

Nathan Gajewski 100246576


25

Third Normal Form (3NF)

Customer_ID 1
First name Nathan
Surname Smith
Email Smith@hotmail.com
Postcode 9230394
Creditcard_ID 1
Table 19 –Fulfilling the 3NF Requirements

Customer ID 1
First Name Nathan
Surname Smith

Nathan Gajewski 100246576


Email address Smith@hotmail.com
Street 122 Xing lu
City Shanghai
Region Shanghai
Country China
Postcode 9230394
Credit card ID 1

Credit Card ID 1
Credit card Num 1561651816
First Name Nathan
Surname Smith
Expiration Date 12/12/2021
Security Num 323
Street 122 Xing lu
City Shanghai
Region Shanghai
Country China
Postcode 9230394

Credit Card ID 1
Credit card Num 1561651816
First Name Nathan
Surname Smith
Expiration Date 12/12/2021
Security Num 323
Postcode 9230394

Nathan Gajewski 100246576


27

Queries
Figure 1 - 1st Query –Finding out Customer Information ( Name & Address)

Figure 2 - 2ND Query –Finding Magazine Reviews Order By Helpful Field

Nathan Gajewski 100246576


Figure 3 – 3rd Query –Finding Number of Books Sold That are More Expensive than the Average
Priced Book

Figure 4 – 4th Query – Finding out the Total Customer Number, Total Book orders and Total Sales
from Books

Nathan Gajewski 100246576


29

Figure 5 – 5th Query – Finding out the Total Customer Number, Total Book orders and Total Sales
from Books

Figure 6 – 6th Query – Finding out Number of Books per Category

Nathan Gajewski 100246576


Figure 7 – 7th Query – Renaming a Column

Figure 8 – 8th Query – Renaming a Column

Nathan Gajewski 100246576


31

Figure 9 – 9th Query – Finding the Most Helpful

Figure 10 – 10th Query – Searching For a Book in Title and Description

Nathan Gajewski 100246576


Figure 11 - 11th Query - Putting customers into continents

Nathan Gajewski 100246576


33

Optimizing the Database


Figure 11 – Before/ After for Composite index for Author search

Before

Nathan Gajewski 100246576


After

Figure 12 - B-structure Index for Finding a Book with their Reviews and Helpful Ratings

Before

Nathan Gajewski 100246576


35

After

Figure 13 -Function based Index Title Search

Nathan Gajewski 100246576


Figure 14 - Function Index Customer Search
Before

Nathan Gajewski 100246576


37

After

Figure 15 - Index Organised Tables for Tour Address

Before

After

Nathan Gajewski 100246576


Figure 16 - Index Organised Number of Books in Each Category

Figure 17- Function Index – Searching for Magazines that have a Total Cost Less than 30

After

Nathan Gajewski 100246576


39

Before

Figure 18 - B-tree structure Index - Checking the Book Orders from last mouth.

Nathan Gajewski 100246576


Users and Views
Figure 19 - Showing Customers Access

Customer selecting all the Magazines, their reviews, and the helpful ratings.

Nathan Gajewski 100246576


41

Customer Inserting a New Rating Record

Updating customer information

Nathan Gajewski 100246576


Figure 20 - Restricting the Customer User
Inserting a new Magazine

Nathan Gajewski 100246576


43

Altering customer Table

Deleting a Magazine

Nathan Gajewski 100246576


Figure 21 - Privileges for Staff

Adding a new product or event

Searching Products,Events and Customer Information

Nathan Gajewski 100246576


45

Updating Events and Products' Information

Figure 22 - Restricting the Customer Staff


Deleting a customer

Nathan Gajewski 100246576


Denying Access to Credit Card information

Unable to Alter any tables

Nathan Gajewski 100246576


47

Denying Access to Booking orders

Figure 23 - Privileges for Management

Unable to create new users

Nathan Gajewski 100246576


Can't create index

Can't grant any privileges to other users

Nathan Gajewski 100246576


49

Combing PHP and SQL statements


Figure 24 - Output -Searching all the Lectures by Date

Nathan Gajewski 100246576


Future picture - Portals(2015).
Figure 25 - PHP Script -Searching all the Lectures by Date
Connecting to the Database and Executing the Search Query

Displaying the Information as a Table

Figure 26 - Output -Searching all the Lectures Using the Title and Description Fields and
Inputted Value

Nathan Gajewski 100246576


51

Figure 27 - PHP Script - Searching all the Lectures Using the Title and Description Fields and
Inputted Value

Figure 28 - Output - Searching all the Lectures Using the Speaker Field and Inputted Value

Nathan Gajewski 100246576


Future picture - Portals(2015).
Figure 29- PHP SCRIPT - Searching all the Lectures Using the Speaker Field and Inputted Value

Returning the Inputted value to the form

Figure 30- Output - Searching Lecture in Certain Months

Nathan Gajewski 100246576


53

Figure 31 - PHP Script - Searching Lecture in Certain Months

Figure 30- Output - Displaying the Information about Chosen Lecture

Nathan Gajewski 100246576


Figure 33 - PHP Script - Getting the Information from the Chosen Lecture

PHP Script - Displaying the Information in the Website

Figure 34- Output - Adding a Speaker into the Database

Nathan Gajewski 100246576


55

Restricted Access Picture - SmartDolphins (2014).


Output - The Result of the PHP Script

Restricted Access Picture - SmartDolphins (2014).

Figure 35 - PHP Script - Adding a Speaker into the Database

Figure 36- Output - Adding a Lecture into the Database

Nathan Gajewski 100246576


Restricted Access Picture - SmartDolphins (2014).

Figure 37 - PHP SCRIPT -Getting the User's Input

PHP Script - Confirming Whether the User Input the Correct Speaker Information and Querying
the correct Room_id for the Lecture Record.

PHP Script - Inserting the File into the database.

Nathan Gajewski 100246576


57

PHP SCRIPT - Error Messages from the Room and Speaker IF Clauses

Figure 38- Output - Updating a Lecture into the Database


Lists all the lecture

Output- The Second Page with the Date already in the Field.

Nathan Gajewski 100246576


Figure 39 - PHP Scripts- Gets the information from the database

PHP Scripts- Creates a Table with the Data

Nathan Gajewski 100246576


59

PHP - Queries the Room and Speaker Tell to get the Required Information to Create the Cable
Above

Figure 40 Output- Updating a speaker


Listing all of the speakers in the database

Nathan Gajewski 100246576


Showing the Current Information from the Select Speaker

Conformation of the Updating Process

Nathan Gajewski 100246576


61

Figure 41 - PHP Script for Updating speaker


Displaying all of the speakers records.

Showing the Current Information from the Select Speaker

Nathan Gajewski 100246576


Updating the Speaker Record

Figure 42 - Output - Deleting a Lecture


-
Showing all Lecture with their Corresponding Delete Button

Nathan Gajewski 100246576


63

Confirmation of Deleted Lecture Record

Figure 43- PHP Script - Deleting a Lecture


-
Showing all Lecture with their Corresponding Delete Button

Nathan Gajewski 100246576


Confirmation of Deleted Lecture Record

Nathan Gajewski 100246576


65

Figure 44 - Output Deleting a Speaker


Displaying all the Speakers

Confirmation of the Deletion

Figure 45- PHP Script - Deleting a Speaker

Displaying all the Speakers

Nathan Gajewski 100246576


Confirmation of the Deletion

Figure 46-
Homepage - Contains top reviews from the tour , workshop and lecture information

Nathan Gajewski 100246576


67

History Picture - National Association for Gift Children (2015)


Tour Icon - FreeIconsPng (2016)

Figure 47 -Contains top reviews from the tour , workshop and lecture information

Nathan Gajewski 100246576


68

Appendix B - Boyce- Codd Normal (BCNF)


Customer Table

Customer_id Firstname Surname Email Postcode CreditCard_ID


Number(8,0 VARCHAR2(2 VARCHAR2(2 VARCHAR2(80 BYTE) VARCHAR2(1 NUMBER(8,0)
) 0 BYTE) 0 BYTE) 0 BYTE)
1 Harley Garner Garner@hotmail.com Rg298r5 1
2 Maya Bruce Maya999@hotmail.com SW177RR 2
3 Bethany Wilkins Apes_having_fun@ntlworld.com SA625DW 3
4 Luke Lees 1231289636@qq.com SA625DW 3
5 Miller Tegan Tegan1AAA@Live.com GL51 6PL 4
6 Carter Maya People_Carter@live.co.uk TN30 8YG 5
7 Owen Ball Owen_ball@qq.cn TN30 6YX 6
8 Erin Davis USFlag@live.com 70047 7
Primary Key NOT NULL NOT NOT NULL Foreign Key Foreign Key
NULL NOT NULL NOT NULL
Index Composite Index index Index

Address

Postcode Address City Region Country


VARCHAR2(10 VARCHAR2(30 BYTE) VARCHAR2(20 BYTE) VARCHAR2(20 VARCHAR2(20
BYTE) BYTE) BYTE)
Rg298r5 56 Crown Street London London UK

Nathan Gajewski 100246576


69

SW17 7RR 70 Crown Street London London UK


SE23 7TT 54 Guild Street London London UK
SA62 5DW 87 Farburn Terrace LITTLE NEWCASTLE Newcastle UK
GL51 6PL 85 Golf Road Swindon Swindon UK
TN30 8YG 5 Bootham Terrace Reading Berkshire UK
TN30 6YX 93 Bootham Terrace Reading Berkshire UK
7004732 46 Woodland Avenue Destrehan Louisiana USA
Primary Key NOT NULL NOT NULL NOT NULL
INDEX ORGANISED
TABLE

Credit Card table

Credit Card Card_Number Card Firstname Surname Expire Security_Number Postcode


ID
NUMBER(8,0 VARCHAR2(20 VARCHAR2(2 VARCHAR2(2 VARCHAR2(2 VARCHAR2( VARCHAR2(3 VARCHAR2(10
) BYTE) 0 BYTE) 0 BYTE) 0 BYTE) 4 BYTE) BYTE) BYTE)
1 555413587755068 MasterCard Harley Garner 0220 421 Rg298r5
4
2 538773244432672 MasterCard Danielle Bruce 0917 809 SE23 7TT
2

Nathan Gajewski 100246576


70

3 453907370804320 MasterCard Bethany Wilkins 0621 447 SA62 5DW


2
4 527919207574564 Visa Miller Tegan 0217 604 GL51 6PL
4
5 448569385855497 VISA Carter Maya 1021 146 TN30 8YG
3
6 512469091813414 MasterCard Owen Ball 0921 668 TN30 6YX
7
7 533684992799722 MasterCard Erin Davis 0921 467 70047
5
Primary Key NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL Foreign Key
UNIQUE KEY
Index Index Composite Index

Booking Lecture

Lecture_booking_ID Customer ID Lecture ID Date_booked

NUMBER(8,0) NUMBER(8,0 NUMBER(8,0) TIMESTAMP(6)


)
1 1 1 13-10-16 12.03.39.710000000
2 2 1 13-10-16 11.01.39.710000000
3 3 1 13-10 -16 10.03.39.71000000

Nathan Gajewski 100246576


71

4 4 1 13-10-16 21.03.39.710000000
5 5 1 13-10-16 11.08.39.710000000
6 6 1 13-10-16 11.03.39.710000000
7 7 1 13-11-16 11.03.39.710000000
8 1 3 11-10-16 11.03.39.710000000
9 1 4 13-10-16 11.03.39.710000000
10 2 4 15-10-16 11.03.39.710000000
11 2 4 19-10-16 11.03.39.710000000
12 4 3 02-10-16 11.03.39.710000000
13 5 3 13-10-16 11.03.39.710000000
14 6 4 13-10-16 15.03.39.710000000
15 4 2 13-10-16 01.03.39.710000000
16 8 4 13-12-16 11.03.39.710000000
17 3 3 13-11-16 11.03.39.710000000
Primary Key Foreign Key Foreign Key NOT NULL
Index Index

Lecture Table - Referenced from Ted ( 2007,2008,2012,2013,2015)

Lecture ID S Description Price Title Starting Finishing Time Room ID


p Time
e
a
k
e
r
I
D

Nathan Gajewski 100246576


72

NUMBER(8,0) N VARCHAR2(800 BYTE) NUMBER(5,2) VARCHAR2(2 TIMESTAM TIMESTAMP(6) NUMBER(8,0)


U 00 BYTE) P(6)
M
B
E
R
(
8
,
0
)
1 1 Around the world, hundreds of thousands of lost 50.99 Archaeology 05-01-16 05-01-16 1
ancient sites lie buried and hidden from view. from space 11.00.00.7 1.00.00.71000000
Satellite archaeologist Sarah Parcak is determined 10000000 0
to find them before looters do. With the 2016 TED
Prize, Parcak is building an online citizen-science
tool called GlobalXplorer that will train an army of
volunteer explorers to find and protect the
world's hidden heritage. In this talk, she offers a
preview of the first place they'll look: Peru — the
home of Machu Picchu, the Nazca lines and other
archaeological wonders waiting to be discovered.

2 2 Paleoanthropologist Zeresenay Alemseged looks 25.00 The search 25-04-16 25-04-16 3


for the roots of humanity in Ethiopia's badlands. for 11.00.00.7 3.00.00.71000000
Here he talks about finding the oldest skeleton of humanity's 10000000 0
a humanoid child — and how Africa holds the roots
clues to our humanity.

Nathan Gajewski 100246576


73

3 3 Louise Leakey asks, "Who are we?" The question 10.00 A dig for 12-06-16 12-06-16 1
takes her to the Rift Valley in Eastern Africa, humanity's 2.00.00.71 3.00.00.71000000
where she digs for the evolutionary origins of origins 0000000 0
humankind — and suggests a stunning new vision
of our competing ancestors.

4 4 Backed by stunning illustrations, David Christian 100.25 The history of 15-09-16 15-09-16 2
narrates a complete history of the universe, from our world in 6.00.00.71 8.00.00.71000000
the Big Bang to the Internet, in a riveting 18 18 minutes 0000000 0
minutes. This is "Big History": an enlightening,
wide-angle look at complexity, life and humanity,
set against our slim share of the cosmic timeline.
Primary Key F NOT NULL NOT NULL NOT NULL NOT NULL Foreign Key
o
r
e
i
g
n
K
e
y
Index i index index index
n
d
e
x

Nathan Gajewski 100246576


74

Lecture Review

Lectur Lecture ID Review Help Unhelpful


e ful
Review
ID
NUMB NUMBER(8,0) VARCHAR2(2500 BYTE) NU NUMBER
ER(8,0) MBE
R
1 5 This is one of the most brilliant projects - ever! 0 0

An amazing snapshot of who we are and our place in the universe.

2 5 enjoyed your talk. how do chemicals and one celled creatures become multicellular? we are 3 0
studying complexity. apparently humans and their brains are at the next level of complexity.
we have created enormous bombs which are the only things we currently know of capable of
changing the orbit of an asteroid within a "short" time. or lacking enough time, fragment the
asteroid into pieces small enough to burn up in our atmosphere, or at least smaller than a life
extinction event. by the way, currently petrolium products are the only way to get out of
earth's gravity well. there are others once we get out there. but with a few small exceptions
(maybe alcohol can be modified or improved in some way. Lord knows we can produce large
quantities of that!) additionally, we are now discussing dismantling our weapons in fear that
we will destroy ourselves. but sometime in the next 60 000 years or so, we will be faced with

Nathan Gajewski 100246576


75

another Life Extinction Event. Hopefully by that time we will have graduated to the next level
of complexity and become the Earth's antibody system which can change the course or
fragment that asteroid which we know is on the way. will we have the tools we need?

Evolution is very funny. Actual smart people know it is the biggest lie and fantasy ever forced 0 4
as fact. The internet and digital communications was created by intellectual design, not
chance. The complex things he of speaks have no chance in such an expanding and rough
environment. The complex elements and molecules he speaks of, when researched NOT
assumed as to just happening, could not possibly have...evolved. The elements, Atoms and
such, are, VERY complex, yet, somehow they just...appeared. Atoms have always been as they
are now: the laws of physics says so. They were never weaker or soupy like. There is no
evidence for it. Then, matter, from nowhere, the Big Bang just happened. All the elements,
complex matter, just came to be. Okay. Through evidence, we know a simple book must have
been created by smart design--yes, some one had to create it. Yet, Atoms and cells, DNA/RNA,
a very, very astronomically diverse and vast in scope system, which all of it exists in precise
order and governed by exact laws, information larger than many New York City Libraries
combined, all in order by cover and alphabetically, chapter, page, paragraph, word, letter, by
chance came to be. Everyone knows God created the universe. When astronauts look for
extraterrestrial life, what are they looking for to make them believe there is such life out
there? Their words are they need intelligent signs of information, otherwise there is no
attempt in reaching out. Yet, again, life and the universe have stored in it so much complex
and very informative information, but of course, THAT was chance. Evolution is no science but
it counters science.
Primar Foreign Key NOT NULL
y Key
INDEX INDEX

Nathan Gajewski 100246576


76

Speaker Table - Referenced from Ted ( 2007,2008,2012,2013,2015)

Speaker Speaker Description Picture


ID
NUMBE VARCHAR2(1 VARCHAR2(2500 BYTE) VARCHAR2(150
R(8,0) 00 BYTE) BYTE)
1 Sarah Parcak Parcak was inspired by her grandfather, an early pioneer of aerial photography. While studying Egyptology in www.history.com
college, she took a class on remote sensing and went on to develop a technique for processing satellite data to see /speaker/picture
sites of archaeological significance. She wrote the first textbook on satellite archaeology, which allows for the /SarahParcak.jpe
discovery of new sites in a rapid and cost-effective way. In Egypt, her techniques have helped locate 17 potential g
pyramids, in addition to 3,100 forgotten settlements and 1,000 lost tombs. She's also made major discoveries in
the Viking world and Roman Empire, and appeared in the BBC documentary Rome’s Lost Empire and the PBS Nova
special, Vikings Unearthed.
2 Zeresenay Born in Axum, Ethiopia, Alemseged is based in San Francisco at the California Academy of Sciences where is is the www.history.com
Alemseged Director and Curator of the Anthropology department. Prior to this, he was a senior researcher at the Max Planck /speaker/picture
Institute for Evolutionary Anthropology in Leipzig. To see more video from Alemseged, visit the video archives of /
Nature. ZeresenayAlemse
ged .jpeg
3 Louise Louise Leakey is the third generation of her family to dig for humanity's past in East Africa. In 2001, Leakey and www.history.com
Leakey her mother, Meave, found a previously unknown hominid, the 3.5-million-year-old Kenyanthropus platyops, at /speaker/picture
Lake Turkana -- the same region where her father, Richard, discovered the "Turkana Boy" fossil, and near /LouiseLeakey.jp
Tanzania's Olduvai Gorge, where her grandparents, Louise and Mary Leakey, discovered the bones of Homo eg
habilis.
4 David David Christian is by training a historian of Russia and the Soviet Union, but since the 1980s he has become www.history.com
Christian interested in world history on very large scales. He has written on the social and material history of the 19th-century /speaker/picture
Russian peasantry, in particular on aspects of diet and the role of alcohol. In 1989, he began teaching courses on "Big /
History," surveying the past on the largest possible scales, including those of biology and astronomy. DavidChristian.jp
eg

Nathan Gajewski 100246576


77

5 Genevieve Genevieve von Petzinger is a Canadian paleoanthropologist and rock art researcher finishing up her doctorate at the www.history.com
von Petzinger University of Victoria. She studies some of the oldest art in the world -- Ice Age cave art created by early humans in /speaker/picture
Europe between 10,000 and 40,000 years ago. /
GenevievevonPet
zinger .jpeg
6 Jennifer Lee Jennifer 8. Lee is a reporter for the New York Times, starting with the paper as a tech writer for the Circuits section. www.history.com
She's now a metropolitan reporter for the paper, turning in sparkling and intricately reported stories of city life. NPR /speaker/picture
called her a "conceptual scoop" artist -- finding and getting details on new lifestyle trends that we all want to talk / JenniferLee.jpeg
about.
7 John Graham- John Graham-Cumming received his Ph.D. in computer security from Oxford University. A peripatetic programmer, www.history.com
Cumming he has worked in Silicon Valley, New York, the UK, Germany and France. In 2004, his open source POPFile program /speaker/picture
won a Jolt Productivity Award. He has authored two books: The Geek Atlas, a travel companion for math and science /JohnGrahamCu
history enthusiasts; and GNU Make Unleashed, a guide for programmers. In 2009, he spearheaded a successful mming .jpeg
petition to the British Government demanding an apology for its persecution of Alan Turing for his homosexuality.
His personal blog was rated among the "top 30 science blogs" by The Times in February 2010. And in October, 2010,
he founded an organization dedicated to build Charles Babbage's famous analytical engine.
8 Frances Oxford anthropologist Frances Larson wrote Severed: A History of Heads Lost and Heads Found. The book, which she www.history.com
Larson describes as a survey of our “traditions of decapitation,” was published in 2014, just before beheadings sadly started /speaker/picture
populating the front pages of the news once more. She previously wrote an acclaimed biography of Sir Henry /FrancesLarson.jp
Wellcome. eg
Primary NOT NULL
INDEX INDEX

Nathan Gajewski 100246576


78

Tour Table

Tour ID site Prices Spaces Time start Time Finish Meeting Point ID
NUMBER VARCHAR2(200 NUMBER(5,2) NUMBE TIMESTAMP( TIMESTAMP( NUMBER(8,0)
(8,0) BYTE) R(3,0) 6) 6)
1 Roman Baths 250.99 32 2016-01-10 2016-01-13 1
13:00:00 16:00:00
2 Beaumaris Castle 100.00 15 2016-03-15 2016-03-17 2
9:00:00 13:00:00
3 Windsor Castle 50.99 50 2016-11-11 2016-11-16 1
9:00:00 9:00:00
4 Somme battlefields 200.00 25 2016-11-10 2016-11-15 4
13:00:00 13:00:00
5 Fort Douaumont 180.00 20 2016-12-10 2016-12-13 2
13:00:00 13:00:00

Nathan Gajewski 100246576


79

Primary Foreign key NOT NULL NOT NOT NULL NOT NULL Foreign Key
Key NULL

Booking Tour

Tour Booking Tour ID Customer_id Tour guide ID Date_booked


ID
NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) TIMESTAMP(6)
1 1 2 1 2016-01-10 13:00:00
2 3 4 1 2016-11-11 9:00:00
3 4 5 2 2016-10-11 9:00:00
Primary key Foreign Key Foreign Key Foreign Key NOT NULL
Index Index Index Index Index

Tour Location

Site Address City Country ID


VARCHAR2(200 BYTE) VARCHAR2(30 BYTE) VARCHAR2(30 BYTE) NUMBER(8,0)
Roman Baths Church Yard Bath 1
Beaumaris Castle Castle Street Beaumaris 1
Windsor Castle Windsor Castle Windsor 1
Somme battlefields Peronne Somme 2

Nathan Gajewski 100246576


80

Fort Douaumont Fort Douaumont, Off Verdun-sur-Meuse 2


Route D913
Primary key NOT NULL NOT NULL Foreign Key
Index Index

Country

Country ID Country
NUMBER(8,0) VARCHAR2(50 BYTE)
1 England
2 France
Primary Key Unique , NOT NULL
INDEX ORGANISED TABLE

Meeting Point

Meeting Point ID Meeting Point


NUMBER(8,0) VARCHAR2(100 BYTE)
1 At the corner of the main road.
2 At entrance 1.
3 At exit 1 of the airport
Primary Key Unique , NOT NULL
INDEX ORGANISED TABLE

Nathan Gajewski 100246576


81

Tour Days

Day ID Monday Tuesday Wednesday Thursday Friday Saturday Sunday


NUMBER(8,0) NUMBER(1,0) NUMBER(1,0) NUMBER(1,0) NUMBER(1,0) NUMBER(1,0) NUMBER(1,0) NUMBER(1,0)
1 1 1 1 1 1 1 1
2 0 0 0 0 0 1 1
3 1 1 1 1 1 0 0
Primary Key NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL NOT NULL
Bit map index

Tour time

Time ID Time
NUMBER(8,0) VARCHAR2(100 BYTE)
1 9:30am-5pm
2 9:30am-4pm (Sundays 11am-5pm)
3 24 hours
4 10am-1pm and 2pm-5pm
Primary key NOT NULL, UNIQUE
INDEX ORGANISED TABLE

Tour Closing

Closed ID Time closed


NUMBER(8,0) VARCHAR2(100 BYTE)
1 25-26 Dec

Nathan Gajewski 100246576


82

2 24-26 Dec and 1 Jan


3 All year round
Primary Key Unique, NOT NULL
Index Organized Table

Historical Data - Tour Information Referenced from Historvius( 2015)

site Period Date_r Description Locatio Day ID Close Picture


_id ange n ID d ID
VARC NUMB VARCH VARCHAR2(2500 BYTE) NUMB NUMB NUM VARCHAR2(150
HAR2 ER(8,0) AR2(10 ER(8,0) ER(8,0) BER(8 BYTE)
(150 0 ,0)
BYTE) BYTE)
Rom 1 0AD - The world famous Roman Baths complex in Bath, UK, contains an incredible set of thermal spas and an 1 1 1 www.history.com
an 99AD impressive ancient Roman bathing house. /tour/picture/
Baths RomanBaths.jpeg
First discovered in the nineteenth century, the Roman Baths are one of the best preserved ancient
Roman sites in the UK and form a major tourist attraction.

Among the best known ancient baths in the world, the Romans Baths were initially built as part of the
town of Aqua Sulis, which was founded in 44 AD. Vast and lavish, the baths were able to
accommodate far more people than just the residents of this town and were intended as a place for
people to visit from across the Empire. As with other bath complexes of the time, the Roman Baths at
Bath were a focal point for the town, a place to socialise and even a religious site.

Today, the Roman Baths offer an incredibly comprehensive insight into the lives of the ancient Romans
in the town and around Britain. The site looks quite small from the outside, but it is actually vast and a
visit can last several hours.

One of the first things one sees upon entering the site is a view from the terrace above the Great Bath.
Overlooked by nineteenth century statues of various Roman icons, this is the centrepiece of the site
and a first glimpse into what lies ahead. Later on in the tour, visitors arrive at the Great Bath, where it

Nathan Gajewski 100246576


83

is possible to stand right alongside the water. There are even costumed characters on site to create an
authentic mood and entertain young children.

The sacred spring is next along the tour. Visible through a floor to ceiling window, visitors can view the
original spring of hot water, which was dedicated to Minerva due to its believed healing powers. The
spring was also a place of worship and the place where people threw coins, curses, wishes and
prayers. Many of these messages can be seen at the Roman Baths and range from the humorous to
the sinister.

The Temple and the Temple Courtyard were sacred places at the Baths from the late first century until
391 AD, when the Temple was closed by Emperor Theodosius as Christianity rose to become the
Empire’s state religion. Walking through the Temple Courtyard, videos are shown to demonstrate what
this once magnificent site would have looked like and how it was used. It is also here that one can see
the gilded bronze statue of the head of Minerva.

Amongst the other sites at the Roman Baths, there is a comprehensive museum dedicated to exploring
the lives of the ancient Roman citizens of Bath and an ancient drain used as an overflow system.
Around the Great Bath itself, visitors can explore the numerous saunas, swimming pools, heated baths
and changing facilities at the site.

Beau 2 1200A Beaumaris Castle is an incomplete but nonetheless striking medieval castle on the Isle of Anglesey 2 1 2 www.history.com
maris D - built by King Edward I. /tour/picture/Be
Castl 1299A aumarisCastle.jp
e D Begun in 1295, this was the last of the king’s ring of castles which he commissioned so as to affirm his eg
conquest of Wales. Designed to be the largest of this imposing circle, Beaumaris Castle was never
completed.

Despite its unfinished state, Beaumaris Castle did play a military role, being besieged and captured by
Prince of Wales Owain Glyn Dwron in 1403 before being retaken by the English in 1405. Charles I also
used it as a base for moving supplies and troops during the English Civil War.

Nathan Gajewski 100246576


84

Today, the picturesque ruins of Beaumaris Castle offer a glimpse into its real and potential grandeur.
Together with three of Edward’s other Welsh strongholds, Beaumaris Castle is a UNESCO World
Heritage site.
Wind 3 1000A Windsor Castle is the oldest occupied castle in the world. Covering an area of approximately 13 acres, 3 1 2 www.history.com
sor D - it contains a wide range of interesting features. These include the State Apartments, Queen Mary’s /tour/picture/
Castl 1099A dolls house and the beautiful St George’s Chapel. It is also the burial place of ten monarchs, including WindsorCastle.jp
e D Henry VIII and his beloved wife (the one who gave him a son), Jane Seymour. eg

The building of Windsor Castle began in the 1070s at the behest of William the Conqueror, with the
intent that it was to guard the western approach to London. Since that time, the structure of Windsor
Castle has been embellished by many of the monarchs of England and the UK. Notably, in the 1170s,
Henry II (the first Plantagenet) rebuilt most of the castle in stone instead of wood, including the round
tower and the upper ward, where most monarchs have had their private apartments since the 14th
century.

In the mid-fourteenth century, Edward III, who had recently founded the Order of the Garter, built St
George’s Hall at Windsor Castle for the use of the knights of this Order. A further addition, St George’s
Chapel, was started by Edward IV, but was not finished until the time of Henry VIII. It is here that the
ten British monarchs lie buried.

During the English Civil War, Windsor Castle served as a prison and it was to St George’s Chapel that
the body of Charles I was brought for burial after his execution. Charles II and George IV (formerly the
Prince Regent) made further contributions to the architecture of Windsor Castle in the 1650s and
1820s respectively.

Queen Victoria and Prince Albert loved Windsor castle, and Prince Albert died there of typhoid in
1861. Queen Victoria built a mausoleum in the grounds of the castle, Frogmore, where Albert and
later Victoria herself were buried.

In the Second World War, Windsor Castle became home to our present Queen, Elizabeth II, and her
family, George VI, the (future) Queen Mother and Princess Margaret. It remains a favourite home of
Queen Elizabeth, and she spends most of her weekends there. There was a huge fire at the castle in

Nathan Gajewski 100246576


85

November 1992 which took 15 hours and one and half a million gallons of water to extinguish. It
began in the Private Chapel and soon spread to affect approximately one fifth of the area of the castle.
It took five years to restore the Castle, and it was finished by the end of 1997.

There are numerous exhibitions and tours at Windsor Castle. In fact, a typical visit can take up to three
hours. This site features as one of our Top Ten UK Tourist Attractions.

Som 4 1900A The Circuit of Remembrance is a route touring the Somme battlefields in France. The Battle of the 4 1 3 www.history.com
me D - Somme was an infamous First World War battle from July to November 1916, renowned for the /tour/picture/
battl 1930A controversial tactics employed by British forces and the exceptional number of casualties borne by the Somme.jpeg
efield D Allied forces.
s
A Flawed Plan
With the Allied and German forces in France deadlocked in trenches, British commanders planned to
break the stalemate by destroying the German trenches and then having the British soldiers slowly
walk across no-man’s land to capture them. This plan proved disastrous. Firstly, both the British troops
and the French forces were already massively weakened by previous battles. This meant fewer French
soldiers along the front line and that the remaining British soldiers were inexperienced volunteers,
brought in to repopulate the depleted army.

Secondly, the plan was inextricably flawed. Not only did the extensive preparation by the British and
the ongoing bombardment alert German forces to the upcoming attack, but the bombing raids and
shelling barely dented the German fortifications. Therefore, when the soldiers started making their
way across France’s muddy plains to the enemy lines, the Germans were prepared. Those who
managed to make their way to the German trenches were then forced to try and return, unable to
scale the barbed wire.

Fort 4 1885 Fort Douaumont (Fort de Douamont) was originally constructed in around 1885 following the Franco- 5 1 3 www.history.com
Doua AD - Prussian wars, with ongoing works carried out until just before the First World War. /tour/picture/For
umo 1930A tDouaumont.jpeg

Nathan Gajewski 100246576


86

nt D As a fully fortified structure with sophisticated weaponry and a sunken position on high ground, Fort
Douaumont was considered to be a vital defensive post. However, when the Battle of Verdun
commenced in February 1916, the village of Douaumont was in chaos. People went to shelter in Fort
Douaumont but, in the confusion, nobody was firing the fort’s guns. German soldiers managed to
infiltrate Fort Douaumont and its destruction ensued.

Today, visitors can see Fort Douaumont as it was at the end of World War One. You can take a tour
through its three levels and see the guns, turrets and weaponry which remain. Despite the
destruction, much of Fort Douaumont is well preserved including the barrack rooms and command
posts. There is also a graveyard.
Prim Foreig NOT NOT NULL Foreig Foreig Foreig
ary n Key NULL n Key n Key n Key
Key

Index index

Period Table

Period ID Period

NUMBER(8,0) VARCHAR2(50 BYTE)

Nathan Gajewski 100246576


87

1 Ancient Rome
2 High Medieval
3 Normans
4 World War One
Primary Key NOT NULL, UNIQUE
INDEX ORGANISED TABLE

Tour Review

Review ID Tour Customer ID Review Date Helpfu Unhelpful


ID l
NUMBER(8,0) NUMB NUMBER(8,0) VARCHAR2(2500 BYTE) TIMESTAMP(6 NUMB NUMBER(3,0)
ER(8,0 ) ER(3,0
) )
1 1 3 The audio guides are really good, there's loads to see and, 2016-02-11 5 0
although much of it has been reconstructed, it still feels like 9:00:00
you've walked into a Roman bath house. The only thing I'd say
is that the site is deceptively large - I didn't expect to spend as

Nathan Gajewski 100246576


88

much time there as we did (2 hours or so)!


2 3 4 Windsor castle is one of the best castles to visit due to how 2016-04-11 3 0
well maintained it is as it is still occupied. There is a lot to see 9:00:00
within the castle walls and well worth a visit. It is a good idea
to check visiting dates before travelling as it does close for
occasions such as state visits.
Primary Key Foreig Foreign Key NOT NULL NOT NULL
n Key
Index Index index index

Tour Rating Table

Tour Rating ID Tour ID Customer ID Rating


NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(1,0)
1 1 3 5
2 3 4 5
Primary Key Foreign Key Foreign Key NOT NULL
Index Index index

Tour Guide

Tour Guide ID Name Description Language Picture


NUMBER(8,0) VARCHAR2(100 VARCHAR2(2500 BYTE) VARCHAR2(300 BYTE) VARCHAR2(150 BYTE)
BYTE)
1 Jane Smith I am a professional Blue Badge Tourist Guide qualified English(primary) www.history.com/speaker/pi
to guide throughout the whole of London & South East cture/JaneSmith.jpeg
England providing quality tours customised to your
requirements. I have combined my earlier career
experiences with my best loved interests to present the
delights of the region in an entertaining & informative
style.

Nathan Gajewski 100246576


89

As a holder of the coveted Blue Badge I have the added


privilege of being entitled to guide within the Tower of
London, Westminster Abbey, Canterbury Cathedral,
Windsor Castle and many other historic royal palaces.

It's the region's social history that really excites me -


how people lived in other times, the land and
cityscapes they developed and the contrasts with
today's lifestyles.

My specialities include London highlights, Tudor Royalty


in South East England especially the life and times of
King Henry VIII from Hampton Court Palace to Hever
Castle; Canterbury, shore excursions from Dover and of
course, the glorious gardens of England.

I provide enjoyable and memorable tours by car, coach


and on foot, ranging from a few hours to several days,
for individuals, private groups and tour companies.

2 Andree Duchamp I am a full-time qualified guide and tour manager, French (primary) www.history.com/speaker/pi
mainly with English-speaking visitors but also Spanish English (Fluent) cture/AndreeDuchamp.jpeg
and French. Spanish (Fluent)
FAMILY FRIENDLY : my itineraries and activities are German (Basic)
adapted to families with children or teenagers, so that
adults and younger ones can have fun and still learn
and discover together.
FOOD & DRINKS : this is such an important aspect of a
trip abroad ! I will make sure you get to taste a local
specialty and recommend places to eat or specialties to
try !

Nathan Gajewski 100246576


90

LEARN/IMPROVE YOUR FRENCH : You can also join


tours for individuals/groups who want the visit in
French language, but adapted to their level. This
includes a French "lesson" and gives the opportunity to
practice in a relaxed atmosphere and in real situations,
with small and fun exercices
Primary Key NOT NULL NOT NULL NOT NULL
INDEX

Tour guide Rating


Tour Guide Rating ID Tour_guide_ ID Customer ID Rating
NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(1,0)
1 1 3 5
2 1 4 5
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX
Tour Guide Review

Review ID Tour Customer ID Review Date Helpfu Unhelpful


Guide l
ID
NUMBER(8,0) NUMB NUMBER(8,0) VARCHAR2(2500 BYTE) TIMESTAMP(6 NUMB NUMBER(3,0)
ER(8,0 ) ER(3,0
) )
1 1 3 Our 3 day tours with Jane Smith have been the best! We 2016-02-11 3 0
covered a lot without feeling rushed but moved along to see 10:00:00
quite a bit of locations. She's very knowledgable and kept my 3
boys (ages 9, 14 & 16) interested and engaged. Taking a tour
with Jane is like reading a great book you can't put down... you
don't want the tour to end. She keeps giving you all theses
great tidbits of information that brings the area to life.

Nathan Gajewski 100246576


91

Primary Key Foreig Foreign Key NOT NULL NOT NULL


n Key
INDEX INDEX INDEX

Workshop Book info

Workshop Customer ID WorkShop ID Room ID Time ID Time Description ID Date


Book ID
NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) TIMESTAMP(6)
1 4 1 1 3 1 2016-01-
1110:00:00
Primary Key Foreign Key Foreign Key Foreign Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX INDEX

Workshop - Workshop information Referenced from Hotcourse (2015).

Workshop ID Na Description Price Level ID


me
NUMBER(8,0) VA VARCHAR2(2500 BYTE) NUMBER(5,2) NUMBER(8,0)
RC
HA
R2(
10
0
BY
TE)
1 Arc Archaeology of London: Explore the archaeology and history of London through 59.99 1
ha its cultural monuments, topography and material remains to more fully

Nathan Gajewski 100246576


92

eol appreciate the rich archaeological evidence of the capital.


og
y
of
Lo
nd
on
2 Int Introduction to Archaeology: Basic techniques, Approaches and Controversies: 102.00 1
rod
uc This practically orientated course offers hands-on experience of a wide range of
tio basic techniques, including artefact handling, site survey, aerial photographic
n interpretation and transcription, principles of geophysical survey, excavation and
to post-excavation analysis. Through these experiences we will explore the basic
Arc tenets of archaeology, including the main methods of discovering, dating and
ha investigating archaeological evidence as well as debating the issues (and
eol controversies) involved in its interpretation. This course is delivered through
og partnership with the Museum of London Archaeological Archive and Research
y: Centre.
Bas
ic This course covers the following topics below: What is Archaeology? The Science
tec of Discovery; Site Survey: The basics; Seeing Beneath the Soil; Principles of
hni excavation; Dating and Chronology; Investigating the Ancient Environment; Post
qu Excavation Analysis; Exploring Artefacts and Archive Archaeology. By the end of
es, the course you should be able to handle archaeological artefacts safely, describe
Ap some of the methods used in archaeology and list the resources that might be
pro useful for planning a campaign of archaeological research
ach
es
an
d
Co
ntr

Nathan Gajewski 100246576


93

ov
ers
ies
Primary Key NO NOT NULL NOT NULL Foreign key
T
NU
LL
INDEX IN
DE
X

Level Table

Level ID Level Description


NUMBER(8,0) VARCHA VARCHAR2(500 BYTE)
R2(40
BYTE)
1 Beginne No prior knowledge is required. The material is taught so anyone from any educational level
r can understand the information and participate in the activities.
Primary KEY UNIQUE NOT NULL
, NOT
NULL
INDEX ORGANISED TABLE

Workshop time
Time ID Start Finish
NUMBER(8,0) TIMESTAMP(6) TIMESTAMP(6)
1 2016-02-1110:00:00 2016-04-2110:00:00
Primary KEY NOT NULL NOT NULL
INDEX COMPOSITE INDEX

Nathan Gajewski 100246576


94

Workshop Time Description

Time Description ID Description


NUMBER(8,0) VARCHAR2(500 BYTE)
1 Saturday 3:30pm - 5:30pm
Monday & Wednesday 6:00pm - 8:00pm
Primary Key Unique , NOT NULL
INDEX ORGANISED TABLE

Workshop Rating

Workshop Rating ID Workshop ID Customer ID Rating


NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(1,0)
1 2 8 2
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX

Nathan Gajewski 100246576


95

Workshop Review

Workshop Review ID Works Customer ID Review Date Helpfu Unhelpful


hop ID l
NUMBER(8,0) NUMB NUMBER(8,0) VARCHAR2(2500 BYTE) TIMESTAMP(6 NUMB NUMBER(3,0)
ER(8,0 ) ER(3,0
) )
1 2 8 It was alright. I learned some useful "facts and figures". 1 2 8
Unfortunately I found the tutor very patronising. He seemed to
only have time for you if you had just finished an MA or were
just about to do one. One of those campus types who wants to
be in with the young 'n (supposedly) trendy in crowd.
Whatever that is.
Primary Key Foreig Foreign Key NOT NULL NOT NULL
n Key
INDEX INDEX INDEX

Room

Room ID Room Number Building


NUMBER(8,0) NUMBER(3,0) VARCHAR2(1 BYTE)
1 101 A
2 102 A
3 105 A
4 205 A
5 208 A
6 302 A
7 101 B
8 108 B
9 109 B

Nathan Gajewski 100246576


96

10 208 B
11 301 C
Primary Key NOT NULL NOT NULL
INDEX ORGANISED TABLE

Book Location

Book Location Store Description Postcode


ID
NUMBER(8,0) VARCHAR2(100 VARCHAR2(2500 BYTE) VARCHAR2(10
BYTE) BYTE)
1 Anderson's Anderson's has a wide array of books, well displayed. But, more than simply retailing books, it's woven 8478696999
Bookshop into the fabric of Naperville. Not only does the store coordinate the annual Naperville Reads program,
but it also hosts the city library's book group meetings. Not only do staffers work with 120 local book
clubs, but, twice a year, the store outlines for representatives from those clubs the major titles coming
out from publishers. Annually, Anderson's presents about 350 in-store and in-school author
appearances, roughly one a day. The close relationship of the store and community goes back more than
a century. Since 1875, its owners, the Anderson family, have had one business or another in town.
2 The Book Stall Service is key in this 75-year-old general-interest shop serving the affluent North Shore suburbs. Free gift- 8474468880
wrapping is available all year round. When a parent or grandparent enrolls a child in the store's book club
(now with a membership of 250), each month a new book is hand-selected and sent to that child's home.
Each week, the store organizes as many as a dozen author appearances
3 Centuries & One side of the store is all mysteries. The other side, all history books. But this is more than a bookstore. 7087717243
Sleuths Just look at the old church pew in the center of the store. Nailed into the wood are three small metal
plates, each a remembrance of a store customer who has died. Owner Augie Aleksy likes -- really likes -- his
customers, and the feeling is mutual
Primary KEY NOT NULL Foreign Key
INDEX INDEX

Booking Book

Nathan Gajewski 100246576


97

Booking Book ID Customer ID ISBN-13 Date Booked


NUMBER(8,0) NUMBER(8,0) NUMBER(13,0) TIMESTAMP(6)
1 6 1 2016-09-2910:00:00
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX INDEX

Book

ISBN-13 Title Category ID First Name Description Price


NUMBER(13,0) VARCHAR NUMBER(8,0) VARCHAR2(100 BYTE) VARCHAR2(2500 BYTE) NUMBER(4,2)
2(150
BYTE)
9780393234016 Rogue 1 Ben Britain’s Special Air Service—or SAS—was the 10.99
Heroes brainchild of David Stirling, a young, gadabout
aristocrat whose aimlessness in early life belied a
remarkable strategic mind. Where most of his
colleagues looked at a battlefield map of World
War II’s African theater and saw a protracted
struggle with Rommel’s desert forces, Stirling saw
an opportunity: given a small number of elite,
well-trained men, he could parachute behind
enemy lines and sabotage their airplanes and war
material. Paired with his constitutional opposite,
the disciplined martinet Jock Lewes, Stirling
assembled a revolutionary fighting force that
would upend not just the balance of the war, but
the nature of combat itself. He faced no little
resistance from those who found his tactics
ungentlemanly or beyond the pale, but in the
SAS’s remarkable exploits facing the Nazis in the
Africa and then on the Continent can be found the
seeds of nearly all special forces units that would

Nathan Gajewski 100246576


98

follow.

Bringing his keen eye for psychological detail to a


riveting wartime narrative, Ben Macintyre uses his
unprecedented access to SAS archives to shine a
light inside a legendary unit long shrouded in
secrecy. The result is not just a tremendous war
story, but a fascinating group portrait of men of
whom history and country asked the most.
978039334516 American 2 Ronald From the author of the New York Times bestseller 20.99
Ulysses: A A. Lincoln, a major new biography of one of
Life of America’s greatest generals—and most
Ulysses S. misunderstood presidents
Grant
In his time, Ulysses S. Grant was routinely grouped
with George Washington and Abraham Lincoln in
the “Trinity of Great American Leaders.” But the
battlefield commander–turned–commander-in-
chief fell out of favor in the twentieth century. In
American Ulysses, Ronald C. White argues that we
need to once more revise our estimates of him in
the twenty-first.

Based on seven years of research with primary


documents—some of them never examined by
previous Grant scholars—this is destined to
become the Grant biography of our time. White, a
biographer exceptionally skilled at writing
momentous history from the inside out, shows
Grant to be a generous, curious, introspective man
and leader—a willing delegator with a natural gift
for managing the rampaging egos of his fellow

Nathan Gajewski 100246576


99

officers. His wife, Julia Dent Grant, long


marginalized in the historic record, emerges in her
own right as a spirited and influential partner.

Grant was not only a brilliant general but also a


passionate defender of equal rights in post-Civil
War America. After winning election to the White
House in 1868, he used the power of the federal
government to battle the Ku Klux Klan. He was the
first president to state that the government’s policy
toward American Indians was immoral, and the first
ex-president to embark on a world tour, and he
cemented his reputation for courage by racing
against death to complete his Personal Memoirs.
Published by Mark Twain, it is widely considered to
be the greatest autobiography by an American
leader, but its place in Grant’s life story has never
been fully explored—until now.

9780393240016 A 2 Jane Boston in the 1740s: a bustling port at the edge of 32.99
Revolutio the British empire. A boy comes of age in a small
n in Color: wooden house along the Long Wharf, which juts
The World into the harbor, as though reaching for London
of John thousands of miles across the ocean. Sometime in
Singleton his childhood, he learns to draw.
Copley
That boy was John Singleton Copley, who became,
by the 1760s, colonial America’s premier painter.
His brush captured the faces of his
neighbors―ordinary men like Paul Revere, John
Hancock, and Samuel Adams―who would become
the revolutionary heroes of a new United States.

Nathan Gajewski 100246576


100

Today, in museums across America, Copley’s


brilliant portraits evoke patriotic fervor and
rebellious optimism.

The artist, however, did not share his subjects’


politics. Copley’s nation was Britain; his capital,
London. When rebellion sundered Britain’s
empire, both kin and calling determined the
painter’s allegiances. He sought the largest canvas
for his talents and the safest home for his family.
So, by the time the United States declared its
independence, Copley and his kin were in London.
He painted America’s revolution from a far shore,
as Britain’s American War.

An intimate portrait of the artist and his


extraordinary times, Jane Kamensky’s A
Revolution in Color masterfully reveals the world
of the American Revolution, a place in time riven
by divided loyalties and tangled sympathies. Much
like the world in which he lived, Copley’s life and
career were marked by spectacular rises and
devastating falls. But though his ambivalence cost
him dearly, the painter’s achievements in both
Britain and America made him a towering figure of
both nations’ artistic legacies.
Primary Key NOT NULL Foreign Key NOT NULL NOT NULL NOT NULL
INDEX INDEX Composite Index

Book and Magazine Category

Category ID Category

Nathan Gajewski 100246576


101

NUMBER(8,0) VARCHAR2(50 BYTE)


1 World War II
2 American Civil War
Primary KEY UNIQUE, NOT NULL
INDEX ORGANISED TABLE

Book Review

Book Rating ID ISBN-13 Customer ID Review Date Helpfu Unhelpful


l
NUMBER(8,0) NUMBE NUMBER(8,0) VARCHAR2(2500 BYTE) TIMESTAMP(6) NUMB NUMBER(3,0)
R(13,0) ER(3,0
)
1 1 6 This book looks at the Special Air Service, a unit 2016-10-2910:00:00 12 2
organized in North Africa during WWII for the purpose
of conducting sustained raids deep behind enemy lines
and collecting intelligence. From its humble beginnings
under David Sterling to its use in France to slow down
German reinforcements attempting to reach the
Normandy bridgehead, the SAS story is told by
MacIntyre in the only way practical: through the stories
of the men who were its members. From David
Sterling, with the contradictions of his character to
Paddy Mayne, a man bedeviled by internal demons and
driven to drink, MacIntyre tells the story of men who
were often flawed but committed, who were tough but
had weaknesses, and who were pioneers in a new field
of military endeavor which required new thinking and
new tactics. Sometimes, the SAS was treated as a
commando unit or some special elite unit and given
battlefield roles for which they were unsuited (such as
at Termoli) and suffered casualties accordingly. But

Nathan Gajewski 100246576


102

when given missions for which they had experience


and had planned for they could be devastating. They
lived up to their motto "Who Dares, Wins
Primary Key Foreign Foreign Key NOT NULL NOT NULL
Key
INDEX INDEX INDEX

Book Rating

Book Rating ID ISBN-13 Customer ID Rating


NUMBER(8,0) NUMBER(13,0) NUMBER(8,0) NUMBER(1,0)
1 1 6 5
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX

Magazine

Magazine ID Name Description Magazine a month


NUMBER(8,0 VARCHAR2(100 VARCHAR2(500 BYTE) NUMBER(2,0)
) BYTE)
1 History Today History Today covers all civilizations and timeframes, and at over 50 years old, is the oldest 2
and most prominent history publication in the UK
2 Family Tree For those interested in tracing their ancestry and reading stories of others' genealogy, Family 1
Tree provides insightful experiences of others who've explored their family roots.
3 Archaeology For anyone who wants to explore the mysteries of fossils, bones, and other archaeological 1
finds, Archaeology is a magazine that covers this intriguing field.
Primary Key NOT NULL NOT NULL NOT NULL
INDEX INDEX

Duration

Nathan Gajewski 100246576


103

Duration ID Duration Discount


NUMBER(8,0) NUMBER(3,0) NUMBER(3,0)
1 6 0
2 12 10
3 24 20
Primary index UNIQURE,NOT NULL UNIQUE, NOT NULL
INDEX ORGANISED TABLE

Magazine Purchase

Magazine Customer ID Magazine Duration ID Date Booked


Purchase ID
ID
NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) TIMESTAMP(6)
1 2 1 2 2016-09-2911:00:00
Primary Key Foreign Key Foreign Key Foreign Key
INDEX INDEX INDEX INDEX

Magazine Review

Magazine Magazine ID Customer ID Review Date Helpful Unhelpful


Rating ID
NUMBER(8,0 NUMBER(8,0) NUMBER(8,0 VARCHAR2(250 TIMESTAMP(6) NUMBER(3,0) NUMBER(3,0)
) ) 0 BYTE)
1 1 2 I am really 2016-10- 1 0
happy with my 1511:00:00

Nathan Gajewski 100246576


104

subscription.
This month's
magazine was
really
interesting.
Primary Key Foreign Key Foreign Key NOT NULL NOT NULL
INDEX INDEX INDEX

Magazine rating

Magazine Rating ID Magazine ID Customer ID Rating


NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) NUMBER(1,0)
1 2 3 4
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX

Booking Family Tree

Family_tree_id Customer_id Hours_id Date_booked


NUMBER(8,0) NUMBER(8,0) NUMBER(8,0) TIMESTAMP(6)
1 3 2 02-04-2016
Primary Key Foreign Key Foreign Key NOT NULL
INDEX INDEX INDEX INDEX

Family Hours

Hours_id Hours Price


NUMBER(8,0) NUMBER(8,0) NUMBER(5,2)
1 10 50.99

Nathan Gajewski 100246576


105

2 20 99.99
3 50 150.99
4 100 180.99
Primary Key Unique , NOT NULL NOT NULL
Index Organized Table

Nathan Gajewski 100246576

You might also like