473,625 Members | 3,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Nov 12 '05 #1
3 1441
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

er**@freestylet ravel.no (Erik Thorsen) wrote in message news:<ed******* *************** ****@posting.go ogle.com>...
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

Nov 12 '05 #2
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!
Nov 12 '05 #3
Erik Thorsen <er**@freestyle travel.no> wrote in message news:<40******* *************** *@news.frii.net >...
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!


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.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
4087
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
4
1203
by: Amy Snyder | last post by:
I am trying to discern the difference between creating a web service or using IIS Virtual Directory Management for SQL Server Utitly if I want to provide xml data from a database. I have created some xml templates that will allow a user to access the data in xml format when entering the http:// address. Its pretty quick and easy to do once the virtual directory is configured through sql. Is creating a web service to provide xml data...
1
1073
by: Ddraig | last post by:
Howdy, I've got a little project going and I am trying to figure out a good way to do this. But since I'm still learning I'm probably missing a few obvious steps. Also not sure if I have my logic right or not. What I am trying to figure out is the process by which I pull the information. I'm trying to populate a list box with items where certain criteria are met.
1
1038
by: Ddraig | last post by:
Howdy, I've got a little project going and I am trying to figure out a good way to do this. But since I'm still learning I'm probably missing a few obvious steps. Also not sure if I have my logic right or not. What I am trying to figure out is the process by which I pull the information. I'm trying to populate a list box with items where certain criteria are met.
12
1860
by: nephish | last post by:
Hello there, i am getting to need to make my web stuff more OO. i have a project at work that we are porting to the internet, and i started learning php to do so. the project is now mamoth is size, and code is reused and pasted all over it. I plan to do a good re-write using better, and cleaner code. So i want to incorporate some classes. So i have some questions.
11
4484
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any AutoNumber* fields in them. Correct me if I'm wrong, but I'm assuming this means that I cannot now alter these existing Access tables and change their primary key to an "AutoNumber" type. If I'm right about this, I need some suggestions as to the...
1
2037
by: John Wright | last post by:
I am running a console application that connects to an Access database (8 million rows) and converts it to a text file and then cleans and compacts the database. When it runs I get the following error: The CLR has been unable to transition from COM context 0x1a2008 to COM context 0x1a2178 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long...
2
1169
by: zafar | last post by:
I need to creating backup of database on user defined location in hard disk. thanx for helping in this regard
3
1397
by: dieselfuelonly | last post by:
<?php //Connect to the database and select the data from the table $username="asdfasdf"; $password="asdfasdf"; $database="asdfasdf"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die("Unable to select database"); $query="SELECT * FROM ut_players"; $result=mysql_query($query);
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.