Database Gurus... help!

Discussion in 'OT Technology' started by Mr. Monopoly, Apr 27, 2007.

  1. Mr. Monopoly

    Mr. Monopoly OT Supporter

    Joined:
    Jul 8, 2004
    Messages:
    6,955
    Likes Received:
    2
    Location:
    Advancing to Boardwalk
    I'm working on implementation of a database as a final. My database looks something like the following:

    Customers ------------------------- Vehicles
    -
    -
    -
    Reservation
    -
    -
    -
    Room ------------- Room_Amenities (Associative) ------------ Amenities

    My instructor specifically made me create the associative table with multiple amenities assigned to each room. For example room one might have C for coffee machine, and V vibe bed. Each amenity has a price. I need to create a tabular form that displays the Customer info from the customer table, and in a seperate tab, shows their room number and amenities. Is this even feasible?
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    feasible and easy
     
  3. Mr. Monopoly

    Mr. Monopoly OT Supporter

    Joined:
    Jul 8, 2004
    Messages:
    6,955
    Likes Received:
    2
    Location:
    Advancing to Boardwalk
    How's that?
     
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    did you even pay attention in the class?

    Assuming you have Tables for:
    • Customer (all your clients)
    • Reservation (reservations where clients are assigned to rooms)
    • Rooms (all your rooms)
    • Room_amenities (list out what features are in what rooms)
    • Amenities (list out your amenities to comply with 3NF)

    You would then run a simple query to return the customers name, address, as well as reservation information such as what room, from what date to what date, and their floor and number. (replace $$$$ with your reservation ID#)

    You could then run a second query to determine the amenities in the room. (replace $$$$ with the room #)
     
  5. Mr. Monopoly

    Mr. Monopoly OT Supporter

    Joined:
    Jul 8, 2004
    Messages:
    6,955
    Likes Received:
    2
    Location:
    Advancing to Boardwalk
    LOL, yeah.. paid attention in class. . but she just whored up Access a whole lot and avoided SQL.
     
  6. Create

    Create :free at last:

    Joined:
    Jan 4, 2006
    Messages:
    8,043
    Likes Received:
    2
    The UI creates the SQL code for you.
     

Share This Page