forked from Juanrk96/ProyectoPOE2022
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdatedDB.sql
More file actions
37 lines (32 loc) · 805 Bytes
/
UpdatedDB.sql
File metadata and controls
37 lines (32 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
create database sivarviajes
go
use sivarviajes
create table vuelo (
idVuelo int Identity(1,1) Primary key,
aerolinea varchar(60),
origen varchar(60),
destino varchar (60),
fecha date,
hora_salida datetime,
hora_llegada datetime,
asientos int,
costoVuelo float
)
create table reservacion (
idReservacion int Identity(1,1) Primary key,
fecha date,
idVuelo int FOREIGN KEY REFERENCES vuelo(idVuelo),
cantReservada int
)
create table pasajero (
idPasajero int Identity(1,1) Primary key,
nombre varchar(100),
direccion varchar (100),
telefono varchar (12),
email varchar(100)
)
create table detalle_reservacion(
idDetalle int Identity(1,1) Primary key,
idReservacion int FOREIGN KEY REFERENCES reservacion(idReservacion),
idPasajero int FOREIGN KEY REFERENCES pasajero(idPasajero)
)