166 reputation
6
bio website
location
age
visits member for 1 year, 5 months
seen Mar 9 at 21:46

Feb
5
comment Hierarchical structure with limited number of records per user
Thanks, I think in my case having a check like CHECK(ID > ParentID) would do just fine. Because I can't foresee any special condition whe inverse could be the case.
Feb
5
comment Hierarchical structure with limited number of records per user
also, when you say 'your design does not prevent cycles' can you suggest any better way to approach this ? I'd prefer a better design.
Feb
5
comment Hierarchical structure with limited number of records per user
I see. This is getting closer. please elaborate on your design does not prevent cycles. We can easily enforce that via constraints as well. thanks
Feb
5
comment Hierarchical structure with limited number of records per user
@CraigRinger Yes I've already looked into ltree module but I think I overlooked some of its functionality or I dont completely understand how I can use it in conjugation with other records in database. and of course I need to think about locking, thanks for confirming that I was not over concerned about it. Can you help with some ltree implementations ?
Feb
5
asked Hierarchical structure with limited number of records per user
Sep
5
awarded  Popular Question
Mar
12
reviewed Approve suggested edit on Performing SELECT on EACH ROW in CTE or Nested QUERY?
Mar
12
asked Performing SELECT on EACH ROW in CTE or Nested QUERY?
Feb
20
awarded  Commentator
Feb
20
comment Storing logs on per day basis in PostgreSQL
@dezso, Could you please post your ideas as an answer ? I'm desperately looking for a proper way to do this.
Feb
19
comment Storing logs on per day basis in PostgreSQL
@dezso we dont actually sells anything, It was an example scenario that just happens to match with ours. anyway, there can be a couple thousand insertions in a day if I talk about the real problem. same can be said for reading records, a couple thousand Select per day.
Feb
18
revised Storing logs on per day basis in PostgreSQL
Added results from main edit
Feb
18
awarded  Editor
Feb
18
comment Storing logs on per day basis in PostgreSQL
@dezso I just have update the question if you want to take a look
Feb
18
comment Storing logs on per day basis in PostgreSQL
@vyegorov I have updated the question with a little more research work.
Feb
18
revised Storing logs on per day basis in PostgreSQL
Added more details
Feb
18
comment Storing logs on per day basis in PostgreSQL
There are several cases of failure in this approach, first and foremost, The days with no sales will be skipped from being recorded. secondly, we cant assure that the records wont change anymore after the data has been exported from live-records table to old-records table.
Feb
18
comment Storing logs on per day basis in PostgreSQL
@vyegorov Purpose of this design is to keep track of sales for administrator and salesman to view whenever they want it, you can say that the historical records will be accessed as frequently (or more) as live records.
Feb
17
asked Storing logs on per day basis in PostgreSQL
Feb
13
comment Loop through Self JOIN on table until the operand column is NULL completely
@Webdevilopers, do you want the solution or the example ? If solution then I settled with adjacency list model, read more about that over wikipedia en.wikipedia.org/wiki/Adjacency_list_model.