Download Exercise 5

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

DBase wikipedia , lookup

Tandem Computers wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Oracle Database wikipedia , lookup

Microsoft Access wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Concurrency control wikipedia , lookup

Relational algebra wikipedia , lookup

Ingres (database) wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

SQL wikipedia , lookup

Relational model wikipedia , lookup

PL/SQL wikipedia , lookup

Transcript
Exercise 5
“Use of the relational DBS Firebird”
29.03.2007
Prof. Dr. Andreas Schmietendorf
1
Exercise description
29.03.2007
Prof. Dr. Andreas Schmietendorf
2
Overview
This exercise considers the application of a real relational database
system. Under the use of the RDBMS Firebird we want to use
simple SQL instructions for select and insert statements. After a first
analysis of the database scheme, there are tasks for the selection of
specific database tupel (rows of tables of the data base).
Furthermore we want to change selected database entries. All
executed tasks should be documented with help of a protocol.
28.05.2007
Prof. Dr. Andreas Schmietendorf
3
Task 1 (non SQL)
§
Please analyze the structure and the content of the following tables
with the help of the property editor:
§
-
CUSTOMER
-
DEPARTMENT
-
EMPLOYEE
Document your results!
-
Table structure
-
Used attributes
-
Used data types
28.05.2007
Prof. Dr. Andreas Schmietendorf
4
Task 2 (SQL)
§
Please write SQL queries for the selection of all data entries from
the following tables:
§
-
CUSTOMER
-
DEPARTMENT
-
EMPLOYEE
Please select from the table DEPARTMENT only the attributes
department, location and phone_no.
§
Please select from the table CUSTOMER all tuples for the case that
the attribute CITY is equal to ‘Milan’
28.05.2007
Prof. Dr. Andreas Schmietendorf
5
Task 3 (SQL)
§
Please write SQL queries for the table EMPLOYE. How many
employees work in USA, Canada, Japan, England, France, Italy.
Please consider the attribute JOB_COUNTRY for this analysis.
§
Please insert new data entries in the EMPLOYEE-database and
there in the table country. Please consider the SQL example at the
end of this description.
§
Try to execute the unchanged SQL statement again. In what are the
reasons for the returned SQL error?
28.05.2007
Prof. Dr. Andreas Schmietendorf
6
Use of the IBOConsole
29.03.2007
Prof. Dr. Andreas Schmietendorf
7
IBOConsole
§
§
§
Access to databases
-
Interbase (Borland)
-
Firebird (Open Source)
Available functionalities
-
Creation of a new database
-
Registration of an existing database
-
Use of SQL instructions
Database administration
-
User administration (create, update, delete)
-
Consideration of access rights
-
Backup & recovery
28.05.2007
Prof. Dr. Andreas Schmietendorf
8
IBOConsole
28.05.2007
Prof. Dr. Andreas Schmietendorf
9
Login procedure
SYSDBA
masterkey
28.05.2007
Prof. Dr. Andreas Schmietendorf
10
Registration of a database
DB file
DB name
28.05.2007
Prof. Dr. Andreas Schmietendorf
11
Registration of a database
Interactive SQL dialog
DB tables
28.05.2007
Prof. Dr. Andreas Schmietendorf
12
Hints and SQL examples
29.03.2007
Prof. Dr. Andreas Schmietendorf
13
Property editor
28.05.2007
Prof. Dr. Andreas Schmietendorf
14
Select statement 1
28.05.2007
Prof. Dr. Andreas Schmietendorf
15
Select statement 2
28.05.2007
Prof. Dr. Andreas Schmietendorf
16
Select statement 3
28.05.2007
Prof. Dr. Andreas Schmietendorf
17
Insert statement
28.05.2007
Prof. Dr. Andreas Schmietendorf
18
Organization
29.03.2007
Prof. Dr. Andreas Schmietendorf
19
Organization of the exercise
To carry out the exercise please use the following procedure:
§
Execute the tasks in teams
§
Recommended method
-
Analysis of the whole exercise (all slides!)
-
Carry out the tasks 1 until 3
-
Discussion about the results within each team
-
Documentation of the tasks
§
Treatment time: 120 min
§
Transfer of a corresponding protocol for each group
28.05.2007
Prof. Dr. Andreas Schmietendorf
20