Purpose : Create a table and divide rolls to the DBA by DEV
Create a table and divide rolls to the DBA by DEV
(1)
Insert + commit / DEV가 해야 하는 부분!!!
{coding part}
alter table changyong.members
add constraint member_id_pk primary Key (member_Id)
add constraint phone_number_uk unique (phone_number);
grant insert on mr to keonho;
Alter table Changyong.members
Modify password not null
modify name not null;
insert into MR(Member_ID, Password, phone_number, name) Value('Eunjin', '1234', '010547522452', '건호')
commit
{Descrition}
바꿔라, 표를 Chagnyong 에 있는 member 라는 표를
이때, DEV 가 DBA 에게 줄수 있는 insert 의 권한은 그다지 넓지 않다.
Primary key 와 Unique 부분은 DEV 가 책임져서 미리 만들어 넘겨줘야 하는 부분이고,
Not Null 의 Modify 부분은 DBA 가 책임져서 수정해야 하는 부분이다. 이후
전달받은 표의 내용을 체워줄 부분 역시 DBA 가 작성한다.
(2) update + commit
grant update on mr to changyong
{Coding part}
Update mr //업데이트를 진행할 표, Table set in a update
set password = "4321" //바꾸고 저장할 새로운 비밀번호, new password to updated
Where member_id = "KEONHO" // 변화 대상의 자리 비밀 번호를 바꿀 id 의 대상, place to changed
Commit; //모든 변화를 select 를 책임질 DBA 가 볼수 있도록 해주는 마지막 처리. last process to show the result
(3) select
grant selection on mr to mingyu;
{coding part}
Select * from mr; //to check the final result & update
Comments
Post a Comment