473,698 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple DB Design Questions

Hi folks...

As part of an assignment, I have to design and implement a fairly
small MYSQL 4.0.17 database for a fictitious travel agency. This
database will store data from customers submitting it through
application forms. I will test my implementation on an old Linux box
(RedHat 6.x with PHP 4.0.5 and MySQL 4.0.17, running on an AMD
processor and 64MB of memory).

Each APPLICATION form will have 4 parts:

- PASSENGER details: name, surname, etc.
- CONTACT details: phone number(s), postal and e-mail addresses
- INFORMATION on the trip: departure and return dates, etc.
- CONTROL data: agency-specific (e.g., booking operator)

If I put all the above information into 1 table, APPLICATION, it will
have around 30 fields and a record size in the order of 1 KB/customer
(no more than 10,000 records expected).

If I put the information into 4 tables (PASSENGER, CONTACT,
INFORMATION, CONTROL), then none will have more than 10 fields/record,
but I need to associate them with, say, the PASSENGER key. But, if I
use auto increment, I will have to rely on the mysql_insert_id ()
function, which I am not happy about, since multiple simultaneous
accesses of the database is in the specs of the assignment and this
function examines the last INSERT. (Table locks and transaction
processing might help here.)

So, my question is, which design path to follow: 1 table, or 4 tables
and, if the latter, how do I go about reliably retrieving the
auto_increment key?

Cheers,

Dimitris
Jul 19 '05
30 2113
Hiya Dimitris.
I'm gonna assume you are evaluated on database design and coding skills for
this project.
If that's the case.
Use four tables, at a minimum, and normalize your data as much as possible.

There are real world reasons to keep things un-normalized, but this is for
an assignment, and a grade, and my hope is that your teacher is using the CJ
Date book on Intro to SQL as the text.
If not - you should get it - its still avail for sale/purchase.

mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"Dimitris" <dt*****@yahoo. com> wrote in message
news:39******** *************** ***@posting.goo gle.com...
Hi folks...

As part of an assignment, I have to design and implement a fairly
small MYSQL 4.0.17 database for a fictitious travel agency. [snip]

Jul 19 '05 #11
Hiya Dimitris.
I'm gonna assume you are evaluated on database design and coding skills for
this project.
If that's the case.
Use four tables, at a minimum, and normalize your data as much as possible.

There are real world reasons to keep things un-normalized, but this is for
an assignment, and a grade, and my hope is that your teacher is using the CJ
Date book on Intro to SQL as the text.
If not - you should get it - its still avail for sale/purchase.

mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"Dimitris" <dt*****@yahoo. com> wrote in message
news:39******** *************** ***@posting.goo gle.com...
Hi folks...

As part of an assignment, I have to design and implement a fairly
small MYSQL 4.0.17 database for a fictitious travel agency. [snip]

Jul 19 '05 #12
Hiya Dimitris.
I'm gonna assume you are evaluated on database design and coding skills for
this project.
If that's the case.
Use four tables, at a minimum, and normalize your data as much as possible.

There are real world reasons to keep things un-normalized, but this is for
an assignment, and a grade, and my hope is that your teacher is using the CJ
Date book on Intro to SQL as the text.
If not - you should get it - its still avail for sale/purchase.

mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"Dimitris" <dt*****@yahoo. com> wrote in message
news:39******** *************** ***@posting.goo gle.com...
Hi folks...

As part of an assignment, I have to design and implement a fairly
small MYSQL 4.0.17 database for a fictitious travel agency. [snip]

Jul 19 '05 #13
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.
Jul 19 '05 #14
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.
Jul 19 '05 #15
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.
Jul 19 '05 #16
Michael -
agreed -
but -
he's in an academic setting. Period. I teach as sql classes as well with
mySql utilizing the CJ Date Book.
He's not in real life [yet] so anything that will reduce his grade for the
assignment ? Who are we helping?

as to 'what you need to have are opinions ...' . Ah - I have many. Usually
paid for them, as well.
but that's another thing, and surely I digress.

If a project is for a grade in an academic setting, do it the way the
teacher wants it done. Period.
Anything else will be cause to 'take off points'.

But ? does it really matter ? Dimitris never posted back here asking further
questions.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"michael newport" <mi************ @yahoo.com> wrote in message
news:63******** *************** *@posting.googl e.com...
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.

Jul 19 '05 #17
Michael -
agreed -
but -
he's in an academic setting. Period. I teach as sql classes as well with
mySql utilizing the CJ Date Book.
He's not in real life [yet] so anything that will reduce his grade for the
assignment ? Who are we helping?

as to 'what you need to have are opinions ...' . Ah - I have many. Usually
paid for them, as well.
but that's another thing, and surely I digress.

If a project is for a grade in an academic setting, do it the way the
teacher wants it done. Period.
Anything else will be cause to 'take off points'.

But ? does it really matter ? Dimitris never posted back here asking further
questions.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"michael newport" <mi************ @yahoo.com> wrote in message
news:63******** *************** *@posting.googl e.com...
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.

Jul 19 '05 #18
Michael -
agreed -
but -
he's in an academic setting. Period. I teach as sql classes as well with
mySql utilizing the CJ Date Book.
He's not in real life [yet] so anything that will reduce his grade for the
assignment ? Who are we helping?

as to 'what you need to have are opinions ...' . Ah - I have many. Usually
paid for them, as well.
but that's another thing, and surely I digress.

If a project is for a grade in an academic setting, do it the way the
teacher wants it done. Period.
Anything else will be cause to 'take off points'.

But ? does it really matter ? Dimitris never posted back here asking further
questions.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"michael newport" <mi************ @yahoo.com> wrote in message
news:63******** *************** *@posting.googl e.com...
what you need to have are opinions on the pros and cons of doing
things different ways, this way you can give reasoned arguments in
favour of a certain method, and reach a useful conclusion.

I have found that the things I learnt in an academic setting have
rarely been applied in real life.

This will of course be different for everyone which leads me back to
my first point.

Jul 19 '05 #19
> But ? does it really matter ? Dimitris never posted back here asking further
questions.
mondo regards [Bill]


Agreed, but it helps me pass the time of day, and who knows what
interesting people I will get to talk to !

....although to put this in context, I have just been on an Oracle
Designer training course and a lot of these issues came up with the
other group members.

Many hours of meetings then ensued over design issues.

I dont know how much Designer costs, but my conclusion was that
Designer is more of a burden. My experience mirrors this as I
previously survived without a design tool for 13 years.
Jul 19 '05 #20

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

Similar topics

3
3691
by: Patchwork | last post by:
Hi Everyone, Please take a look at the following (simple and fun) program: //////////////////////////////////////////////////////////////////////////// ///////////// // Monster Munch, example program #include <list>
6
2446
by: Jacek Dziedzic | last post by:
Hello! First of all please forgive me for not posting a compilable snippet, but rather a simplified piece of code with the unimportant details left out. Let's say I have two classes 'box_shape' and 'cylinder_shape' that derive from a common base class 'shape', more or less like this: namespace Shapes {
9
1390
by: mkdunaway3 | last post by:
I'm just starting out here and I keep running into a basic problem. I build a set of tables: First Names, Last Names, Member Status. I bring these together in a table, Persons' Name & Status, where each person gets an unique ID and the other info is brought into the table by lookup. So far, everything works well. But then, I try to build the next step and hit a wall that I can't find
3
992
by: shapper | last post by:
Hello, I work mostly in web design and usually I create an administration area. To access administration my clients usually visit a link on their browsers. I would like to create a windows installer which does the following: 1. Opens a directory and copies several files from the CD to the computer. 2. Places icons on the desktop and start menu.
12
2736
by: Michael S | last post by:
Why do people spend so much time writing complex generic types? for fun? to learn? for use? I think of generics like I do about operator overloading. Great to have as a language-feature, as it defines the language more completely. Great to use.
4
2199
by: Jim | last post by:
I saw a simple web page. It had a frameset with 2 frames. The left frame was a navigtion frame, with links to interesting websites and a place to place a username (guess some of the websites were kinda personalized). The right frame contained the website of the link clicked in the navigation frame. Wanting to learn ASP.Net 2.0, I thought I'd start with my own version of this simple site. Alas, nothing is simple when Microsoft gets...
13
2038
by: aum | last post by:
Hi, I'm a Python programmer, just starting to get into javascript. On reading some of the js guides, and not liking any of the OO usage patterns I saw, I've cooked up something which python folks might find to taste. Here's the code - first the 'engine', then some code demonstrating the usage patterns. For me (and maybe for some of you), it promotes readability and some
17
5812
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /* Simple Thread Object ______________________________________________________________*/ #include <pthread.h> extern "C" void* thread_entry(void*);
4
1577
by: maheshgupta0248 | last post by:
Hi all, Im a newbie in php, started learning php on my own. I want to create small website using php, that contains links for two simple webpages > C questions > C++ questions C questions page, contains a sequence of questions. Each question is a link to another page which details the answers of the specific question, any user can be able to enter his comments to the question. so the new comment should be queued to the existing...
0
8683
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...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
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
7739
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...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.