Skip to content

Drugs

Drugs are the center of the Bioloupe knowledge graph. Every other domain — targets, diseases, clinical trials, organisations, deals, news — connects back to at least one drug. The drugs table holds one row per active pharmaceutical ingredient, tracked at the INN level: the molecule itself, not a brand name or formulation.

From a single drug row, you can walk outward to its molecular targets, owning companies, regulatory approvals across four regions, branded products, and lifecycle milestones. Two materialized views pre-join the most common paths so that pipeline queries need zero JOINs.

erDiagram
    drugs ||--o{ drug_ownerships : "owned by"
    drugs ||--o{ drug_target_actions : "acts on"
    drugs ||--o{ drug_approvals : "approved as"
    drugs ||--o{ brand_drugs : "marketed as"
    drugs ||--o{ drug_milestones : "lifecycle events"
    drugs }o--o| drugs : "parent (combinations)"
    drugs }o--o| drugs : "similar_drug (biosimilars)"
    drugs }o--o| technologies : "modality"
    drug_ownerships }o--|| organisations : "owner"
    drug_target_actions }o--|| targets : "target"
    drug_target_actions }o--o| modes_of_action : "mechanism"
    drug_approvals ||--o{ drug_approval_organisations : "granted by"
    drug_approvals ||--o{ indications : "indicated for"
    drug_approval_organisations }o--|| organisations : "organisation"
    brand_drugs ||--o{ brand_drug_approvals : "approved in"
    brand_drug_approvals }o--|| drug_approvals : "approval"
    drug_milestones }o--o| diseases : "for disease"

The core entity. One row per molecule, identified by a stable bloupe_id.

ColumnTypePurpose
bloupe_idtext (unique)Stable Bioloupe identifier for external references
nametextINN or common name (e.g., pembrolizumab, trastuzumab)
synonymsjsonArray of alternative names, codes, and abbreviations
drug_typetextMolecular classification: small_molecule, biologic, antibody, adc, cell_therapy, gene_therapy, vaccine, radiopharmaceutical, oligonucleotide, peptide, combination
drug_statustextLifecycle status: marketed, in_development, discontinued, withdrawn, suspended
first_in_classbooleanTRUE if first drug approved for its mechanism; NULL if unknown
technology_idFKDrug modality/technology (e.g., monoclonal antibody, small molecule). FK to technologies
parent_idFK (self)Parent drug for combinations or salt-to-base redirects
similar_drug_idFK (self)Reference/originator drug for biosimilars
atc_codejsonWHO ATC classification codes (a drug can carry multiple)
pharmacologyjsonbPK/PD data: half-life, bioavailability, route, time-to-peak
cell_therapy_metadatajsonbCell source, cell type, genetic modification, target antigen (cell/gene therapies only)
discontinuation_reasontextWhy the drug was stopped: safety, efficacy, commercial, strategic, regulatory
embeddingtextpgvector embedding for semantic search

Maps drugs to owning organisations. Supports multi-party ownership, licensing geography, and temporal tracking.

ColumnTypePurpose
drug_idFKThe owned drug
organisation_idFKThe owning organisation
is_currentbooleanTRUE if ownership is active; FALSE if historical. Enforced: is_current = true requires ended_at IS NULL
deal_typetextHow ownership was obtained: originator, acquisition, license, co_development, collaboration, spin_off
geography_includejsonISO country codes or regions where ownership applies
geography_excludejsonISO country codes or regions explicitly excluded
started_attimestamptzWhen ownership began
ended_attimestamptzWhen ownership ended (NULL if still current)

Mechanism of action — how a drug interacts with a molecular target. One row per drug-target-action triple, enforced by a unique constraint on (drug_id, target_id, mode_of_action_id).

ColumnTypePurpose
drug_idFKThe drug acting on the target
target_idFKThe molecular target (FK to targets)
mode_of_action_idFKHow the drug acts: inhibitor, agonist, antagonist, etc. (FK to modes_of_action)
is_primarybooleanWhether this is the primary mechanism for the drug
undisclosedbooleanTRUE if the target has not been publicly disclosed

Regulatory approvals across major regions. One row per drug-region approval event. Carries regulatory designation flags and structured label data.

ColumnTypePurpose
drug_idFKThe approved drug
approval_regiontextRegulatory region: usa, eu, jp, cn
approval_statustextCurrent status: approved, tentative, withdrawn, refused
approval_datetimestamptzDate of regulatory approval
brand_nametextApproved trade name (e.g., Keytruda)
application_numbertextNDA, BLA, or MAA number
innovation_typetextnew_molecular_entity, new_formulation, new_indication, new_combination, new_dosage_form, biosimilar, generic
dosage_formtextPhysical form: tablet, injection, infusion, capsule
strengthtextDosage strength (e.g., 100mg, 50mg/mL)
routetextRoute of administration: oral, intravenous, subcutaneous
breakthrough_therapybooleanFDA Breakthrough Therapy Designation
priority_reviewbooleanFDA Priority Review
accelerated_approvalbooleanFDA Accelerated Approval pathway
fast_trackbooleanFDA Fast Track designation
orphan_drugbooleanOrphan Drug designation
prime_eubooleanEU PRIME designation
rmatbooleanFDA RMAT (Regenerative Medicine Advanced Therapy) designation
real_time_reviewbooleanReal-Time Oncology Review
estimated_loss_of_exclusivitytimestamptzEstimated LOE date for generic/biosimilar entry
labeljsonbStructured FDA label data (dosing, warnings, contraindications)
remsjsonbRisk Evaluation and Mitigation Strategy data
region_metadatajsonbRegion-specific metadata: PDUFA target date, CHMP opinion, PMDA review

Organisations associated with a regulatory approval. One row per approval-organisation-role triple (unique constraint enforced).

ColumnTypePurpose
drug_approval_idFKThe regulatory approval
organisation_idFKThe organisation
roletextOrganisation’s role: applicant, manufacturer, distributor

Marketed brand-name products of a drug molecule. Multiple brands can exist per drug across different regions and formulations.

ColumnTypePurpose
drug_idFKThe underlying molecule
brand_nametextTrade/brand name (e.g., Keytruda, Herceptin)
active_ingredienttextActive ingredient as listed on the label
dosage_formtextPharmaceutical form (tablet, injection, capsule)
routetextRoute of administration
strengthtextDosage strength
aliasesjsonAlternative brand names or regional names

Bridge table linking branded products to their regulatory approvals. One row per brand-approval pair (unique constraint enforced).

ColumnTypePurpose
brand_drug_idFKThe branded product
drug_approval_idFKThe regulatory approval

Regulatory and development lifecycle events. One row per milestone, optionally scoped to a disease.

ColumnTypePurpose
drug_idFKThe drug
disease_idFK (nullable)Specific disease context, if applicable
milestone_typetextEvent type: discovery, pre_clinical, ind_filing, end_of_phase2_meeting, nda_submission, bla_submission, maa_submission, pdufa_date, crl, advisory_committee, approval, label_expansion, post_marketing_requirement, withdrawal
milestone_datetimestamptzDate of event (can be future for PDUFA dates)
regiontextRegulatory region: usa, eu, jp, cn, or other ISO regions
descriptiontextFree-text description of the milestone
DecisionWhyAlternative considered
drug_status is a curated column, not derived from approvals762 marketed drugs have zero approval records (pre-existing marketed compounds, regional gaps in source data). Deriving status from approvals would misclassify them.Computed column from drug_approvals — rejected because it cannot account for curation gaps.
brand_drug_approvals join table instead of fixed-region FKsRegions are not a closed set. A join table scales to any number of approval regions without schema changes.Hardcoded usa_approval_id, eu_approval_id, jp_approval_id, cn_approval_id columns on brand_drugs — rejected for rigidity.
parent_id self-reference for combinationsCombination products (e.g., encorafenib + binimetinib) need a parent row. Children redirect to the parent for pipeline queries. Salt forms also redirect to their base molecule.Separate combination_components join table — rejected because the parent-child relationship is singular and hierarchical.
similar_drug_id self-reference for biosimilarsBiosimilars reference a single originator drug. A self-FK keeps the relationship navigable without a separate table.Separate biosimilar_relationships table — rejected as over-engineering for a 1:N relationship.

Two materialized views pre-join the most common query paths. They trade write-time cost for read-time speed. See Materialized views for refresh schedules and indexing strategy.

Highest development phase per drug-disease pair. Combines approved indications (rank 100) with clinical trial phases extracted from trial arm interventions. One row per (drug_id, disease_id), keeping only the highest phase. Key columns: highest_phase, highest_phase_rank (integer for sorting), phase_source (approval or clinical_trial), and nct_ids (array of contributing trial identifiers).

Pre-joined drug overview for zero-JOIN pipeline queries. One row per drug with denormalized fields: drug_name, drug_status, drug_type, technology_name, drug_class, primary_target_name, target_names (array), current_owner_names (array), highest_phase_overall, and highest_phase_rank_overall. Draws phase data from mv_development_programs.

Which drugs target EGFR?

SELECT d.name, moa.name AS mechanism, dta.is_primary
FROM drug_target_actions dta
JOIN drugs d ON d.id = dta.drug_id
JOIN targets tgt ON tgt.id = dta.target_id
LEFT JOIN modes_of_action moa ON moa.id = dta.mode_of_action_id
WHERE tgt.name = 'EGFR'
ORDER BY dta.is_primary DESC, d.name;

Who owns pembrolizumab?

SELECT o.name AS owner, dow.deal_type, dow.geography_include, dow.is_current
FROM drug_ownerships dow
JOIN drugs d ON d.id = dow.drug_id
JOIN organisations o ON o.id = dow.organisation_id
WHERE d.name = 'pembrolizumab'
ORDER BY dow.is_current DESC, dow.started_at DESC;

Show all Phase 3+ drugs (using the materialized view)

SELECT drug_name, drug_status, primary_target_name,
current_owner_names, highest_phase_overall
FROM mv_drug_pipeline
WHERE highest_phase_rank_overall >= 3
ORDER BY highest_phase_rank_overall DESC, drug_name;