Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Retrieving more records from 1 field
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Retrieving more records from 1 field

 Post Reply Post Reply Page  <12
Author
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2003 at 4:28am

zaboss....  one word... normalise!!! 

You shouldn't have multi-value data in a single field. Heaps of reasons against doing this, and if anything, performance will ususally improve.

Databases are designed and optimised to create and work with joins, not to run custom code requiring you to split values to work with them.

Flamewave is spot on.

Cheers,
Andrew



Edited by Bunce
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2003 at 11:29am
Still not understand why 3 lines of code are less efective and much resource consuming than thousands of redundant records.  I must admit that my first thought was indeed to create a new table, but I thought that would add up redundant informations (we are talking here of thousands of students with 3-5 testes at least for each of them, so about 100.000 duplicate records. How  could that be less resource consuming and efective then 3 lines of code?
Cristian Banu
Soft 4 web
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2003 at 11:52am

There would be no redundant data if you normalize the db like I think Falmewave said. If you just create a table e.g.
StudentID    TestID

In there you store all tests they are set up for. StudentID linking to the Student table and TestID to the test table. Would cause much less overhead because the database once gotten the request will work everything off and just return the results you need without having asp to use array data and work through it...

Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2003 at 12:16pm

I see were you guys pointing... But I think this is too much trouble because the app has a different target. This is for companies to test either their employees, either people applying for jobs. Therefore, most likely a user will enter the app only once. There are 90% chances that a user account would be used only 1 time, then deleted. So, storring all than in another table (although linked) would cause more trouble that it is supposed to sort.

Not to mention that this is using mySQL which anyway forbide me to use inner joins or stored proc.  (But there are Access and SQL Server versions of the app - now I design all my apps with 3 diferent backends dbs).

Cristian Banu
Soft 4 web
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2003 at 4:44pm

why is it redundant data?  You're stll inserting the same data - its just that you're doing it properly!

The target of the app is prety much irrelevant. We're talking about general database design.

Here's a quick link, but there's heaps on normalisation if you googe it:
http://www.troubleshooters.com/littstip/ltnorm.html

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.