Back to feed
Renewal·서른의 생활코딩

Day 1) Basic SQL and Connecting to a DBMS _20180528 PM

NS
normalstory
cover image
Day 1) JDK and Oracle setup _20180528 pm


[Afternoon session _ Database]

SQL: Structured Query Language

1. Data Definition Language — DDL 
1) create — create an object
2) alter — change an object (structure change)
3) drop — delete an object

2. Data Manipulation Language — DML 
1) insert — insert data
2) update — modify data
3) delete — delete data
4) select — search data

3. Data Control Language — DCL 
1) grant — grant privilege
2) revoke — revoke privilege

4. Transaction Control Language — TCL 
1) commit — apply the transaction permanently
2) rollback — return to the last commit
3) savepoint — temporary save


How to connect to a DBMS

1. Windows cmd 
-> Windows Home > cmd 
sqlplus sys/java@localhost:1521 as sysdba
2. Oracle cmd
-> Windows Home > All Programs > run SQL Command Line
conn sys /as sysdba
password 
3. SQL Developer
Run SQL Developer
+ (bt)
Connection name, username, password
Option (SYSDBA)
Test (bt) -> success (state)
Test (editor) -> select * from all_users;  
Play (bt)



Registering accounts and granting privileges in the database

0. Admin activates the listener.

cmd

sqlplus sys/java@localhost:1521 as sysdba;


1. Admin registers a user account

create user userid identified by userpw


2. Admin grants privileges to the user account

grant connect, resource, sysdba to userid


3. Admin revokes privileges from the user account

revoke connect, resource. sysdba from userid


4. User changes their own password

cmd

sqlplus userid/java@localhost:1521 as sysdba;

alter user userid identified by newpw      <- but uid cannot be registered




This English version was translated by Claude.

친절한 찰쓰씨
Written by
친절한 찰쓰씨

Pleasant Charles — UI/UX researcher at AIT. Keeping notes on design, planning, and slow days here since 2010.

More on the author's page

Keep reading

Renewal

Why You Should Use .html Instead of .md Seeing Is Believing

Jul 25, 2026·1 min
Renewal

The Most Important Thing About AX

Jul 17, 2026·2 min
Renewal

디지털 기술과 혁신에 대한 논고(지탱하는 힘)

Jul 17, 2026·5 min