From 601055ee1b0d1b283868e6a8be658eb2da72c01d Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 30 Dec 2019 16:26:38 -0700 Subject: Add a script to run lab1 --- labs/1.md | 27 --------------------------- labs/1/README.md | 27 +++++++++++++++++++++++++++ labs/1/run.sh | 6 ++++++ 3 files changed, 33 insertions(+), 27 deletions(-) delete mode 100644 labs/1.md create mode 100644 labs/1/README.md create mode 100644 labs/1/run.sh diff --git a/labs/1.md b/labs/1.md deleted file mode 100644 index 8095102..0000000 --- a/labs/1.md +++ /dev/null @@ -1,27 +0,0 @@ -Lab 1: Starting up your account in the Teradata University Network (TUN) - -1. Register for TUN as a student member at http://www.teradatauniversitynetwork.com/tun/ (For the student access password please check in the Course News and Announcements or contact your tutor). -2. Create an account for the Teradata SQL Assistant (Note: this account is different from the one you created to be a TUN member): http://tunweb.teradata.ws/tunstudent/ - To complete the registration form, please use the following information: - - University: Athabasca University - Instructor: Larbi Esmahi - Course: COMP 378: Introduction to Database Management - Course Password: There is no course password, so just leave this field blank -3. Read the SQL Assistant Web Edition User Manuals, which can be found under "Help" on the main menu of http://tunweb.teradata.ws/tunstudent/. Note that there are a number of additional user manuals available under the Help menu, if you need them (but you are not required to read them for the course). -4. Log in to SQL Assistant, but leave the ‘Default database’ field blank. -5. Familiarize yourself with the SQL Assistant using the following queries: - a. Create a table in your default database. - ```sql - CREATE TABLE people (id integer, address varchar(20), phone_number varchar(15)); - ``` - b. Insert records in the created table. - ```sql - INSERT INTO people values (10, '123 sesame street', '7803333222'); - INSERT INTO people values (11, '1 university drive', '7805555444'); - ``` - c. Select records from the table. - ```sql - SELECT * from people; - ``` -6. Log out of the SQL Assistant and TUN. diff --git a/labs/1/README.md b/labs/1/README.md new file mode 100644 index 0000000..8095102 --- /dev/null +++ b/labs/1/README.md @@ -0,0 +1,27 @@ +Lab 1: Starting up your account in the Teradata University Network (TUN) + +1. Register for TUN as a student member at http://www.teradatauniversitynetwork.com/tun/ (For the student access password please check in the Course News and Announcements or contact your tutor). +2. Create an account for the Teradata SQL Assistant (Note: this account is different from the one you created to be a TUN member): http://tunweb.teradata.ws/tunstudent/ + To complete the registration form, please use the following information: + + University: Athabasca University + Instructor: Larbi Esmahi + Course: COMP 378: Introduction to Database Management + Course Password: There is no course password, so just leave this field blank +3. Read the SQL Assistant Web Edition User Manuals, which can be found under "Help" on the main menu of http://tunweb.teradata.ws/tunstudent/. Note that there are a number of additional user manuals available under the Help menu, if you need them (but you are not required to read them for the course). +4. Log in to SQL Assistant, but leave the ‘Default database’ field blank. +5. Familiarize yourself with the SQL Assistant using the following queries: + a. Create a table in your default database. + ```sql + CREATE TABLE people (id integer, address varchar(20), phone_number varchar(15)); + ``` + b. Insert records in the created table. + ```sql + INSERT INTO people values (10, '123 sesame street', '7803333222'); + INSERT INTO people values (11, '1 university drive', '7805555444'); + ``` + c. Select records from the table. + ```sql + SELECT * from people; + ``` +6. Log out of the SQL Assistant and TUN. diff --git a/labs/1/run.sh b/labs/1/run.sh new file mode 100644 index 0000000..1cca564 --- /dev/null +++ b/labs/1/run.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +./bin/console -c 'CREATE TABLE people (id integer, address varchar(20), phone_number varchar(15));' +./bin/console -c "INSERT INTO people values (10, '123 sesame street', '7803333222');" +./bin/console -c "INSERT INTO people values (11, '1 university drive', '7805555444');" +./bin/console -c "SELECT * FROM people;" -- cgit v1.2.3