Entering content frame

reservation 

Create the table reservation and fill it with the values listed below.

Table Structure

CREATE TABLE reservation
(rno       FIXED(4) PRIMARY KEY CONSTRAINT rno BETWEEN 1 AND 9999,
 cno       FIXED(4) CONSTRAINT cno BETWEEN 1 AND 9999,
 hno       FIXED(4) CONSTRAINT hno BETWEEN 1 AND 9999,
 roomtype  CHAR(6) CONSTRAINT roomtype IN ('SINGLE','DOUBLE','SUITE'),
 arrival   DATE NOT NULL,
 departure DATE CONSTRAINT departure > arrival)

A logical link between the customer, hotel, and room tables is established through the reservation table.

Content

RNO

CNO

HNO

ROOMTYPE

ARRIVAL

DEPARTURE

100

3000

80

SINGLE

13/11/2001

15/11/2001

110

3000

100

DOUBLE

24/12/2001

06/01/2002

120

3200

50

SUITE

14/11/2001

18/11/2001

130

3900

110

SINGLE

01/02/2002

03/02/2002

140

4300

80

DOUBLE

12/04/2001

30/04/2001

150

3600

70

DOUBLE

14/03/2002

24/03/2002

160

4100

70

SINGLE

12/04/2001

15/04/2001

170

4400

150

SUITE

01/09/2001

03/09/2001

180

3100

120

DOUBLE

23/12/2001

08/01/2002

190

4300

140

DOUBLE

14/11/2001

17/11/2001

Other example tables

 

Leaving content frame