2

I have a project where I create reports and I am keeping the old reports for users. I am creating tables using EJB 3.0 and psql on Glassfish Server. Recently I realized that the old reports' tables have duplicate values: select * from aTable

col1               | col2
-------------------+---------
 text/html         |    1672
 text/javascript   |     374
 text/css          |      94
 text/xml          |      21
 text/plain        |      14
 text/html         |    1672
 text/javascript   |     374
 text/css          |      94
 text/xml          |      21
 text/plain        |      14

But when I create another report (after restarting the server), there is nothing wrong with it. Does anyone have any opinion about why this is happening? Thanks in advance.

lamostreta
  • 2,359
  • 7
  • 44
  • 61
  • Your application is creating tables? That doesn't sound right. – Steve Jul 19 '11 at 07:53
  • Why? Sorry, I didn't understand your question. Yes, my application is creating tables in a database and there is sth wrong with this tables. – lamostreta Jul 19 '11 at 08:23
  • I could be wrong, but my read of this is that you don't know much about data modelling and how to use an RDBMS. Kudos for using PostgreSQL, though. Something perhaps unique about PostgreSQL is that DDL is transactional. You should be aware of that. – Steve Jul 19 '11 at 11:40
  • Thanks for your comment. There are topics that I may not know, that's why I am asking here. What I thought and like about stackoverflow is that it is a place where people ask questions to get answers that they learn from, not a place where people just say "it seems to me that you don't know this, and this" and produce no answer to the question. We should be aware of that. Thanks. – lamostreta Jul 20 '11 at 08:13
  • Sorry, didn't intend to cast aspersions, but rather suggest you gain a deeper understanding of database systems in general. Avoid that at your peril. – Steve Jul 20 '11 at 11:10

1 Answers1

1

It sounds like a refreshing issue, you say that when you restart the server everything is fine, maybe you need to make sure you aren't accidentally adding to an already existing report the same information?

Wolfcow
  • 2,745
  • 1
  • 17
  • 10
  • Thanks for your answer. That might be the reason. I will try to pay special attention to your point next time I restart the server. – lamostreta Jul 20 '11 at 08:20