• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Table without Primary key

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have few history talbes in Which I am just storing the records.
My requirement is to insert the records only. I dont want to fetch the records.
Is there any performance issue with Hibernate Entity if I am not going to specify Primary key or any surrogate key or any unique key for that table..?
Please help me out.
 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Suresh..

I think the records in History table, in a time would be fetched again, if we need the history of our data..


Is there any performance issue with Hibernate Entity if I am not going to specify Primary key or any surrogate key or any unique key for that table..?



I think its better to use Primary key, we've to use it although we use only auto increment..
for the History table, Hibernate provide the Immutable Entity to increase the performance..
the one of that term is we don't have to provide getter and setter to make Immutable Entity, we could use constructor..

Hope this helps..
please correct me if i'm wrong...

Thanks..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is there any performance issue with Hibernate Entity if I am not going to specify Primary key or any surrogate key or any unique key for that table..?


Hibernate will not work properly without a primary key. There is no real performance gain or lose using one, just loss of functionality.
 
reply
    Bookmark Topic Watch Topic
  • New Topic