Restaurant application

Discussion in 'Java' started by Tony, Feb 24, 2006.

  1. Tony

    Tony Guest

    Hi,

    I'm writing an application for a restaurant. Part of the application is
    the table scheduling, but I'm not sure how to store the available
    reservations. If I prefill these for the next year, it is going to take
    up a lot of space in the database.

    Thanks for the help.

    Tony
    Tony, Feb 24, 2006
    #1
    1. Advertising

  2. Tony wrote:


    > I'm writing an application for a restaurant. Part of the application is
    > the table scheduling, but I'm not sure how to store the available
    > reservations. If I prefill these for the next year, it is going to take
    > up a lot of space in the database.


    Can't you just add rows to your Reservations table as the reservations
    are made? Why would you prefill?
    Jeffrey Schwab, Feb 24, 2006
    #2
    1. Advertising

  3. Tony wrote:
    > Hi,
    >
    > I'm writing an application for a restaurant. Part of the application is
    > the table scheduling, but I'm not sure how to store the available
    > reservations. If I prefill these for the next year, it is going to take
    > up a lot of space in the database.


    It depends a bit on how you represent the information in the program and
    how you want to manipulate it.

    1:
    with a database where you only have search results in program memory you
    just represent it as a reservation table with the information date,
    time, timespan, table_num, customer_name etc
    you do simple seraches which returns some rows which you add in an
    ArrayList and display. You could search for all reservations on a
    certain date or on a date for table num x, etc

    2:
    if you want to hold it in memory (todays and tomorrows reservations) and
    perform in-memory searches you need to create a memory representation
    that can perform such operations quickly and easily, ex.

    - have an object representing a reservation. it contains the table
    number, the date/time and timespan (the timespan depends on the policy
    of the restaurant as some restaurants only have one reservation for the
    table for the whole evening, while others have several)
    - then you have two indexes: date and table which will hold a reference
    to the reservation

    You would of course store it aswell, but for that you only need to
    serialise it to either a file format, binary or xml or you could use
    javaspace, bbdb, or a sql or oo db.

    /tom
    tom fredriksen, Feb 24, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lhak
    Replies:
    0
    Views:
    502
  2. varun varun
    Replies:
    0
    Views:
    386
    varun varun
    Jul 3, 2003
  3. Paulo

    Restaurant+asp.net+palmtop

    Paulo, May 23, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    600
    Jeff Dillon
    May 23, 2008
  4. csgraham74

    restaurant table booking system asp.net

    csgraham74, Jul 24, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    820
    csgraham74
    Jul 24, 2008
  5. Mark Reed

    perl restaurant menu

    Mark Reed, Jul 8, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    171
    Mark Reed
    Jul 10, 2003
Loading...

Share This Page