Oracle creates tables for new projects


I didn’t know Oracle systematically. This time, I set up a table for the new project in Oracle and recorded some experience

1. Create a new database instance?? Generally not required

MySQL connects to edu database: jdbc:mysql :// localhost:3306/edu

Oracle connection orcl instance: jdbc:oracle:thin:@localhost :1521:orcl

Looking at these two connection strings, we can see that edu and orcl seem to have the same status. At the beginning, I mistakenly thought that we need to build a new database instance in Oracle,

Let’s take a look at Oracle’s official description:




 Oracle database instance is a group of Oracle background process / thread and shared memory area allocated in the server.

In the attempt to create a new instance, the author encountered the error of memory overflow in. It can be seen that the new instance will consume a lot of memory.

Different projects can share one instance, and the default instance orcl can be used directly.


As for how to separate the tables of different items, you can use different users for different items, and the tables belong to users.

As shown in the following figure, the member table belongs to SSM users and is stored in users table space.

2. Create new table space and temporary table space

create tablespace lic_data  


datafile 'D:\oracle11g64\oradata\licData.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local;   

create temporary tablespace lic_temp 

tempfile 'D:\oracle11g64\oradata\licTemp.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local; 


3. Use the new table space and temporary table space created in the previous step to create a new user

create user adminlic identified by adminlic  

default tablespace lic_data  

temporary tablespace lic_temp;  


4. Give users permission

grant connect,resource,dba to adminlic; 

Next, after logging in with a new user, you can create a table.