JBuilder2005 create a database table using JSP

Source: Internet
Author: User
1. Log on to the database as a user with DBA permission in Oracle's SQL Plus tool.
System/manger @ to_128
@ To_128 is the connection string name of the database, which needs to be changed according to the actual situation. If the database is local, the @ and connection string can be omitted.
2. Create a jbuser and specify the password as abc.
SQL> create user jbuser identified by abc;
3. Assign the connect and resource roles to the jbuser.
SQL> grant connect, resource to jbuser;
4. Log on to the database with jbuser
SQL> connect jbuser/abc @ to_128;
5. Create a user table and sequence, and run the following SQL code in SQL> command.
Code List 1 code for creating tables and sequences
1. -- Create a user table
2. create table T_USER (
3. USER_ID CHAR (6) not null,
4. USER_NAME VARCHAR2 (60 ),
5. PASSWORD VARCHAR2 (20 ),
6. constraint PK_T_USER primary key (USER_ID)
7 .);
8. -- Create a logon log table
9. create table T_LOGIN_LOG (
10. id char (12) not null,
11. USER_ID CHAR (6) not null,
12. DT_LOGIN CHAR (14) not null,
13. DT_LONOUT CHAR (14 ),
14. constraint PK_T_LOGIN_LOG primary key (ID)
15 .);
16.
17. -- create an index to generate the primary key of the T_LOGIN_LOG table
18. create sequence SEQ_LOGIN_LOG_ID
19. increment by 1
20. Max value 999999999999
21. minvalue 100000000000;
6. Insert 3 historical characters in the T_USER user table as the initial user and run the following SQL code in SQL> command.
Code List 2 insert 3 records to the T_USER table
1. insert into T_USER (USER_ID, USER_NAME, PASSWORD) values ('000000', 'jiangziya ', '20140901 ');
2. insert into T_USER (USER_ID, USER_NAME, PASSWORD) values ('000000', 'boshuya ', '20140901 ');
3. insert into T_USER (USER_ID, USER_NAME, PASSWORD) values ('20140901', 'vertical Ya ', '20160301 ');
4. commit;
Create a project and a Web module
After creating a database, open JBuilder to create a project and a Web module.
1. File-> New Project... create a Project named bookstore.
2. File-> New...-> Web-> double-click the Web Module (WAR) icon to create a Web Module named webModule. Use Tomcat 5.0 as the Web application server.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.