Skip to content

Latest commit

 

History

History
230 lines (218 loc) · 10.2 KB

File metadata and controls

230 lines (218 loc) · 10.2 KB

Diagrama Entidad-Relación - Modelo de Datos PLACSP

Este diagrama representa la estructura de datos extraída de las entradas de la Plataforma de Contratación del Sector Público (PLACSP), modelada para nuestra capa Silver del Data Lakehouse.

erDiagram
    BIDDINGS ||--o{ LOTS : "contiene"
    BIDDINGS ||--o{ DOCUMENTS : "incluye"
    BIDDINGS ||--o{ RESULTS : "genera"
    BIDDINGS ||--|| TERMS : "se rige por"
    BIDDINGS ||--|| PROCESS : "sigue un"
    BIDDINGS ||--o{ NOTICES : "publica"
    BIDDINGS ||--o{ MODIFICATIONS : "sufre"
    BIDDINGS }o--|| PARTIES : "licitado por"
    
    LOTS ||--|| TERMS : "puede tener específicos"

    PARTIES {
        string id PK "ID Plataforma Órgano"
        string name "Nombre Órgano"
        string NIF "NIF Órgano"
        string other_id "ID Alternativo Órgano"
        string DIR3 "Código DIR3"
        string agent_party_id "ID Agente"
        string public_sector_location "Ubicación sector público"
        string parent_level_1 "Dependencia primer nivel"
        string parent_level_2 "Dependencia segundo nivel"
        string web_uri "Web Órgano"
        string telephone "Teléfono Órgano"
        string fax "Fax Órgano"
        string email "Email Órgano"
        string buyer_profile_uri "URL Perfil Contratante"
        string type_code "Tipo Administración"
        string activity_type_code "Actividad Principal"
        array_string parent_parties "Jerarquía Organismos"
        string address "Dirección Órgano"
        string postal_code "CP Sede Órgano"
        string city "Ciudad Órgano"
        string country "País Órgano"
        string country_code "ISO País Órgano"
        boolean is_internal_entity "Medio Propio"
    }

    BIDDINGS {
        string sk_id PK "MD5(id || updated)"
        string id "URI oficial global"
        string link "URL publicación"
        string title "Título de la licitación"
        string summary "Resumen objeto contrato"
        timestamp updated "Fecha versión/borrado"
        boolean deleted "Flag eliminación"
        string deleted_comment_type "Tipo motivo borrado"
        string deleted_comment_value "Motivo borrado oficial"
        string contract_folder_id "Nº Expediente (4.2)"
        string contract_folder_status_code "Estado (4.1)"
        string TED_UUID "ID TED (4.49)"
        string project_name "Objeto contrato (4.3)"
        string project_type_code "Tipo contrato (4.7)"
        string project_subtype_code "Subtipo contrato (4.8)"
        boolean mixed_contract "Contrato mixto"
        float project_total_amount "Importe con IVA (4.4)"
        float project_tax_exclusive_amount "Importe sin IVA (4.4)"
        float project_estimated_amount "Valor estimado (4.4)"
        string project_currency "Moneda"
        date project_start "Fecha inicio (4.5)"
        date project_end "Fecha fin (4.5)"
        integer project_duration "Duración (4.5)"
        string project_duration_code "Unidad duración"
        string contract_extension "Prórrogas"
        string contract_extension_options "Detalle prórrogas"
        string CPV_classification_code "Código CPV (4.6)"
        string address "Dirección ejecución (4.10)"
        string postal_code "CP ejecución"
        string city "Ciudad ejecución"
        string country "País ejecución"
        string country_code "ISO País"
        string country_subentity "Provincia/CCAA"
        string country_subentity_code "Código NUTS"
        string contracting_party_id FK "Relación Órgano Contratación"
    }

    LOTS {
        string id PK "ID Lote"
        string sk_bidding_id FK "Relación Biddings"
        string num_lot "Nº Lote (4.11.1)"
        string name "Objeto lote (4.11.2)"
        float total_amount "Importe con IVA (4.11.3)"
        float tax_exclusive_amount "Importe sin IVA (4.11.3)"
        string CPV_classification_code "CPV lote (4.11.4)"
        string address "Dirección ejecución (4.11.5)"
        string postal_code "CP lote"
        string city "Ciudad lote"
        string country "País lote"
        string country_code "ISO País lote"
        string country_subentity "Provincia lote"
        string country_subentity_code "NUTS lote"
    }

    DOCUMENTS {
        string id PK "ID Documento"
        string sk_bidding_id FK "Relación Biddings"
        string document_type_code "Categoría (Legal, Tech...)"
        string document_type_code_description "Descripción categoría"
        string name "Nombre archivo físico"
        string uri "URL descarga"
        string hash "Hash integridad"
    }

    RESULTS {
        string sk_bidding_id FK "Relación Biddings"
        string id_lot FK "ID Lote (si aplica)"
        string result_type_code "Resultado (4.35.1)"
        float total_amount "Adjudicado con IVA (4.35.3)"
        float tax_exclusive_amount "Adjudicado sin IVA (4.35.3)"
        integer participating_parties "Licitadores (4.35.4)"
        date award_date "Fecha adjudicación (4.35.5)"
        string award_description "Motivación"
        float lower_offer_amount "Oferta mín (4.35.6)"
        float higher_offer_amount "Oferta máx (4.35.6)"
        boolean abnormally_low_offers "Ofertas temerarias"
        integer pyme "Ofertas PYME"
        integer EU "Ofertas UE"
        integer No_EU "Ofertas no UE"
        string project_id "ID Contrato (4.35.7)"
        date issue_date "Fecha formalización"
        date start_date "Fecha inicio ejec"
        float subcontract_rate "% Subcontratación (4.36)"
        string subcontract_description "Detalle subcontratación"
        string winning_party__id "NIF Ganador (4.35.2)"
        string winning_party_name "Nombre Ganador"
        boolean winning_party_pyme "Ganador es PYME"
        string winning_party_company_type_code "Forma jurídica"
        string winning_party_address "Dirección ganador"
        string winning_party_postal_code "CP ganador"
        string winning_party_city "Ciudad ganador"
        string winning_party_country "País ganador"
        string winning_party_country_code "ISO País ganador"
        string winning_party_country_subentity "Provincia ganador"
        string winning_party_country_subentity_code "NUTS ganador"
    }

    TERMS {
        string languages "Idiomas oferta (4.16)"
        timestamp terms_presentation_date "Plazo recursos (4.24.2)"
        boolean required_cv "CVs obligatorios (4.28)"
        boolean variant_constraint "Variantes (4.28)"
        string price_revision_formula "Revisión precios"
        string founding_program "Programa UE (4.28.1)"
        string founding_program_code "Código prog UE"
        array_struct financial_guaranties "Garantías (4.29)"
        string titulo_habilitante "Título req (4.30)"
        string solvencia_requerida "Solvencia (4.30)"
        string business_classification_code "Clasif. empresa"
        array_struct admission_conditions "Cond. admisión"
        array_struct technical_evaluation_criteria "Eval. técnica"
        array_struct economic_evaluation_criteria "Eval. económica"
        integer operating_years "Años exp (4.30.3)"
        integer employee_quantity "Plantilla (4.30.4)"
        float rate "% Subcontratación (4.31)"
        string rate_description "Detalle subcontratación"
        string envelop "ID Sobre (4.32)"
        string envelop_type_code "Tipo sobre"
        array_struct awarding_criteria "Criterios adjudic. (4.33)"
        string EU_law "Directiva UE (4.41)"
        string electronic_presentation "Endpoint present."
        integer appeal_number "Nº recursos (4.46)"
        boolean eordering "Pedido elect. (4.47)"
        boolean epayment_invoice "Factura elect. (4.47)"
        boolean epayment "Pago elect. (4.47)"
        array_struct execution_requirement "Cond. especiales (4.48)"
        string national_law_code "Ley LCSP (4.50)"
        struct document_provider_party "Prov. pliegos (4.18)"
        struct tender_recipient_party "Rec. ofertas (4.20)"
        struct additional_information_party "Info adicional (4.22)"
        struct appeal_information_party "Info recursos (4.23)"
        struct appeal_receiver_party "Rec. recursos (4.24.1)"
        struct mediation_party "Mediación (4.25)"
    }

    PROCESS {
        string process_type_code "Tipo proc. (4.12)"
        string contracting_system_code "Sist. contrat. (4.13)"
        string urgency_type_code "Tramitación (4.14)"
        string submission_type_code "Método pres. (4.15)"
        timestamp availability_period "Límite pliegos (4.19)"
        timestamp submission_deadline "Límite ofertas (4.21)"
        string event_type_code "Tipo evento (4.26)"
        string event_id "ID evento"
        timestamp event_date "Fecha evento"
        string event_description "Desc. evento"
        string event_location_description "Lugar evento"
        string event_location_address "Dirección evento"
        string event_location_city "Ciudad evento"
        string criteria_description "Criterios selecc (4.34)"
        integer expected_operators "Ops previstos"
        integer max_operators "Ops máximos"
        integer min_operators "Ops mínimos"
        string lot_presentation_code "Pres. lotes"
        integer max_lot_presentation "Máx lotes pres."
        integer max_lot_awarded "Máx lotes adjud."
        string authority_rights "Derechos autoridad"
        string reason_code "Motivo proc. (4.37)"
        string reason_description "Justificación"
        boolean electronic_auction "Subasta elect. (4.40)"
        timestamp process_presentation_date "Recep. solicitudes (4.43)"
        string presentation_description "Desc. solicitudes"
        boolean SARA_umbral "Contrato SARA (4.44)"
    }

    NOTICES {
        date issue_date "Fecha aviso"
        string type_code "Tipo aviso"
        string type_code_description "Desc. aviso"
        string media_name "Boletín (BOE...)"
        string agency_id "Agencia emisora"
        timestamp send_date "Fecha envío"
        array_struct documents "Docs vinculados"
    }

    MODIFICATIONS {
        string modification_id PK "ID Modif"
        string project_id "ID Proyecto (4.38.1)"
        float tax_exclusive_amount "Importe modif neto"
        float final_tax_exclusive_amount "Importe final neto"
        integer duration "Plazo modif"
        string duration_code "Unidad modif"
        integer final_duration "Plazo final total"
        string final_duration_code "Unidad plazo final"
    }
Loading