# gomezmatias123/proyecto-bd1-equipo_48 architecture

> Architecture diagram of the GitHub repository gomezmatias123/proyecto-bd1-equipo_48, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gomezmatias123/proyecto-bd1-equipo_48
- Repository: https://github.com/gomezmatias123/proyecto-bd1-equipo_48

## Overview

Dragabulk.TCG is a SQL Server database project for a buying-and-selling business, developed in stages from relational design through implementation, queries, and database improvements. A user-facing workflow is only documented at a high level: the project creates and manipulates the database, then supports sales-related queries and technical enhancements. The tree identifies the relevant SQL scripts, but no source excerpts were provided, so specific calls, data transfers, and query-to-schema relationships cannot be verified; these are shown only as unverified links where appropriate.

Main entry points: [`sql/ddl/crear_bd.sql`](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/ddl/crear_bd.sql) (Database schema), [`sql/consultas/comprobante_venta.sql`](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/comprobante_venta.sql) (Sales receipt query), [`sql/consultas/consulta_avanzada.sql`](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/consulta_avanzada.sql) (Advanced query), [`sql/consultas/informe_ventas.sql`](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/informe_ventas.sql) (Sales report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_database["Database foundation"]
  node_schema["Database schema<br/>[crear_bd.sql]"]
  node_store[("Dragabulk database")]
  node_sample_data["Sample data<br/>[datos_prueba.sql]"]
end

subgraph group_sales["Sales queries"]
  node_receipt["Sales receipt query"]
  node_advanced_query["Advanced query"]
  node_sales_report["Sales report<br/>[informe_ventas.sql]"]
end

subgraph group_technical["Database enhancements"]
  node_indexes["Index optimization<br/>[script-indices.sql]"]
  node_procedures["Procedures and functions<br/>[script.sql]"]
  node_security["Function security"]
  node_transactions["Transaction functions"]
  node_audit["Audit triggers"]
end

node_operator(("Database operator"))

node_operator -.->|"creates schema"| node_schema
node_schema -.->|"defines"| node_store
node_operator -.->|"runs query"| node_receipt
node_operator -.->|"runs query"| node_advanced_query
node_operator -.->|"runs query"| node_sales_report
node_operator -.->|"applies indexes"| node_indexes
node_operator -.->|"applies routines"| node_procedures
node_operator -.->|"applies security"| node_security
node_operator -.->|"applies transactions"| node_transactions
node_operator -.->|"applies auditing"| node_audit

click node_schema "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/ddl/crear_bd.sql"
click node_sample_data "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/dml/datos_prueba.sql"
click node_receipt "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/comprobante_venta.sql"
click node_advanced_query "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/consulta_avanzada.sql"
click node_sales_report "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/informe_ventas.sql"
click node_indexes "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Optimizacion_indices/script-indices.sql"
click node_procedures "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Procedimientos_funciones/script.sql"
click node_security "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Seguridad_funciones/script_seguridad.sql"
click node_transactions "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Transacciones_funciones/script-transacciones.sql"
click node_audit "https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/triggers_auditoria/script-triggers.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_schema,node_store,node_sample_data toneBlue
class node_receipt,node_advanced_query,node_sales_report,node_operator toneAmber
class node_indexes,node_procedures,node_security,node_transactions,node_audit toneMint
```

## Components

### Database foundation

- [Database schema](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/ddl/crear_bd.sql): `sql/ddl/crear_bd.sql`
- **Dragabulk database**
- [Sample data](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/dml/datos_prueba.sql): `sql/dml/datos_prueba.sql`

### Sales queries

- [Sales receipt query](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/comprobante_venta.sql): `sql/consultas/comprobante_venta.sql`
- [Advanced query](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/consulta_avanzada.sql): `sql/consultas/consulta_avanzada.sql`
- [Sales report](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/consultas/informe_ventas.sql): `sql/consultas/informe_ventas.sql`

### Database enhancements

- [Index optimization](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Optimizacion_indices/script-indices.sql): `sql/tecnico/Optimizacion_indices/script-indices.sql`
- [Procedures and functions](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Procedimientos_funciones/script.sql): `sql/tecnico/Procedimientos_funciones/script.sql`
- [Function security](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Seguridad_funciones/script_seguridad.sql): `sql/tecnico/Seguridad_funciones/script_seguridad.sql`
- [Transaction functions](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/Transacciones_funciones/script-transacciones.sql): `sql/tecnico/Transacciones_funciones/script-transacciones.sql`
- [Audit triggers](https://github.com/gomezmatias123/proyecto-bd1-equipo_48/blob/main/sql/tecnico/triggers_auditoria/script-triggers.sql): `sql/tecnico/triggers_auditoria/script-triggers.sql`

### Other components

- **Database operator**

## Connections

- Database operator → Database schema: creates schema
- Database schema → Dragabulk database: defines
- Database operator → Sales receipt query: runs query
- Database operator → Advanced query: runs query
- Database operator → Sales report: runs query
- Database operator → Index optimization: applies indexes
- Database operator → Procedures and functions: applies routines
- Database operator → Function security: applies security
- Database operator → Transaction functions: applies transactions
- Database operator → Audit triggers: applies auditing
