SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
/*
Created     10/14/2009
Modified    10/14/2009
Project     laboratorio
Model       entidad relaciom
Company          Particular
Author      Equipo6
Version     2.0
Database         MS SQL 7
*/




Create table [Doctor] (
    [Nombre] Char(20) NOT NULL,
    [Apellidop] Char(20) NOT NULL,
    [Apellidom] Char(20) NULL,
    [Direccion] Char(20) NOT NULL,
    [Telefono] Char(20) NULL,
    [clavedoc] Integer NOT NULL
)
go

Create table [Quimico] (
    [Nombre] Char(20) NOT NULL,
    [Apellidop] Char(20) NOT NULL,
    [Apellidom] Char(20) NULL,
    [Direccion] Char(20) NOT NULL,
    [Telefono] Char(20) NULL,
    [clavequi] Integer NOT NULL,
Primary Key ([clavequi])
)
go
Create table [Administrador] (
    [Nombre] Char(20) NOT NULL,
    [Apellidop] Char(20) NOT NULL,
    [Apellidom] Char(20) NULL,
    [Direccion] Char(20) NOT NULL,
    [Telefono] Char(20) NULL,
    [clavedoc] Integer NOT NULL,
Primary Key ([clavedoc])
)
go

Create table [Paciente] (
    [Nombre] Char(10) NULL,
    [Apellidom] Char(10) NULL,
    [Apellidop] Char(10) NULL,
    [Telefono] Char(10) NULL,
    [Direccion] Char(10) NULL,
    [Edad] Char(10) NULL,
    [Clave_de_Cliente] Integer NOT NULL,
Primary Key ([Clave_de_Cliente])
)
go

Create table [Estudio] (
    [nombre] Char(10) NULL,
    [claveest] Integer NOT NULL,
    [parametros] Char(10) NULL,
    [resultados] Char(10) NULL,
Alter table [Paciente] add foreign key() references [Doctor] ()
go
Alter table [Estudio] add foreign key([clavequi]) references [Quimico]
([clavequi])
go
Alter table [Estudio] add foreign key([Clave_de_Cliente]) references
[Paciente] ([Clave_de_Cliente])
go


Set quoted_identifier on
go




Set quoted_identifier off
go




/* Roles permissions */

Mais conteúdo relacionado

Destaque

Destaque (8)

jean piaget
jean piagetjean piaget
jean piaget
 
Chorei Ao Ver Isso
Chorei Ao Ver IssoChorei Ao Ver Isso
Chorei Ao Ver Isso
 
Copy Of Teknologi Zakat
Copy Of Teknologi ZakatCopy Of Teknologi Zakat
Copy Of Teknologi Zakat
 
08.06 Kaitsmine Ok
08.06 Kaitsmine Ok08.06 Kaitsmine Ok
08.06 Kaitsmine Ok
 
"Cash is King!" - R&M Audit
"Cash is King!" - R&M Audit"Cash is King!" - R&M Audit
"Cash is King!" - R&M Audit
 
Guess
GuessGuess
Guess
 
大阪教育大学平成18年環境報告書
大阪教育大学平成18年環境報告書大阪教育大学平成18年環境報告書
大阪教育大学平成18年環境報告書
 
Tani Dhe Topi
Tani Dhe TopiTani Dhe Topi
Tani Dhe Topi
 

Mais de eduardo martinez

Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacioneduardo martinez
 
Sql Server Express Equipo 6
Sql Server Express Equipo 6Sql Server Express Equipo 6
Sql Server Express Equipo 6eduardo martinez
 

Mais de eduardo martinez (10)

Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
 
Caratersiticas Smbd
Caratersiticas SmbdCaratersiticas Smbd
Caratersiticas Smbd
 
Tablalaboratorio
TablalaboratorioTablalaboratorio
Tablalaboratorio
 
Sql Server Express Equipo 6
Sql Server Express Equipo 6Sql Server Express Equipo 6
Sql Server Express Equipo 6
 

Último

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Último (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

bd-T-eq6-diseño-bd-del-laboratorio

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. /* Created 10/14/2009 Modified 10/14/2009 Project laboratorio Model entidad relaciom Company Particular Author Equipo6 Version 2.0 Database MS SQL 7 */ Create table [Doctor] ( [Nombre] Char(20) NOT NULL, [Apellidop] Char(20) NOT NULL, [Apellidom] Char(20) NULL, [Direccion] Char(20) NOT NULL, [Telefono] Char(20) NULL, [clavedoc] Integer NOT NULL ) go Create table [Quimico] ( [Nombre] Char(20) NOT NULL, [Apellidop] Char(20) NOT NULL, [Apellidom] Char(20) NULL, [Direccion] Char(20) NOT NULL, [Telefono] Char(20) NULL, [clavequi] Integer NOT NULL, Primary Key ([clavequi]) ) go
  • 7. Create table [Administrador] ( [Nombre] Char(20) NOT NULL, [Apellidop] Char(20) NOT NULL, [Apellidom] Char(20) NULL, [Direccion] Char(20) NOT NULL, [Telefono] Char(20) NULL, [clavedoc] Integer NOT NULL, Primary Key ([clavedoc]) ) go Create table [Paciente] ( [Nombre] Char(10) NULL, [Apellidom] Char(10) NULL, [Apellidop] Char(10) NULL, [Telefono] Char(10) NULL, [Direccion] Char(10) NULL, [Edad] Char(10) NULL, [Clave_de_Cliente] Integer NOT NULL, Primary Key ([Clave_de_Cliente]) ) go Create table [Estudio] ( [nombre] Char(10) NULL, [claveest] Integer NOT NULL, [parametros] Char(10) NULL, [resultados] Char(10) NULL,
  • 8. Alter table [Paciente] add foreign key() references [Doctor] () go Alter table [Estudio] add foreign key([clavequi]) references [Quimico] ([clavequi]) go Alter table [Estudio] add foreign key([Clave_de_Cliente]) references [Paciente] ([Clave_de_Cliente]) go Set quoted_identifier on go Set quoted_identifier off go /* Roles permissions */