Hibernate will not create the schema dynamically...you have to manually create it. I used simple JDBC connection and statement to create schema, then SchemaExport will do the work of generating the tables and fields. So there is no way to create actual schema using hibernate. You have to create it manually.
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document configFileDoc = builder.parse(new ByteArrayInputStream(configFileStr.getBytes()));
Configuration hibConfiguration = new Configuration();
hibConfiguration.configure(configFileDoc);
ArrayList<Document> hbmFileDocs = getHBMFileDocList(); //created the documents of the file string
for(Document doc : hbmFileDocs)
hibConfiguration.addDocument(doc);
hibConfiguration.buildMappings();
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/", "username", "password");
stmt = conn.createStatement();
String sql = "CREATE DATABASE "+schemaName;
stmt.executeUpdate(sql);
SchemaExport schemaExport = new SchemaExport(hibConfiguration);
schemaExport.create(true, true);
This will generate the complete schema, it worked for me.