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

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

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

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 

Último (20)

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
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 ...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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