Data Base Creation through MySQL Data Base by R4R Team

Before creating a web applcation we need to install NetBeans IDE and also need to install Hibernate Frame work with NetBeans and MySQL also required.

Now open the MySql and create a own database for Hibernate frame work .

Type these command in MySQL Editor:

1.create database hibernate_pro;

With the help of this command we can create a data base in the database to save the own data.

DataBase is that area where we can put our data like as tables,procedures. etc

2. use hibernate_pro;

With this command we can activate to that data base which we want to use at the time of the file creation and my all tables and data will be stored in used database.

3. create table person

(

id int(4) auto_increment primary key,

first_name varhcar(30),

last_name varchar(30),

age varchar(30),

profession varchar(50)

);

By this command we can create table which has id, first_name, last_name,age, profession are the field of the table in which we want to insert the data. In the table id show the unique quality of the table person. when we take the data type varchar then we are able to store any character value or any integer value in the data base.

4. select * from person;

We can see the data in the table by this command. This command will show the all data in the database. Here select is used to fetch the table from the data base.

 

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!