CONSTRAINT PHYSICIAN PK PRIMARY KEY PHYSICIANID CREATE TABLE PERFORMS PATIENTNO

Constraint physician pk primary key physicianid

This preview shows page 6 - 7 out of 7 pages.

CONSTRAINT PHYSICIAN _PK PRIMARY KEY (PHYSICIAN_ID)); CREATE TABLE PERFORMS (PATIENT_NO INTEGER NOT NULL, TREATMENT_DATE DATE NOT NULL, TREATMENT_NO INTEGER NOT NULL, PHYSICIAN_ID INTEGER NOT NULL, CONSTRAINT VISIT_PK PRIMARY KEY (PATIENT_NO, TREATMENT_DATE, TREATMENT_NO), CONSTRAINT PERFORMS _FK FOREIGN KEY(PHYSICIAN _ID) REFERENCES PHYSICIAN (PHYSICIAN_ID)), CONSTRAINT PATIENT _FK FOREIGN KEY(PATIENT_NO) REFERENCES PATIENT (PATIENT_NO)); CREATE TABLE CARE_CENTER (CARE_CENTER_ID INTEGER NOT NULL UNIQUE, CARE_CENTER_NAME VARCHAR2(25), CHARGE_NURSE_ID INTEGER, CONSTRAINT CARE_CENTER_PK PRIMARY KEY (CARE_CENTER_ID), CONSTRAINT CHARGE_NURSE FOREIGN KEY (CHARGE_NURSE_ID) REFERENCES EMPLOYEE(EMP_NO)); CREATE TABLE BED (BED_NO INTEGER NOT NULL UNIQUE, ROOM_NO INTEGER NOT NULL UNIQUE, CARE_CENTER_ID INTEGER, CONSTRAINT BED_PK PRIMARY KEY (BED_NO, ROOM_NO) 6 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
Image of page 6
CONSTRAINT CC_FK FOREIGN KEY (CARE_CENTER_ID) REFERENCES CARE_CENTER(CARE_CENTER_ID)); CREATE TABLE ASSIGNED (CARE_CENTER_ID INTEGER NOT NULL, EMP_NO INTEGER NOT NULL, HOURS DECIMAL(4,2), CONSTRAINT ASSIGNED_PK PRIMARY KEY (CARE_CENTER_ID, EMP_NO), CONSTRAINT ASSIGNED_FK1 FOREIGN KEY (CARE_CENTER_ID) REFERENCES CARE_CENTER(CARE_CENTER_ID), CONSTRAINT ASSIGNED_FK2 FOREIGN KEY (EMP_NO) REFERENCES EMP(EMP_NO)); 7 256 257 258 259 260 261 262 263 264 265 266 267 268
Image of page 7

You've reached the end of your free preview.

Want to read all 7 pages?

  • Spring '14
  • B MAK

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture