SlideShare une entreprise Scribd logo
1  sur  8
Télécharger pour lire hors ligne
/*
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 */

Contenu connexe

En vedette (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
 

Plus 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
 

Plus 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
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

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
 
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
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.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
 
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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
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.
 
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...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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
 

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