Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu07:aufgaben:01 [2024/09/30 14:09] – vdemir | modul:m290:learningunits:lu07:aufgaben:01 [2024/10/17 12:45] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
===== Requirements | ===== Requirements | ||
Zeile 6: | Zeile 6: | ||
* Means of aid: | * Means of aid: | ||
* Only teaching materials, no websearch, no use of ai. | * Only teaching materials, no websearch, no use of ai. | ||
- | * Establishment of a MySQL table **employee** and import of the provided inital data in order to perform the requirements of the task: 2: INSERT, 3: UPDATE, 4: DELETE | + | |
+ | * Conduct the database schema (instance) as foundation for our employee' | ||
+ | | ||
- | ===== Preparation | + | ===== Assignments ===== |
+ | |||
+ | ==== A: DATA SCHEMA | ||
First of all we need a database schema (database workspace). Execute the following two lines on your MySQL installation. | First of all we need a database schema (database workspace). Execute the following two lines on your MySQL installation. | ||
Zeile 14: | Zeile 18: | ||
SHOW DATABASES; | SHOW DATABASES; | ||
USE hr_database; | USE hr_database; | ||
- | | ||
- | After executing the three SQL commands above, the feedback from your database would look like in the image below: | ||
- | |||
==== B: CREATE TABLE ==== | ==== B: CREATE TABLE ==== | ||
To exercise the DML commands, we need a suitable table including a reasonable amout of data. The following SQL statement will create a table **employee** regarding all necessary attributes of an " | To exercise the DML commands, we need a suitable table including a reasonable amout of data. The following SQL statement will create a table **employee** regarding all necessary attributes of an " | ||
- | |||
CREATE TABLE EMPLOYEES ( | CREATE TABLE EMPLOYEES ( | ||
Zeile 43: | Zeile 43: | ||
- **department** is a VARCHAR(50) field that stores the name of the department the employee is associated with. It has a NOT NULL constraint to ensure that every employee is assigned to a department. | - **department** is a VARCHAR(50) field that stores the name of the department the employee is associated with. It has a NOT NULL constraint to ensure that every employee is assigned to a department. | ||
- | ==== C: Inital DataImport ==== | ||
- | Once we have created our ' | ||
- | |||
- | |||
- | ==== Task B ==== | ||
- | Display all instances which are currently running on our database. | ||
- | |||
- | ==== Task C ==== | ||
- | Create the database instances | ||
- | * myDB_PERFECT | ||
- | * myDB_OK | ||
- | * myDB_OBSOLETE | ||
- | |||
- | and display your result. | ||
- | |||
- | ==== Task D ==== | ||
- | Drop the instance " | ||
- | |||
- | ==== Task E ==== | ||
- | Activate the instance " | ||
- | |||
- | ==== Task F ==== | ||
- | Display the system date by using the command " | ||
- | |||
===== Solution ===== | ===== Solution ===== | ||
- | [[modul: | + | [[modul: |
===== Vocabulary ===== | ===== Vocabulary ===== | ||
^ English ^ German ^ | ^ English ^ German ^ | ||
- | | obsolete | + | | preparatary work | Vorarbeit |
- | | credential | Berechtigungsnachweis | + | |
---- | ---- | ||
[[https:// | [[https:// |