-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Create Database
PostPosted: Fri Feb 12, 2010 4:40 am 
Beginner
Beginner

Joined: Mon Dec 29, 2008 3:25 pm
Posts: 20
Hello,

can hibernate create the database(MySQL) not the table. I know hibernate create the tables, but can it create the database(schema) too?

Thanks


Top
 Profile  
 
 Post subject: Re: Create Database
PostPosted: Mon Feb 15, 2010 7:35 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hibernate can create the schema (= the definition of tables, constraints, indexes ...)
But Hibernate cannot create the database instance itself for you.
That means for instance, if specify a hibernate connection url:
Code:
jdbc:mysql://myhost:myport/mydbname

then you already must can sucessfully access the database mydbname with using this url for example with SQuirrel


Top
 Profile  
 
 Post subject: Re: Create Database
PostPosted: Fri Feb 19, 2010 10:17 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Indeed. And I think in MySQL, the creation of the database instance requires you to issue the command that 'creates a schema.' Confusing. :(

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.