Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4023138
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:33:43+00:00 2026-05-20T10:33:43+00:00

I am using hibernate annotations with spring MVC. Now i always create table using

  • 0

I am using hibernate annotations with spring MVC.

Now i always create table using GUI editor like SQLYOG or phpmyadmin.
So i just create table with columns and even if i have some tables primaray key in other table , i just make that column with name like

Person ---id--name--age
SUbject------person_id----description

So i made those tables using GUI with mentioning anything about foreign key etc.

There is option in GUI editor ti make it primary kay and Auto increment so it usually works till now.

But i want to know that in Hibernate do i need to make tables with proper sql command . i mean do i need to mention which table is primary key and which is foreign key

or hibernate annotations are enough for that

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:33:43+00:00Added an answer on May 20, 2026 at 10:33 am

    Hibernate will work just fine as long as your annotations are correct.

    But from a database design point of view I strongly suggest that you create at least the primary key and foreign key constraints.

    Your queries will run much faster if you create the primary keys. You can improve performance a little more by creating other kinds of indexes to.

    PHPMyAdmin is perfectly able to create primary keys for you, as well as every other index types there is in mysql. There’s no need to write your creation code by hand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using Hibernate 3.1 with Spring MVC 2.0. Our problem occurs when data
I'm using Hibernate Validator in an application with EJB and Spring MVC. I'm using
I'm trying to combine Spring with Hibernate using Annotations and I'm getting the following
I'm trying to execute a simple stored procedure with Spring/Hibernate using Annotations. Here are
I am using a combination of Spring 2.5.6 and Hibernate Annotations. I have three
I'm considering using Annotations to define my Hibernate mappings but have run into a
I'm using hibernate validator framework with Spring. A class implementing the Spring Validator validates
I'm using Hibernate with Spring in my application. I have been consistently using detached
I am using Hibernate in a Java application to access my Database and it
I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.