SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
/*
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 */

Más contenido relacionado

Destacado (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
 

Más 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 Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Bd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De CoparacionBd T Eq6 Cuadro De Coparacion
Bd T Eq6 Cuadro De Coparacion
eduardo martinez
 
Sql Server Express Equipo 6
Sql Server Express Equipo 6Sql Server Express Equipo 6
Sql Server Express Equipo 6
eduardo martinez
 

Más 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

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Último (20)

ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 

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 */