Zum Inhalt

M165 NoSQL Datenbanken | Block 07

MoviesDB: Physisches Modell und Schema

avatar_3 = {
    "title": "Avatar 3 - Fire and Ash",
    "releaseDate": "2025-12-19",
    "genre": "Sci-Fi",
    "about": "After the events of 'The Way of Water', Jake Sully and Neytiri encounter a new, aggressive clan of Na'vi known as the 'Ash People', who are associated with volcanic environments.",
    "countries": ["USA"],
    "cast": ["Sam Worthington", "Zoe Saldaña", "Sigourney Weaver", "Oona Chaplin"],
    "writers": ["James Cameron", "Rick Jaffa", "Amanda Silver"],
    "directors": ["James Cameron"],
    "comments": [
        {
            "name": "Jake Sully",
            "email": "jake@pandora.com",
            "text": "Can't wait to see the Ash People!",
            "date": datetime.now()
        },
        {
            "name": "Neytiri",
            "email": "neytiri@forest.com",
            "text": "The fire will be dangerous.",
            "date": datetime.now()
        }
    ]
}
classDiagram
    class Movie {
        +String title
        +Date releaseDate
        +String genre
        +String about
        +String[] countries
        +String[] cast
        +String[] writers
        +String[] directors
    }

    class IMDB {
        +Number rating
        +Integer votes
    }

    class Tomatoes {
        +Integer fresh
        +Integer rotten
    }

    class RatingDetails {
        +Number rating
        +Integer numReviews
    }

    class Comment {
        +String name
        +String email
        +String text
        +DateTime date
    }

    Movie *-- IMDB : imdb
    Movie *-- Tomatoes : tomatoes
    Movie *-- "0..*" Comment : comments
    Tomatoes *-- RatingDetails : viewer
    Tomatoes *-- RatingDetails : critics

Testw