Python Classroom notes 12/Sep/2026

Lets design the Property listings

  • Entity Relationship image
    Preview

  • Mermaid form

erDiagram

    LOCATIONS {
        uuid id PK
        string city
        string locality
        string state
        string description
        uuid created_by
        timestamp created_at
        uuid updated_by
        timestamp updated_at
    }

    PROPERTIES {
        uuid id PK
        uuid location_id FK
        string title
        property_type property_type
        furnishing furnishing
        status status
        int bedrooms
        numeric monthly_rent
        numeric security_deposit
        int carpet_area_sqft
        date available_from
        uuid created_by
        timestamp created_at
        uuid updated_by
        timestamp updated_at
    }

    PROPERTY_IMAGES {
        uuid id PK
        uuid property_id FK
        string url
        int position
        uuid created_by
        timestamp created_at
        uuid updated_by
        timestamp updated_at
    }

    PROPERTY_AMENITIES {
        uuid property_id PK, FK
        uuid amenity_id PK, FK
        uuid created_by
        timestamp created_at
        uuid updated_by
        timestamp updated_at
    }

    AMENITIES {
        uuid id PK
        string name UK
        uuid created_by
        timestamp created_at
        uuid updated_by
        timestamp updated_at
    }

    LOCATIONS ||--o{ PROPERTIES : "has"
    PROPERTIES ||--o{ PROPERTY_IMAGES : "has"
    PROPERTIES ||--o{ PROPERTY_AMENITIES : "has"
    AMENITIES ||--o{ PROPERTY_AMENITIES : "assigned to"

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading