Wednesday 15 June 2011

java - Request-Reply Database Model -


I'm thinking of simple database models based on the conversations of requests and replies. There may be only one answer in a request. Another request can be made on the basis of the previous answer. Required to be able to repeat all the history - from the request before the last reply. I have modeled a sample:

  request: Answer | Int id | | Int id | | Int Perid | | String text | | String text | | Integer answerID |   

How can I make it more useful by improving it?

I accept the request can generate more than one answer. Request ID request timestamp request text

Request ID is primary (clustering) key This is an automatic incremental integer Or taller.

You can also block a non-exclusive index on the requested timestamp.

  North ----- Answer ID Request ID North timestamp reply text   

Answer ID key primary (clustering) is an automatic incremental integer Or taller.

You also specify a non-unique index (request ID, answer timestamp descending). You can also define a non-unique index (north timestamp descending, request id). The first index is for all the replies of a request. The second index is for all the answers in a time period (week, month).

No comments:

Post a Comment