Guys, I have another DB design question.

I have 100 - 10000 clients connected to my server.

Each client has a status.  Many clients are "watching" *one* other 
client, which means that any change in that client's status must 
immediately be sent to the watching clients.

Estimates of numbers:

- 70% of people online will be watching someone
//
- 50% of people will be watched by 0 clients
- 40% of people will be watched by 1 client
- 9% of people will be watched by 2 clients
- 1% of people will be watched by 3 or more clients

Here's my attempt at a schema:

- because your status is changing often I would have a separate table, 
clientStatusTable, which would hold client ids and their status

- I would have another table, clientWatchingTable, which would store 
relations between clients and who they are watching.  I would probably 
index on watched client because I would need to select everyone watching 
a client often

Does this seem like a sane approach?

Thanks,
Ian


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to