storing in rows or in one field

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

storing in rows or in one field

Post by shivam0101 »

Hello,

I am sending newsletters to a set of selected members who are randomly choosen. I want to store their ids wheneven i send to keep track. Should i have to store each one of their ids in a new row? or in one field itself using a (,). If i am storing in a new row, will the database will become slow? Please lete me know if their is any other better way of doing it.

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

New rows. Not for quite some time, generally.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: storing in rows or in one field

Post by califdon »

shivam0101 wrote:I am sending newsletters to a set of selected members who are randomly choosen. I want to store their ids wheneven i send to keep track. Should i have to store each one of their ids in a new row? or in one field itself using a (,). If i am storing in a new row, will the database will become slow? Please lete me know if their is any other better way of doing it.
Avoid ever storing "non-atomic" values in a field ("atomic" values are values that cannot be logically broken into sub-values). It violates a primary rule of normalization.

Could you add a boolean field to your table and merely set the value in the records to whom you have sent newsletters?
Post Reply