You might also want to have a messageID and maybe a messageTimestamp.
If everyone is connecting directly to the database server then you're just going to have to do a select periodically to see if anyone posted anything new.
I don't know what kind of connection limits a database server has, but if your target audience is large enough, your architecture could break down (or even just bog down).
also i dont want to use any sockets.
all the chat clients connect to the database server.
> i want to use derby as a chat server,
> my idea is to insert whatever a user types into a table in the
> database.This table can have two fields UserID and the
> message(VARCHAR).how do i convey the inserted message to the other party??