J2EE-based shopping website development

Source: Internet
Author: User
II. create a database and test the oracle8i (by the way, we can practice it) (for convenience, I simply abbreviated oracle8i to 8i). The 8i and 9i are indeed somewhat different, but there is little difference on the interface, let's take my oracle8i as an example! In practice, we first create a development user for ourselves and create a table !! Create a new J2EE instance in oracle

  
II. create a database
Test the oracle 8i (by the way, our trainer)
(For convenience, I abbreviated oracle 8i to 8i)
8i and 9i are indeed a little different, but there is little difference on the interface. Let's Take My oracle 8i as an example to explain it to you! In practice, we first create a development user for ourselves and create a table !!
There are many ways to create new users and tables in oracle, as long as you have administrator permissions (nonsense !), First, start the DBA Studio program item in the 8i program group, and enter the management user name and password in the database link information that appears. of course, in oracle, you can log on using the user name and slash password, and select SYSDBA as the connection identity.


(1-1) create a user:
After logging in, click Security. in the first item, you will see the user. right-click the user to create a new user, or grant the user a role. different roles have different permissions! I will talk about the pre-defined role of oracle8i below. Let's take a look at the figure below. you can assign the connect and resource permissions to the role following the general information.



(1-2) create a database:
First, disconnect the database of the system. you can select the database from the file or right-click the database. Then, log in with the user we created, find the table in the solution, and then create the table directly. because it is graphical and all Chinese, I will not describe it !! You can try more!


(2) use SQLPLUS to create users and databases:
In oracle, you can use the sqlplus tool to write SQL statements. this is a good place for SQL experts to make full use of their talents !!
Let's try it. First, we need to log on first. in order to create a new user, we still use system to log on. Enter the data ID (oradb) in the host string)


I will use one of the following to describe all operations:
After logging in, "SQL>" appears, we can write SQL statements behind it,
Grant connect, resouce to maxuan identified by max. this statement is used to create a maxuan user, password is max, and grant the connect and resource permissions. after the authorization is successful, we use the conn maxuan/max clause to connect to the database with maxuan. at this time, the role is no longer a DBA! The following are some basic SQL table creation statements. in sqlplus, each statement ends with a semicolon mark. after completion, we can use the quit or exit command to disconnect.


Ps: Here are some predefined 8i roles! 1. CONNECT role: Grant typical and basic rights to end users
Alter session -- modify a SESSION
Create cluster -- CREATE a CLUSTER
Create database link -- CREATE a DATABASE LINK
Create sequence -- CREATE a SEQUENCE
Create session -- CREATE a SESSION
Create synonym -- CREATE a SYNONYM
Create view -- create view 2. RESOURCE role: granted to developers
Create cluster -- CREATE a CLUSTER
Create procedure -- creation process
Create sequence -- CREATE a SEQUENCE
Create table -- CREATE a TABLE
Create trigger -- CREATE a TRIGGER
Create type -- create type 3. DBA role: all system-level permissions of the system
4. IMP_FULL_DATABASE and EXP_FULL_DATABASE:
Backup any table -- back up ANY TABLE
Execute any procedure -- execute any operation
Select any table -- Query any table 5. DELETE_CATALOG_ROLE role:
Grant this role to the user to delete records from the sys. aud $ table,
The sys. aud $ Table records the audited records. this role can be used to simplify audit trace management.
6. SELECT_CATALOG_ROLE and EXECUTE_CATALOG_ROLE:
The SELECT_CATALOG_ROLE role has the right to query data dictionaries,
The EXECUTE_CATALOG_ROLE role has the right to execute some processes and functions from the data dictionary.

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.