Schema der Movies Collection¶
Hier seht ihr, wie die Dokumente in der movies Collection aufgebaut sind.
Beispiel JSON¶
So sieht ein typischer Film in der Datenbank aus:
{
"_id": {
"$oid": "573a1399f29313caabce9682"
},
"title": "Guardians of the Galaxy",
"year": 2014,
"runtime": 121,
"genres": [
"Action",
"Adventure",
"Sci-Fi"
],
"cast": [
"Chris Pratt",
"Vin Diesel",
"Bradley Cooper"
],
"imdb": {
"rating": 8.1,
"votes": 753000,
"id": 2015381
},
"tomatoes": {
"viewer": {
"rating": 4.4,
"numReviews": 209848
},
"fresh": 273,
"rotten": 20
}
}
Struktur als Diagramm¶
Hier noch kurz als Übersicht visualisiert:
classDiagram
class Movie {
+ObjectId _id
+String title
+Integer year
+Integer runtime
+List genres
+List cast
+IMDB imdb
+Tomatoes tomatoes
}
class IMDB {
+Double rating
+Integer votes
}
class Tomatoes {
+Integer fresh
+Integer rotten
+ViewerRating viewer
}
Movie "1" *-- "1" IMDB
Movie "1" *-- "1" Tomatoes