need a little help with creating database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik Thorsen

    need a little help with creating database

    Hello!

    I am in the process of creating a database listing tours, something
    similar to what you can find on www.infohub.com.

    This means that I need to create a database which can be searchable
    with destination, category, price and so forth. Unfortunately I can
    not seem to be able to create the relationships, neither can I make my
    head learn how to do this. I would be extremely happy if anyone could
    help me solve this problem for me or at least help me a little on the
    way!
    Thanks a lot!
    Erik
  • Roger

    #2
    Re: need a little help with creating database

    do you have any tables defined yet ?
    which relationship(s) are you having trouble with ?

    here's a quick start...

    tblRegion
    regionId
    region

    tblCountry
    countryId
    country
    regionId

    tblArea (state, province, region, county)
    areaId
    area
    countryId
    parentAreaId (county within a state, city within a province)

    tblActivity
    activityId
    activity
    startDate
    endDate
    dailyRate
    weeklyRate

    tblContact
    contactId
    name
    address
    areaId
    phone
    fax
    email
    etc

    tblRental
    rentalId
    rental
    rental type (lodge, hotel, ranch, resort)
    contactId
    marketingDocume ntLink
    webSiteLink

    tblRentalActivi ty
    rentalId
    activityId
    contactId



    erik@freestylet ravel.no (Erik Thorsen) wrote in message news:<ed091d41. 0401270614.6513 3fc9@posting.go ogle.com>...[color=blue]
    > Hello!
    >
    > I am in the process of creating a database listing tours, something
    > similar to what you can find on www.infohub.com.
    >
    > This means that I need to create a database which can be searchable
    > with destination, category, price and so forth. Unfortunately I can
    > not seem to be able to create the relationships, neither can I make my
    > head learn how to do this. I would be extremely happy if anyone could
    > help me solve this problem for me or at least help me a little on the
    > way!
    > Thanks a lot!
    > Erik[/color]

    Comment

    • Erik Thorsen

      #3
      Re: need a little help with creating database

      Hello Roger!

      Thanks for getting back to me so quickly. Here is what I have got so
      far:

      tblTours
      tourId
      description
      longdescription
      image1
      image2
      baseprice

      tblCategories
      categoryId
      categoryname

      tblDestinations
      destinationId
      destinationname

      tblOptions
      optionsId
      optGroup
      optName
      optPriceDiff
      optWeightDiff

      I am aware that I probably need to create a junction table or something
      like that but I can't seem to get things working. I need each tour to be
      available to several different categories and at the same time available
      for different destinations.
      Like the tour Scandinavian Capitals. This tours goes to Norway, Sweden,
      Denmark and Finland. The tour includes husky safari, fishing, cruising,
      sightseeing and fjord tour. So somehow I need to make this work by
      setting my database up in a many to many relationship way I guess but I
      have tried so many times I guess I am as blind as batman right now...
      :-) Hope you can help me! Thanks!




      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Pieter Linden

        #4
        Re: need a little help with creating database

        Erik Thorsen <erik@freestyle travel.no> wrote in message news:<401b7306$ 0$70300$7586835 5@news.frii.net >...[color=blue]
        > Hello Roger!
        >
        > Thanks for getting back to me so quickly. Here is what I have got so
        > far:
        >
        > tblTours
        > tourId
        > description
        > longdescription
        > image1
        > image2
        > baseprice
        >
        > tblCategories
        > categoryId
        > categoryname
        >
        > tblDestinations
        > destinationId
        > destinationname
        >
        > tblOptions
        > optionsId
        > optGroup
        > optName
        > optPriceDiff
        > optWeightDiff
        >
        > I am aware that I probably need to create a junction table or something
        > like that but I can't seem to get things working. I need each tour to be
        > available to several different categories and at the same time available
        > for different destinations.
        > Like the tour Scandinavian Capitals. This tours goes to Norway, Sweden,
        > Denmark and Finland. The tour includes husky safari, fishing, cruising,
        > sightseeing and fjord tour. So somehow I need to make this work by
        > setting my database up in a many to many relationship way I guess but I
        > have tried so many times I guess I am as blind as batman right now...
        > :-) Hope you can help me! Thanks![/color]

        tblTourCategori es
        TourID (PK1)
        CategoryID (PK2)

        tblTourDestinat ions
        TourID(PK1)
        DestinationID(P K2)

        just take the two PKs from the other tables, make them the joint PK of
        the join table, and that's it. And change the type from autonumber to
        long.

        Comment

        Working...