-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
358 changed files
with
37,232 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/.classpath | ||
/.project | ||
/.settings/ | ||
/bin/ | ||
/.dbeaver/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
SELECT * FROM dba_users; | ||
|
||
CREATE USER hairrang IDENTIFIED BY rootroot; | ||
|
||
GRANT CONNECT, RESOURCE, CREATE VIEW TO hairrang; | ||
|
||
SELECT | ||
username, | ||
default_tablespace, | ||
profile, | ||
authentication_type | ||
FROM | ||
dba_users | ||
WHERE | ||
USERNAME = 'hairrang'; | ||
|
||
SELECT | ||
username, | ||
default_tablespace, | ||
profile, | ||
authentication_type | ||
FROM | ||
dba_users; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
SELECT * FROM SALES; | ||
|
||
SELECT * FROM GUEST; | ||
|
||
SELECT * FROM EVENT; | ||
|
||
SELECT * FROM HAIR; | ||
|
||
SELECT * FROM booking; | ||
|
||
SELECT SALES_NO, SALES_DAY , SALES_TIME , s.GUEST_NO , s.EVENT_NO | ||
FROM SALES s JOIN GUEST g ON (g.GUEST_NO = s.GUEST_NO ) | ||
JOIN EVENT e ON (s.EVENT_NO = e.EVENT_NO ); | ||
|
||
SELECT * FROM SALES WHERE SALES_NO = 2; | ||
|
||
UPDATE SALES | ||
SET SALES_DAY = TO_DATE('2001-01-01','yyyy-mm-dd'), | ||
SALES_TIME = TO_DATE('11:11','HH24:Mi'), | ||
GUEST_NO = 1, | ||
EVENT_NO = 1 | ||
WHERE SALES_NO =3; | ||
|
||
DELETE SALES WHERE SALES_NO =4; | ||
|
||
<<<<<<< HEAD | ||
SELECT DETAIL_NO , s.*,h.*,g.*,e.* | ||
FROM SALES_DETAIL sd | ||
JOIN SALES s ON (sd.SALES_NO = s.SALES_NO ) | ||
JOIN HAIR h ON (sd.HAIR_NO = h.HAIR_NO ) | ||
JOIN GUEST g ON (g.GUEST_NO = s.GUEST_NO ) | ||
JOIN EVENT e ON (s.EVENT_NO = e.EVENT_NO ); | ||
|
||
|
||
|
||
|
||
|
||
======= | ||
INSERT INTO guest | ||
VALUES(1, '이지수', TO_DATE('1994-03-15', 'YYYY-MM-DD'), SYSDATE, '010-7423-3200', 2, NULL); | ||
>>>>>>> branch 'master' of https://github.com/DaeguIT-MinSuKim/yi_java4st_1team.git | ||
|
||
INSERT INTO HAIR | ||
VALUES(1, '컷트', 10000); | ||
|
||
INSERT INTO BOOKING | ||
values(BOOKING_SEQ.NEXTVAL, 1, SYSDATE, 1, '10분 늦을 수도 있다고 하심'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
CREATE TABLE Guest( | ||
GUEST_NO NUMBER(10) PRIMARY KEY, | ||
GUEST_NAME VARCHAR2(20) NOT NULL, | ||
BIRTHDAY DATE, | ||
JOIN_DAY DATE, | ||
PHONE VARCHAR2(13), | ||
GENDER NUMBER(1), | ||
GUEST_NOTE VARCHAR2(500) | ||
); | ||
|
||
CREATE TABLE SALES( | ||
SALES_NO NUMBER(10) PRIMARY KEY, | ||
SALES_DAY DATE, | ||
SALES_TIME DATE, | ||
GUEST_NO NUMBER(10), | ||
EVENT_NO NUMBER(10) | ||
); | ||
|
||
CREATE TABLE SALES_DETAIL( | ||
DETAIL_NO NUMBER(10) PRIMARY KEY, | ||
SALES_NO NUMBER(10) NOT NULL, | ||
HAIR_NO NUMBER(10) | ||
); | ||
|
||
CREATE TABLE EVENT( | ||
EVENT_NO NUMBER(10) PRIMARY KEY, | ||
EVENT_NAME VARCHAR2(20) NOT NULL, | ||
SALE NUMBER(3, 2) NOT NULL CONSTRAINT EVENT_SALE_CK CHECK (SALE BETWEEN 0 AND 1) | ||
); | ||
|
||
CREATE TABLE HAIR( | ||
HAIR_NO NUMBER(10) PRIMARY KEY, | ||
HAIR_NAME VARCHAR2(20) NOT NULL, | ||
PRICE NUMBER NOT NULL | ||
); | ||
|
||
CREATE TABLE BOOKING( | ||
BOOK_NO NUMBER(10) PRIMARY KEY, | ||
GUEST_NO NUMBER(10), | ||
BOOK_DAY DATE, | ||
HAIR_NO NUMBER(10), | ||
BOOK_NOTE VARCHAR2(500) | ||
); | ||
|
||
ALTER TABLE SALES | ||
ADD CONSTRAINT SALES_GUESTNO_FK FOREIGN KEY (GUEST_NO) REFERENCES GUEST(GUEST_NO); | ||
|
||
ALTER TABLE SALES | ||
ADD CONSTRAINT SALES_EVENTNO_FK FOREIGN KEY (EVENT_NO) REFERENCES EVENT(EVENT_NO); | ||
|
||
ALTER TABLE SALES_DETAIL | ||
ADD CONSTRAINT SALDE_EVENTNO_FK FOREIGN KEY (SALES_NO) REFERENCES SALES(SALES_NO); | ||
|
||
ALTER TABLE SALES_DETAIL | ||
ADD CONSTRAINT SALDE_HAIRNO_FK FOREIGN KEY (HAIR_NO) REFERENCES HAIR(HAIR_NO); | ||
|
||
ALTER TABLE BOOKING | ||
ADD CONSTRAINT BOOK_GUESTNO_FK FOREIGN KEY (GUEST_NO) REFERENCES GUEST(GUEST_NO); | ||
|
||
ALTER TABLE BOOKING | ||
ADD CONSTRAINT BOOK_HAIRNO_FK FOREIGN KEY (HAIR_NO) REFERENCES HAIR(HAIR_NO); |
Oops, something went wrong.