The document shows how to create an AlloyDB cluster and instance, create tables to store region, country and department data, insert sample data, create a read pool instance, and take a backup of the database.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100%(1)100% found this document useful (1 vote)
27 views2 pages
Labs AlloyDB
The document shows how to create an AlloyDB cluster and instance, create tables to store region, country and department data, insert sample data, create a read pool instance, and take a backup of the database.
region_id bigint NOT NULL, region_name varchar(25) ); ALTER TABLE regions ADD PRIMARY KEY (region_id);
CREATE TABLE countries (
country_id char(2) NOT NULL, country_name varchar(40), region_id bigint ); ALTER TABLE countries ADD PRIMARY KEY (country_id);
CREATE TABLE departments (
department_id smallint NOT NULL, department_name varchar(30), manager_id integer, location_id smallint ); ALTER TABLE departments ADD PRIMARY KEY (department_id);
INSERT INTO regions VALUES (1, 'Europe');
INSERT INTO regions VALUES (2, 'Americas'); INSERT INTO regions VALUES (3, 'Asia'); INSERT INTO regions VALUES (4, 'Middle East and Africa');
INSERT INTO countries VALUES ('IT', 'Italy', 1);
INSERT INTO countries VALUES ('JP', 'Japan', 3 ); INSERT INTO countries VALUES ('US', 'United States of America', 2 ); INSERT INTO countries VALUES ('CA', 'Canada', 2 ); INSERT INTO countries VALUES ('CN', 'China', 3 ); INSERT INTO countries VALUES ('IN', 'India', 3 ); INSERT INTO countries VALUES ('AU', 'Australia', 3); INSERT INTO countries VALUES ('ZW', 'Zimbabwe', 4 ); INSERT INTO countries VALUES ('SG', 'Singapore', 3 );
INSERT INTO departments VALUES (10, 'Administration', 200, 1700);
INSERT INTO departments VALUES (20, 'Marketing', 201, 1800); INSERT INTO departments VALUES (30, 'Purchasing', 114, 1700); INSERT INTO departments VALUES (40, 'Human Resources', 203, 2400); INSERT INTO departments VALUES (50, 'Shipping', 121, 1500); INSERT INTO departments VALUES (60, 'IT', 103, 1400);
Ultimate Microsoft Intune for Administrators: Master Enterprise Endpoint Security and Manage Devices, Apps, and Cloud Security with Expert Microsoft Intune Strategies (English Edition)