์ด ๋น ๋ฅธ ์์์์๋Google Cloud ์ฝ์์ ์ฌ์ฉํ์ฌ Spanner์์ ๊ธฐ๋ณธ ์์ ์ ์ํํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค. ๋น ๋ฅธ ์์์์ ํ ์ ์๋ ์์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- Spanner ์ธ์คํด์ค ๋ง๋ค๊ธฐ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง๋ค๊ธฐ
- ์คํค๋ง ๋ง๋ค๊ธฐ
- ๋ฐ์ดํฐ ์ฝ์ ๋ฐ ์์
- ์ฟผ๋ฆฌ ์คํ
Spanner ์ฌ์ฉ ๋น์ฉ์ ๋ํ ์์ธํ ๋ด์ฉ์ ๊ฐ๊ฒฉ ์ฑ ์ ์ ์ฐธ์กฐํ์ธ์.
์์ํ๊ธฐ ์ ์
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
- ์ ํ์ฌํญ: Spanner API๊ฐ ์๋์ผ๋ก ์ฌ์ฉ ์ค์ ๋์ด์ผ ํฉ๋๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์๋์ผ๋ก ์ฌ์ฉ ์ค์ ํฉ๋๋ค. Spanner API ์ฌ์ฉ ์ค์
-
์ธ์คํด์ค์ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๋ง๋๋ ๋ฐ ํ์ํ ๊ถํ์ ์ป์ผ๋ ค๋ฉด ๊ด๋ฆฌ์์๊ฒ ํ๋ก์ ํธ์ ๋ํ Cloud Spanner ๊ด๋ฆฌ์(roles/spanner.admin) IAM ์ญํ ์ ๋ถ์ฌํด ๋ฌ๋ผ๊ณ ์์ฒญํ์ธ์.
Google Cloud ์ฝ์์์ Spanner ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
์์ง ๋ง๋ค์ง ์์์ผ๋ฉด Google Cloud ํ๋ก์ ํธ๋ฅผ ์ ํํ๊ฑฐ๋ ๋ง๋ญ๋๋ค.
Spanner ํ์ด์ง์์ ํ๋ก๋น์ ๋๋ ์ธ์คํด์ค ๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
Spanner๋ฅผ ์ฌ์ฉํ ์ ์ด ์์ผ๋ฉด ์ ํ ํ์ด์ง ๋์ Spanner ์ธ์คํด์ค ํ์ด์ง๊ฐ ํ์๋ฉ๋๋ค. ์ธ์คํด์ค ๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
์ธ์คํด์ค ์ด๋ฆ ์ง์ ํ์ด์ง์ ์ธ์คํด์ค ์ด๋ฆ(์: Test Instance)์ ์ ๋ ฅํฉ๋๋ค.
์ธ์คํด์ค ID๋ test-instance์ ๊ฐ์ ์ธ์คํด์ค ์ด๋ฆ์ ๊ธฐ์ค์ผ๋ก ์๋์ผ๋ก ์ ๋ ฅ๋ฉ๋๋ค. ํ์์ ๋ฐ๋ผ ์ด๋ฆ์ ๋ณ๊ฒฝํ์ธ์. ๊ณ์์ ํด๋ฆญํฉ๋๋ค.
์ธ์คํด์ค ๊ตฌ์ฑ ํ์ด์ง์์ ๊ธฐ๋ณธ ์ต์ ๋ฆฌ์ ์ ๊ทธ๋๋ก ๋๊ณ ๋๋กญ๋ค์ด ๋ฉ๋ด์์ ๊ตฌ์ฑ์ ์ ํํฉ๋๋ค.
์ธ์คํด์ค ๊ตฌ์ฑ์ ์ธ์คํด์ค๊ฐ ์ ์ฅ ๋ฐ ๋ณต์ ๋๋ ์ง๋ฆฌ์ ์์น๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
๊ณ์์ ํด๋ฆญํฉ๋๋ค.
์ปดํจํ ์ฉ๋ ํ ๋น ํ์ด์ง์์ ์ฒ๋ฆฌ ๋จ์(PU)๋ฅผ ์ ํํ๊ณ ๊ธฐ๋ณธ๊ฐ 1000 ์ฒ๋ฆฌ ๋จ์๋ฅผ ๊ทธ๋๋ก ๋ก๋๋ค.
๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
์์ฑ๋ ์ธ์คํด์ค์ ๊ฐ์ ํ์ด์ง๊ฐ Google Cloud ์ฝ์์ ํ์๋ฉ๋๋ค.
Google Cloud ์ฝ์์์ Spanner ์ธ์คํด์ค ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
Test Instance์ ๊ฐ์ ๋ง๋ ์ธ์คํด์ค๋ฅผ ํด๋ฆญํฉ๋๋ค.
ํ์๋ ์ธ์คํด์ค ๊ฐ์ ํ์ด์ง์์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ด๋ฆ์ผ๋ก example-db์ ๊ฐ์ ์ด๋ฆ์ ์ ๋ ฅํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ธ์ด๋ฅผ ์ ํํฉ๋๋ค.
PostgreSQL ์ง์์ ๋ํ ์์ธํ ๋ด์ฉ๊ณผ ์ธ์ด๋ฅผ ์ ํํ๊ธฐ ์ํ ์๋ด๋ PostgreSQL ์ธํฐํ์ด์ค๋ฅผ ์ฐธ์กฐํ์ธ์. GoogleSQL์ ์ ํํ ๊ฒฝ์ฐ ์ด ๋น ๋ฅธ ์์์ ๋ค์ ์น์ ์ ์๋ ์คํค๋ง ์ ์ ํ ์คํธ ํ๋์์ ์คํค๋ง๋ฅผ ์ ์ํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง๋ค๊ธฐ ํ์ด์ง๊ฐ ๋ค์๊ณผ ๊ฐ์ด ํ์๋ฉ๋๋ค.
๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
์์ฑ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๊ฐ์ ํ์ด์ง๊ฐ Google Cloud ์ฝ์์ ํ์๋ฉ๋๋ค.
ํ์ ๋ฉ๋ด์์ Spanner ์คํ๋์ค๋ฅผ ํด๋ฆญํฉ๋๋ค.
Spanner ์คํ๋์ค ํ์ด์ง์์
์ ํญ์ ํด๋ฆญํ๊ฑฐ๋ ๋น ํธ์ง๊ธฐ ํญ์ ์ฌ์ฉํฉ๋๋ค.๋ค์์ ์ ๋ ฅํฉ๋๋ค.
GoogleSQL
CREATE TABLE Singers ( SingerId INT64 NOT NULL, FirstName STRING(1024), LastName STRING(1024), SingerInfo BYTES(MAX), BirthDate DATE ) PRIMARY KEY(SingerId);
PostgreSQL
CREATE TABLE Singers ( BirthDate TIMESTAMPTZ, SingerId BIGINT PRIMARY KEY, FirstName VARCHAR(1024), LastName VARCHAR(1024), SingerInfo BYTEA );
์คํ์ ํด๋ฆญํฉ๋๋ค.
Google Cloud ์ฝ์์ด ๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ฐ์ ํ์ด์ง๋ก ๋์๊ฐ๊ณ ์งํ ์ค์ธ ์คํค๋ง ์ ๋ฐ์ดํธ๊ฐ ํ์๋ฉ๋๋ค. ์ ๋ฐ์ดํธ๊ฐ ์๋ฃ๋๋ฉด ํ์ด์ง๋ ๋ค์๊ณผ ๊ฐ์ด ํ์๋ฉ๋๋ค.
GoogleSQL
PostgreSQL
PostgreSQL์ ํ ์ด๋ธ ์ด๋ฆ์ ์๋ฌธ์๋ก ๋ณํํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ฐ์ ํ์ด์ง์ ํ ์ด๋ธ ๋ชฉ๋ก์์ Singers ํ ์ด๋ธ์ ํด๋ฆญํฉ๋๋ค.
Google Cloud ์ฝ์์ Singers ํ ์ด๋ธ์ ์คํค๋ง ํ์ด์ง๊ฐ ํ์๋ฉ๋๋ค.
ํ์ ๋ฉ๋ด์์ ๋ฐ์ดํฐ๋ฅผ ํด๋ฆญํ์ฌ Singers ํ ์ด๋ธ์ ๋ฐ์ดํฐ ํ์ด์ง๋ฅผ ํ์ํฉ๋๋ค.
์ฝ์ ์ ํด๋ฆญํฉ๋๋ค.
Google Cloud ์ฝ์์๋ Singers ํ ์ด๋ธ์ ํ์ ์ฝ์ ํ๊ณ ์ฝ์ ๊ฒฐ๊ณผ๋ฅผ ๋ณด๋๋ก ์์ ํ๋
INSERT
๋ฐSELECT
๋ฌธ์ด ํฌํจ๋ ์ ์ฟผ๋ฆฌ ํญ์ด ์๋ Singers ํ ์ด๋ธ์ Spanner Studio ํ์ด์ง๊ฐ ํ์๋ฉ๋๋ค.GoogleSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO Singers (SingerId, BirthDate, FirstName, LastName, SingerInfo) VALUES (<SingerId>, -- type: INT64 <BirthDate>, -- type: DATE <FirstName>, -- type: STRING(1024) <LastName>, -- type: STRING(1024) <SingerInfo> -- type: BYTES(MAX) ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM Singers WHERE SingerId=<SingerId>;
PostgreSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO singers (singerid, birthdate, firstname, lastname, singerinfo) VALUES (<singerid>, -- type: bigint <birthdate>, -- type: timestamp with time zone <firstname>, -- type: character varying <lastname>, -- type: character varying <singerinfo> -- type: bytea ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM singers WHERE singerid=<singerid>;
PostgreSQL์ ์ด ์ด๋ฆ์ ๋ชจ๋ ์๋ฌธ์๋ก ๋ณํํฉ๋๋ค.
INSERT
๋ฌธ์VALUES
์ ๊ณผSELECT
๋ฌธ์WHERE
์ ์ ์์ ํฉ๋๋ค.GoogleSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO Singers (SingerId, BirthDate, FirstName, LastName, SingerInfo) VALUES (1, -- type: INT64 NULL, -- type: DATE 'Marc', -- type: STRING(1024) 'Richards', -- type: STRING(1024) NULL -- type: BYTES(MAX) ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM Singers WHERE SingerId=1;
PostgreSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO singers (singerid, birthdate, firstname, lastname, singerinfo) VALUES (1, -- type: bigint NULL, -- type: timestamp with time zone 'Marc', -- type: character varying 'Richards', -- type: character varying NULL -- type: bytea ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM singers WHERE singerid=1;
์คํ์ ํด๋ฆญํฉ๋๋ค.
Spanner๊ฐ ๋ฌธ์ ์คํํฉ๋๋ค. ์๋ฃ๋๋ฉด ๊ฒฐ๊ณผ ํญ์ ์ฒซ ๋ฒ์งธ ๋ฌธ์ด ํ ํ ๊ฐ๋ฅผ ์ฝ์ ํ์์ ๋ํ๋ด๋ฉฐ ํ ์ด๋ธ ๋ฐ์ดํฐ๋ฅผ ๋ณผ ์ ์๋ ๋งํฌ๋ฅผ ์ ๊ณตํฉ๋๋ค.
๊ฒฐ๊ณผ ํญ์์ ํ ์ด๋ธ ๋งํฌ๋ฅผ ํด๋ฆญํฉ๋๋ค. ์ด์ Singers ํ ์ด๋ธ์ ํ๋์ ํ์ด ์์ต๋๋ค.
GoogleSQL
PostgreSQL
์ฝ์ ์ ํด๋ฆญํ์ฌ ํ์ ํ๋ ๋ ์ถ๊ฐํฉ๋๋ค.
Google Cloud ์ฝ์์๋ ๊ฐ์
INSERT
๋ฐSELECT
๋ฌธ์ด ํฌํจ๋ ์ ์ฟผ๋ฆฌ ํญ์ด ์๋ Singers ํ ์ด๋ธ์ Spanner Studio ํ์ด์ง๊ฐ ๋ค์ ํ์๋ฉ๋๋ค.INSERT
๋ฌธ์VALUES
์ ๊ณผSELECT
๋ฌธ์WHERE
์ ์ ์์ ํฉ๋๋ค.GoogleSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO Singers (SingerId, BirthDate, FirstName, LastName, SingerInfo) VALUES (2, -- type: INT64 NULL, -- type: DATE 'Catalina', -- type: STRING(1024) 'Smith', -- type: STRING(1024) NULL -- type: BYTES(MAX) ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM Singers WHERE SingerId=2;
PostgreSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO singers (singerid, birthdate, firstname, lastname, singerinfo) VALUES (2, -- type: bigint NULL, -- type: timestamp with time zone 'Catalina', -- type: character varying 'Smith', -- type: character varying NULL -- type: bytea ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM singers WHERE singerid=2;
์คํ์ ํด๋ฆญํฉ๋๋ค.
Spanner๊ฐ ๋ฌธ์ ์คํํ ํ ๊ฒฐ๊ณผ ํญ์ ์ฒซ ๋ฒ์งธ ๋ฌธ์ด ํ๋์ ํ์ ์ฝ์ ํ์์ ๋ํ๋ ๋๋ค.
ํ ์ด๋ธ ๋งํฌ๋ฅผ ํด๋ฆญํฉ๋๋ค. ์ด์ Singers ํ ์ด๋ธ์ ๋ ๊ฐ์ ํ์ด ์์ต๋๋ค.
GoogleSQL
PostgreSQL
์ฝ์ ์ ํด๋ฆญํ์ฌ ํ์ ์ถ๊ฐํฉ๋๋ค.
Spanner์๋ ๋์ผํ
INSERT
๋ฐSELECT
๋ฌธ์ด ํฌํจ๋ ์ ์ฟผ๋ฆฌ ํญ์ด ์๋ Singers ํ ์ด๋ธ์ Spanner ์คํ๋์ค ํ์ด์ง๊ฐ ๋ค์ ํ์๋ฉ๋๋ค.ํ ํ๋ฆฟ
INSERT
๋ฌธ์VALUES
์ ๊ณผSELECT
๋ฌธ์WHERE
์ ์ ์์ ํฉ๋๋ค.GoogleSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO Singers (SingerId, BirthDate, FirstName, LastName, SingerInfo) VALUES (3, -- type: INT64 NULL, -- type: DATE 'Kena', -- type: STRING(1024) '', -- type: STRING(1024) NULL -- type: BYTES(MAX) ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM Singers WHERE SingerId=3;
PostgreSQL
-- Add new values in the VALUES clause in order of the column list. -- Each value must be type compatible with its associated column. INSERT INTO singers (singerid, birthdate, firstname, lastname, singerinfo) VALUES (3, -- type: bigint NULL, -- type: timestamp with time zone 'Kena', -- type: character varying '', -- type: character varying NULL -- type: bytea ); -- Change values in the WHERE condition to match the inserted row. SELECT * FROM singers WHERE singerid=3;
์ฑ ์ด์ ์ ๊ณต๋ ๊ฐ์
NULL
๊ฐ์ด ์๋''
๋น ๋ฌธ์์ด์ ๋๋ค.์คํ์ ํด๋ฆญํฉ๋๋ค.
Spanner๊ฐ ๋ฌธ์ ์คํํ ํ ๊ฒฐ๊ณผ ํญ์ ์ฒซ ๋ฒ์งธ ๋ฌธ์ด ํ๋์ ํ์ ์ฝ์ ํ์์ ๋ํ๋ ๋๋ค.
ํ ์ด๋ธ ๋งํฌ๋ฅผ ํด๋ฆญํฉ๋๋ค. ์ด์
Singers
ํ ์ด๋ธ์ ํ์ด ์ธ ๊ฐ ์์ผ๋ฉฐ,LastName
์ด์์3
์ ๊ธฐ๋ณธ ํค ๊ฐ์ ๋ฌธ์์ด์ด ๋น์ด ์์ต๋๋ค.GoogleSQL
PostgreSQL
Singers ํ ์ด๋ธ์ ๋ฐ์ดํฐ ํ์ด์ง์์ ๊ธฐ๋ณธ ํค ๊ฐ์ด
3
์ธ ํ์ ์ฒดํฌ๋ฐ์ค๋ฅผ ์ ํํ ํ ์์ ์ ํด๋ฆญํฉ๋๋ค.Spanner์๋ ์์ ํ ์ ์๋ ํ ํ๋ฆฟ
UPDATE
๋ฐSET
๋ฌธ์ด ํฌํจ๋ ์ ํญ์ด ์๋ Spanner ์คํ๋์ค ํ์ด์ง๊ฐ ํ์๋ฉ๋๋ค. ๋ ๋ฌธ์WHERE
์ ์ ์ ๋ฐ์ดํธํ ํ์ด ๊ธฐ๋ณธ ํค ๊ฐ์ด3
์ธ ํ์์ ๋ํ๋ ๋๋ค.GoogleSQL
-- Change values in the SET clause to update the row where the WHERE condition is true. UPDATE Singers SET BirthDate='', FirstName='Kena', LastName='', SingerInfo='' WHERE SingerId=3; SELECT * FROM Singers WHERE SingerId=3;
PostgreSQL
-- Change values in the SET clause to update the row where the WHERE condition is true. UPDATE singers SET birthdate=NULL, firstname='Kena', lastname='', singerinfo=NULL WHERE singerid='3'; SELECT * FROM singers WHERE singerid='3';
UPDATE
๋ฌธ์SET
์ ์ ์์ ํ์ฌ ์๋ ์์ผ๋ง ์ ๋ฐ์ดํธํฉ๋๋ค.GoogleSQL
-- Change values in the SET clause to update the row where the WHERE condition is true. UPDATE Singers SET BirthDate='1961-04-01' WHERE SingerId=3; SELECT * FROM Singers WHERE SingerId=3;
PostgreSQL
-- Change values in the SET clause to update the row where the WHERE condition is true. UPDATE singers SET birthdate='1961-04-01 00:00:00 -8:00' WHERE singerid='3'; SELECT * FROM singers WHERE singerid='3';
์คํ์ ํด๋ฆญํฉ๋๋ค.
Spanner๊ฐ ๋ฌธ์ ์คํํฉ๋๋ค. ์๋ฃ๋๋ฉด ๊ฒฐ๊ณผ ํญ์ ์ฒซ ๋ฒ์งธ ๋ฌธ์ด ํ ํ ๊ฐ๋ฅผ ์ ๋ฐ์ดํธํ์์ ๋ํ๋ด๋ฉฐ ํ ์ด๋ธ ๋ฐ์ดํฐ๋ฅผ ๋ณผ ์ ์๋ ๋งํฌ๋ฅผ ์ ๊ณตํฉ๋๋ค.
๊ฒฐ๊ณผ ํญ์์ ํ ์ด๋ธ ๋งํฌ๋ฅผ ํด๋ฆญํฉ๋๋ค.
์ด์ ์ ๋ฐ์ดํธ๋ ํ์ ์๋ ์์ผ ๊ฐ์ด ์์ต๋๋ค.
GoogleSQL
PostgreSQL
- Singers ํ
์ด๋ธ์ ๋ฐ์ดํฐ ํ์ด์ง์์ ์ฒซ ๋ฒ์งธ ์ด์
2
๊ฐ ์๋ ํ์ ์ฒดํฌ๋ฐ์ค๋ฅผ ์ ํํ ํ ์ญ์ ๋ฅผ ํด๋ฆญํฉ๋๋ค. ๋ํ์์๊ฐ ๋ํ๋๋ฉด ํ์ธ์ ํด๋ฆญํฉ๋๋ค.
์ด์ Singers ํ ์ด๋ธ์ ๋ ๊ฐ์ ํ์ด ์์ต๋๋ค.
GoogleSQL
PostgreSQL
๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ฐ์ ํ์ด์ง์ ํ์ ๋ฉ๋ด์์ Spanner ์คํ๋์ค๋ฅผ ํด๋ฆญํฉ๋๋ค.
์ ํญ์ ํด๋ฆญํ์ฌ ์ ์ฟผ๋ฆฌ ํญ์ ๋ง๋ญ๋๋ค. ๊ทธ๋ฐ ๋ค์ ์ฟผ๋ฆฌ ํธ์ง๊ธฐ์ ๋ค์ ์ฟผ๋ฆฌ๋ฅผ ์ ๋ ฅํฉ๋๋ค.
GoogleSQL
SELECT * FROM Singers;
PostgreSQL
SELECT * FROM singers;
์คํ์ ํด๋ฆญํฉ๋๋ค.
Spanner๊ฐ ์ฟผ๋ฆฌ๋ฅผ ์คํํฉ๋๋ค. ์๋ฃ๋๋ฉด ๊ฒฐ๊ณผ ํญ์ ์ฟผ๋ฆฌ ๊ฒฐ๊ณผ๊ฐ ํ์๋ฉ๋๋ค.
GoogleSQL
PostgreSQL
Google Cloud ์ฝ์์์ Spanner ์ธ์คํด์ค ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
Test Instance์ ๊ฐ์ด ์ญ์ ํ ๋ฐ์ดํฐ๋ฒ ์ด์ค๊ฐ ์๋ ์ธ์คํด์ค ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค.
example-db์ ๊ฐ์ด ์ญ์ ํ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ธ๋ถ์ ๋ณด ํ์ด์ง์์ delete ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ญ์ ๋ฅผ ํด๋ฆญํฉ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ด๋ฆ์ ์ ๋ ฅํ๊ณ ์ญ์ ๋ฅผ ํด๋ฆญํ์ฌ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ญ์ ๋ฅผ ํ์ธํฉ๋๋ค.
Google Cloud ์ฝ์์์ Spanner ์ธ์คํด์ค ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
Test Instance์ ๊ฐ์ด ์ญ์ ํ๋ ค๋ ์ธ์คํด์ค์ ์ด๋ฆ์ ํด๋ฆญํฉ๋๋ค.
delete ์ธ์คํด์ค ์ญ์ ๋ฅผ ํด๋ฆญํฉ๋๋ค.
์ธ์คํด์ค ์ด๋ฆ์ ์ ๋ ฅํ๊ณ ์ญ์ ๋ฅผ ํด๋ฆญํ์ฌ ์ธ์คํด์ค ์ญ์ ๋ฅผ ํ์ธํฉ๋๋ค.
- ์ธ์คํด์ค์ ๋ํด ์์๋ณด๊ธฐ
- Spanner ์คํค๋ง ๋ฐ ๋ฐ์ดํฐ ๋ชจ๋ธ์ ๋ํด ์์๋ณด๊ธฐ
- GoogleSQL ๋ฐ์ดํฐ ์ ์ ์ธ์ด(DDL)์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
- ์ฟผ๋ฆฌ ์คํ ๊ณํ์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
- C++, C#, Go, ์๋ฐ, Node.js, PHP, Python, Ruby, REST ๋๋ gcloud๋ก Spanner๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ณด๊ธฐ
์ธ์คํด์ค ๋ง๋ค๊ธฐ
์ฒ์์ผ๋ก Spanner๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์ธ์คํด์ค๋ฅผ ๋ง๋ค์ด์ผ ํฉ๋๋ค. ์ด ์ธ์คํด์ค๋ ํด๋น ์ธ์คํด์ค์์ Spanner ๋ฐ์ดํฐ๋ฒ ์ด์ค๊ฐ ์ฌ์ฉํ๋ ๋ฆฌ์์ค๋ฅผ ํ ๋นํ ๊ฒ์ ๋๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง๋ค๊ธฐ
๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์ํ ์คํค๋ง ์์ฑ
๋ฐ์ดํฐ ์ฝ์ ๋ฐ ์์
Google Cloud ์ฝ์์ ๋ฐ์ดํฐ๋ฅผ ์ฝ์ , ์์ , ์ญ์ ํ ์ ์๋ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํฉ๋๋ค.
๋ฐ์ดํฐ ์ฝ์
๋ฐ์ดํฐ ์ ๋ ฅ ์ ๋น ๋ฌธ์์ด ๊ฐ๋ ์ฝ์ ํ ์ ์์ต๋๋ค.
๋ฐ์ดํฐ ์์
๋ฐ์ดํฐ ์ญ์
์ฟผ๋ฆฌ ์คํ
์๊ณ ํ์ จ์ต๋๋ค. Spanner ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์ฑ๊ณต์ ์ผ๋ก ๋ง๋ค์์ผ๋ฉฐ ์ฟผ๋ฆฌ ํธ์ง๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ SQL ๋ฌธ์ ์คํํ์ต๋๋ค.
์ญ์
Cloud Billing ๊ณ์ ์ ๋ํ ์ถ๊ฐ ์๊ธ์ด ๋ถ๊ณผ๋์ง ์๋๋ก ํ๋ ค๋ฉด ์์ฑํ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ธ์คํด์ค๋ฅผ ์ญ์ ํฉ๋๋ค. ์ธ์คํด์ค๋ฅผ ์ญ์ ํ๋ฉด ํด๋น ์ธ์คํด์ค์์ ๋ง๋ ๋ชจ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค๊ฐ ์๋์ผ๋ก ์ญ์ ๋ฉ๋๋ค.