Overview
Theproveedor table maintains supplier/vendor information for the clothing store. It stores essential contact details and addresses for companies that supply products to the inventory. This table is linked to products through the registro table, establishing the supply chain relationship.
Table Name: proveedorEngine: InnoDB
Character Set: utf8mb4
Primary Key:
id_proveedor
Table Structure
Column Definitions
Primary key identifier for the supplier. Auto-increments on insert.
Business name or company name of the supplier.
Contact phone number. Format: 10-digit Mexican phone number. Must be unique across all suppliers.
Physical address of the supplier’s business location.
CREATE TABLE Statement
Indexes
| Index Name | Type | Columns | Purpose |
|---|---|---|---|
PRIMARY | PRIMARY KEY | id_proveedor | Unique identifier |
telefono | UNIQUE KEY | telefono | Ensures phone number uniqueness |
Foreign Key Relationships
Child Tables (Referencing)
registro
Constraint:
Relationship: One supplier can supply many products
Each product registration (
fk_reg_provRelationship: One supplier can supply many products
Each product registration (
registro) links a product to its supplier via registro.id_proveedorSample Data
Supplier Profiles
Casimires y Trajes Lucerna (ID: 1)
Specialty: Formal wear, suits, and fine fabrics
Phone: 449-915-6551
Location: Calle Francisco I. Madero 102 A, Aguascalientes
Products Supplied: Men’s formal wear (Camisa Oxford Slim)
Phone: 449-915-6551
Location: Calle Francisco I. Madero 102 A, Aguascalientes
Products Supplied: Men’s formal wear (Camisa Oxford Slim)
Uniformes América (ID: 2)
Specialty: Uniforms and standardized clothing
Phone: 449-435-7284
Location: Av. Convención 1914 Ote. 105-A, Aguascalientes
Products Supplied: Casual and uniform items (Pantalón Jean Clásico)
Phone: 449-435-7284
Location: Av. Convención 1914 Ote. 105-A, Aguascalientes
Products Supplied: Casual and uniform items (Pantalón Jean Clásico)
La Charrita de Aguascalientes (ID: 3)
Specialty: Traditional and formal dresses
Phone: 449-311-0929
Location: Calle Del Carmen 313, Aguascalientes
Products Supplied: Women’s formal wear (Vestido de Gala Rojo)
Phone: 449-311-0929
Location: Calle Del Carmen 313, Aguascalientes
Products Supplied: Women’s formal wear (Vestido de Gala Rojo)
Maquilas Textiles Arenas (ID: 4)
Specialty: Sportswear manufacturing
Phone: 449-299-4799
Location: Paseo de la Explanada 145, Aguascalientes
Products Supplied: Athletic wear (Playera Deportiva Pro)
Phone: 449-299-4799
Location: Paseo de la Explanada 145, Aguascalientes
Products Supplied: Athletic wear (Playera Deportiva Pro)
Fábrica de Tejido de Punto y Confecciones Ofelia S.A. de C.V. (ID: 5)
Specialty: Knit fabrics and children’s clothing
Phone: 449-973-0249
Location: Av. Francisco I. Madero 810, Aguascalientes
Products Supplied: Children’s wear and casual items
Phone: 449-973-0249
Location: Av. Francisco I. Madero 810, Aguascalientes
Products Supplied: Children’s wear and casual items
Common Queries
List All Suppliers with Contact Info
Suppliers with Product Count
Products by Supplier
Supplier Performance Report
Find Supplier by Phone
Suppliers in Specific Area
Active Suppliers (with Recent Registrations)
Business Rules
Optional Contact Info: While phone and address fields are optional (NULL allowed), it’s recommended to collect this information for all active suppliers.
Data Validation
Phone Number Format
Mexican Phone Format: Phone numbers are stored as 10-character strings (CHAR(10)) representing Mexican phone numbers:
- Format: Area code (3 digits) + local number (7 digits)
- Example:
4499156551= 449 (Aguascalientes) + 9156551 - No formatting characters (dashes, spaces, parentheses)