Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2004, 01:02 AM
Authorized User
 
Join Date: Mar 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Arrays in Database fields

Instead of using a single string or integer value, does anyone uses arrays in database fields?

For example, instead of storing a single email address for a record, I could use an array to
store up to 5 email addresses for a person.

Does using arrays in fields degrade database performance in any way?

 
Old March 26th, 2004, 05:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

You cannot store an array. The best you could do is store 5 strings with a suitable separator, but really that's bad design. Its more efficient to use a separate table to store the multiple email addresses along with the necessary primary key to relate the email records back to the other table which contains each person's record.
 
Old March 26th, 2004, 07:27 PM
Authorized User
 
Join Date: Mar 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the info. I'm looking at everything from a programmatically point of view.
I was wondering how a SQL query command could even process an array and search for the right
string. Guess it isn't possible.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access database fields with SQLDataSource hastikeyvan ASP.NET 3.5 Basics 0 April 21st, 2008 01:10 AM
inserting fields in a related database abhi_loveu2002 ASP.NET 1.0 and 1.1 Basics 3 December 4th, 2006 09:02 AM
Arrays & Form Fields rdmapes Beginning PHP 5 October 12th, 2006 11:12 PM
generate arrays from database Lofa PHP How-To 1 September 23rd, 2006 04:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.