Well, the answer is obvious: insert each value of the array in a new row in database. If all values are to be related to a single entity, then you can use a so-called chain table for this which you can later retrieve using a simple JOIN clause.
This question is in no way related to servlets by the way.
For more information, please read this.
This post has been moved to a more appropriate forum.
ujjwal soni wrote:Hi,
Checkbox returns true false in 1 or 0 respectively. Store it as varchar or int32 in database.
so what you mean to say is that i can't store the value directly but in only in form of 1 or 0 .
so for this do i need to use SQL decode for inserting and retreving data ??
When talking about a single item:
If it is just a boolean value (e.g. 'active', 'banned', 'show_email' etc) belonging to the same entity (e.g. User), then you can store it as BIT or TINYINT or any other smallest possible integer field (which is certainly not varchar or int32, that's a full waste of space) of the table representing the entity in question (the User).
If it is rather a complete entity (e.g. Country, Address, etc) which is supposed to be part of the parent entity (the User), then store it as FK of the table representing the entity in question. The entity itself should already be stored in a separate table.
When talking about multiple items:
Apply the same, but store the relations in a chain table. you should have one table for the parent entity (the User) and have another table for the items (e.g. VisitedCountries, Buddies, etc) and have a third table representing all relations between those two tables (a chain table) where in you store the related PK's of both tables as a new row.