Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| modul:m290:learningunits:lu06:aufgaben:a01 [2024/10/22 12:56] – vdemir | modul:m290:learningunits:lu06:aufgaben:a01 [2024/10/29 11:55] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== LU09.A01 - SQL- DCL: CREATE User - Under construction | + | ====== LU09.A01 - SQL- DCL: |
| + | It is high time to mess a litte around with our new SQL powers, don't you think? So, let's try it directly on our Webstorm. | ||
| + | |||
| + | As the database administrator, | ||
| ===== Requirements | ===== Requirements | ||
| * Work type: individual | * Work type: individual | ||
| - | * Timeframe: | + | * Timeframe: |
| * Means of aid: | * Means of aid: | ||
| * only teaching materials, no websearch, no use of ai. | * only teaching materials, no websearch, no use of ai. | ||
| - | * [[https://www.w3schools.com/sql/trysql.asp? | + | * Webstorm with connection to the MySQL-DB |
| - | * Expected result: Semantically and syntactically correct SQL statements according to the requirements | + | * Expected result: Prepare working enviroment, according to the requirements below. |
| + | |||
| + | ===== Case studies / Assignments ===== | ||
| + | Before we spend elbow grease, we need to prepare our working enviroment. Meaning we need to prepare our computer for the assignments later. | ||
| + | |||
| + | ==== Task 1.1 ==== | ||
| + | **Login as root**: Login in from Webstorm to your database as //root// (sysdba = systemadministrator for the datababase) with your a // | ||
| + | |||
| + | ==== Task 1.2 ==== | ||
| + | **New Database**: Create a new database named // | ||
| + | |||
| + | CREATE DATABASE myDatabase; | ||
| + | |||
| + | ==== Task 1.3 ==== | ||
| + | **use db**: Use that newly created db. | ||
| + | |||
| + | | ||
| + | |||
| + | ==== Task 1.4: ==== | ||
| + | ** Create a test table**: Create a table //users// with 3 columns | ||
| - | It is high time to mess a litte around with our new SQL powers, don't you think. So let's try it directly on our Webstorm. | + | CREATE TABLE users ( |
| - | ===== Assignments ===== | + | user_id INT AUTO_INCREMENT PRIMARY KEY, |
| + | username VARCHAR(50) NOT NULL, | ||
| + | email VARCHAR(100) NOT NULL | ||
| + | ); | ||
| + | | ||
| + | ==== Task 1.5: ==== | ||
| + | **Content data for testing:** Fill the table user with some test data: | ||
| + | |||
| + | INSERT INTO users (username, email) | ||
| + | VALUES | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| - | * a) ... | ||
| - | * | ||
| ===== Solution ===== | ===== Solution ===== | ||
| [[modul: | [[modul: | ||
| Zeile 20: | Zeile 58: | ||
| ===== Vocabulary ===== | ===== Vocabulary ===== | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| - | | respectively | + | | explicitely |
| | assignment | Auftrag | | | assignment | Auftrag | | ||
| + | | to revoke | widerrufen, aufheben | | ||
| ---- | ---- | ||
| [[https:// | [[https:// | ||