程序代写代做 go graph database CIS 240 HW 4

CIS 240 HW 4
Due Monday, November 4 2:00 PM
You may use the Beer database on the Principles of Database Management Playground Environment online OR create the database on your own system by running the Cypher code that is uploaded on Blackboard the data is the same.
Textbook Playground Environment instructions:
Go to www.pdbmbook.com. Click Playground Environment on the top navigator bar. You will need to create a free account by entering your email account and then using the link in the confirmation email. Then you should be able to logon to the Playground Enviroment. Click on the Beer database button under Try Cypher to open the browser with the Cypher command line and preloaded database.
Local Neo4j instructions:
Copy the text from the createbeer file into the command line on the Neo4j browser and run ControlEnter or click the triangle Run button.

A diagram of the graph model for the Beer database:
Person
Brewery
Beer
BeerType

For all questions, please submit a screenshot or other copy of the results table or graph described in the problem whether or not the output is shown in the problem description AND a copy of the Cypher code that you used to generate your output.
1. Create a graph of all Tripel beers that have an alcohol content higher than 0.09 and the beer drinkers who like them.

2. Create a list of all breweries that brew beers that Seppe likes, sorted by the number of liked beers from each, then alphabetically.
p.name
y.name
numbeersliked
Seppe
Affligem Brouwerij
4
Seppe
Brouwerij Roman
3
Seppe
Brouwerij Van Steenberge
3
Seppe
AB InBev
2
Seppe
Brouwerij De Halve Maan
2
Seppe
Brouwerij De Koninck DuvelMoortgat
2
Seppe
Brouwerij Huyghe
2
Seppe
Brouwerij De Kluis InBev
1
Seppe
Brouwerij Dubuisson
1
Seppe
Brouwerij Duvel Moortgat
1
Seppe
Brouwerij Haacht
1
Seppe
Brouwerij Lefebvre
1
Seppe
Brouwerij Lindemans
1
Seppe
Brouwerij Lupus
1
Seppe
Brouwerij Rodenbach
1
Seppe
Brouwerij Slaghmuylder
1
Seppe
Brouwerij Ter Dolen
1
Seppe
Brouwerij ValDieu
1
Seppe
Brouwerij d Achouffe
1
Seppe
Geuzestekerij 3 Fonteinen
1

3. Create a list of all beers that are brewed by one of Seppes Top Three breweries the first three from the list above that Seppe has not already liked.
for full points, write this code without hardcoding the names of the Top Three breweries
BeerRecommendation
TopThreeBrewery
Florival Bruin
Affligem Brouwerij
Florival Tripel
Affligem Brouwerij
Wieze Tripel
Brouwerij Roman
Gentse Strop
Brouwerij Roman
Ename Dubbel
Brouwerij Roman
Ename Blond
Brouwerij Roman
Uitzet 1730
Brouwerij Van Steenberge
Vlaamsche Leeuw Blondje
Brouwerij Van Steenberge
Queueu de Charrue Triple
Brouwerij Van Steenberge
Spitfire Oud Balegems
Brouwerij Van Steenberge
Vlaamsche Leeuw Tripel
Brouwerij Van Steenberge
Augustijn Donker
Brouwerij Van Steenberge
Augustijn Blond
Brouwerij Van Steenberge
Bornem Dubbel
Brouwerij Van Steenberge
Bierbeekse
Brouwerij Van Steenberge
Abdij van Roosenberg Trip
Bl rouwerij Van Steenberge
Ledeberg Tripel
Brouwerij Van Steenberge
Kwets
Brouwerij Van Steenberge
Maerlant
Brouwerij Van Steenberge
Celis White
Brouwerij Van Steenberge
Bornem Tripel
Brouwerij Van Steenberge
Keizersberg
Brouwerij Van Steenberge
e

4. Create a new relationship called TOPTHREE for the edge between every beer drinker and each of their three Top Three Breweries. Top Three top three on list of breweries sorted by number of beers liked, then alphabetically. Seppes Top Three breweries are: Affligem Brouwerij, Brouwerij Roman, Brouwerij Van Steenberge
Create a graph showing the new relationship.

5. Which Brewery is on the most Top Three Lists?
6. Create a list of each beer drinker and the number of other beer drinkers with whom they have at least one brewery in common on their Top Three list.
name
numothers
Monique
4
Wilfried
4
Bart
4
Estefania
3
Jochen
3
Jan
2
Seppe
2