Click here to Skip to main content
15,569,319 members
Home / Discussions / Database
   

Database

 
Questionhow to select numbers (integers) only? Pin
Jassim Rahma16-Jul-14 23:52
Jassim Rahma16-Jul-14 23:52 
AnswerRe: how to select numbers (integers) only? Pin
Richard MacCutchan16-Jul-14 23:54
mveRichard MacCutchan16-Jul-14 23:54 
AnswerRe: how to select numbers (integers) only? Pin
thatraja17-Jul-14 0:01
professionalthatraja17-Jul-14 0:01 
AnswerRe: how to select numbers (integers) only? Pin
Mycroft Holmes17-Jul-14 13:49
professionalMycroft Holmes17-Jul-14 13:49 
AnswerRe: how to select numbers (integers) only? Pin
PIEBALDconsult17-Jul-14 14:52
professionalPIEBALDconsult17-Jul-14 14:52 
GeneralRe: how to select numbers (integers) only? Pin
Jassim Rahma19-Jul-14 23:17
Jassim Rahma19-Jul-14 23:17 
GeneralRe: how to select numbers (integers) only? Pin
PIEBALDconsult20-Jul-14 5:50
professionalPIEBALDconsult20-Jul-14 5:50 
QuestionHandle to chat room with mysql database Pin
Member 1094998616-Jul-14 5:08
Member 1094998616-Jul-14 5:08 
I have been searching all day to find a better answer to my question but those I found was useful
but do not critically analyse my question.

I am building a chat room using php, mysql, jquery and ajax.
The target group members are 3000 people who will frequently
chat every day, so I am expecting like one million messages a day.
The chat room is open to all the members, that means
every member has the same priviledge to send and view
sent messages.

In this case, every member has the permission to delete messages whether sent by him or different members,
however deleted messages should not affect other users. I wouldnt also keep messages for more than two days,
meaning every sent message should be deleted after two days.

Below are the sample tables that represents the logics above

users table

| u_id |
| name |


messages table

| msgID |
| msgBODY |
| msgTime |
| senderID--FK |
| deleted_by_sender|


recipient table

| recID |
| msgID--FK |
| recipientID ---FK |
| deleted_by_recipient|


Now, if I am to implement the schema above, it means that every single sent message has to do 3000 inserts into the
recipient table and one insert into the messages table. This also means that if there are 50 sent messages within 1 minute there would be more
inserts within the one minute. At the same time 3000 people are viewing the messages. Awwsh! more work load on the database within that minute.
hmm!


Please is there a way to handle this, scalability and performance wise?

Any idea is appreciated. Thanks.
AnswerRe: Handle to chat room with mysql database Pin
Eddy Vluggen16-Jul-14 6:02
professionalEddy Vluggen16-Jul-14 6:02 
GeneralRe: Handle to chat room with mysql database Pin
Member 1094998616-Jul-14 8:18
Member 1094998616-Jul-14 8:18 
GeneralRe: Handle to chat room with mysql database Pin
Eddy Vluggen16-Jul-14 8:46
professionalEddy Vluggen16-Jul-14 8:46 
GeneralRe: Handle to chat room with mysql database Pin
Member 1094998616-Jul-14 8:53
Member 1094998616-Jul-14 8:53 
GeneralRe: Handle to chat room with mysql database Pin
Eddy Vluggen16-Jul-14 9:05
professionalEddy Vluggen16-Jul-14 9:05 
GeneralRe: Handle to chat room with mysql database Pin
Member 1094998616-Jul-14 9:09
Member 1094998616-Jul-14 9:09 
GeneralRe: Handle to chat room with mysql database Pin
Eddy Vluggen16-Jul-14 9:24
professionalEddy Vluggen16-Jul-14 9:24 
AnswerRe: Handle to chat room with mysql database Pin
data modeling guy16-Jul-14 18:42
data modeling guy16-Jul-14 18:42 
GeneralRe: Handle to chat room with mysql database Pin
Member 1094998616-Jul-14 22:28
Member 1094998616-Jul-14 22:28 
GeneralRe: Handle to chat room with mysql database Pin
data modeling guy17-Jul-14 0:52
data modeling guy17-Jul-14 0:52 
GeneralRe: Handle to chat room with mysql database Pin
Member 1094998617-Jul-14 2:45
Member 1094998617-Jul-14 2:45 
QuestionSSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER Pin
Mangesh678616-Jul-14 3:04
Mangesh678616-Jul-14 3:04 
AnswerRe: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER Pin
Eddy Vluggen16-Jul-14 6:03
professionalEddy Vluggen16-Jul-14 6:03 
AnswerRe: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER Pin
PIEBALDconsult17-Jul-14 14:39
professionalPIEBALDconsult17-Jul-14 14:39 
QuestionExtract Data in Single Record Pin
mrfalk15-Jul-14 14:05
mrfalk15-Jul-14 14:05 
AnswerRe: Extract Data in Single Record Pin
data modeling guy15-Jul-14 20:32
data modeling guy15-Jul-14 20:32 
AnswerRe: Extract Data in Single Record Pin
Richard Deeming16-Jul-14 3:42
mveRichard Deeming16-Jul-14 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.