Results 1 to 3 of 3

Thread: database and VB script

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2004
    Posts
    47

    Exclamation database and VB script

    I have created the SeatZone table in the database.

    Here is my SeatZone table:

    CREATE TABLE SeatZone (
    ZoneID char(10) NOT NULL,
    HallID char (9) NOT NULL,
    TheatreID char (5) NOT NULL,
    ZoneSeat varchar(1) NOT NULL,
    ZoneVacancy int NOT NULL,
    CONSTRAINT PK_SeatZone PRIMARY KEY NONCLUSTERED
    (
    ZoneID
    ),
    CONSTRAINT FK_SeatZone_HallID FOREIGN KEY
    (
    HallID
    ) REFERENCES Hall (
    HallID
    ),
    CONSTRAINT FK_SeatZone_TheatreID FOREIGN KEY
    (
    TheatreID
    ) REFERENCES Theatre (
    TheatreID
    )
    )
    GO

    For the ZoneSeat column, I am thinking of inserting the Seating Zone of the theatre hall. E.g: A, B, C etc. However, I realize that how am I suppose to insert all the various zones? I can’t possibly insert all in a column. Thus I am thinking of the other way like having 2 columns. One of it is the StartingZone and the other is that EndingZone. E.g A – J; StartingZone will be A and EndingZone will be J. Then there’s problem arise again. How to retrieve these Zones in such a way that all A – J Zones can be display in the dropdownlist?

    Hope that you guys can understand what I mean.

    Pls: reply asap. Thank You!

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    I think we need to understand the seating arrangement better.

    Lets say
    Zones A to J are seats 1 to 100. (10 seats in each zone)
    If you had starting zone and ending zone you really want to know which zone seat 24 is in, without thinking A 1-10, B 11-20, C 21-30 etc....

    Are you seats consecutively numbered across zones or does each zone start at 1 again?


    Things I do when I am bored: DotNetable

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2004
    Posts
    47
    Both ways are fine to me...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width