Introduction to MySQL
Database Systems
1
Introduction to MySQL Database Systems 1 Agenda Bureaucracy - - PowerPoint PPT Presentation
Introduction to MySQL Database Systems 1 Agenda Bureaucracy Database architecture overview SSH Tunneling Intro to MySQL Comments on homework 2 Homework #1 Submission date is on the website.. (No late arrivals will be
1
2
Submission date is on the website.. (No late arrivals will be
Work should be done in pairs Submission is done via moodle, by one of the partners. Submit a zip file, with
an answers pdf that contains the full names and IDs of both partners on top
A .sql file for every query
Use the format described in the assignment
3
Hard work, but practical. Work in groups of 4 Project goal: to tackle and resolve real-life DB related
One stage, with a check point in ~the middle Use JAVA (SWT) Thinking out of the box will be rewarded
4
5
6
7
8
Runs someone else’s client Your computer at home … which connects to the server on the same machine Your computer at home Runs a client via your code … which connects to the MySQL server
9
DB programmer App programmer DBA Gui designer Tester
10
Application DB infrastructure DB driver DB engine Storage Transport
11
Database “hiding” Schema abstraction Encapsulation of db mechanisms
E.g., hibernate
Application DB infrastructure DB driver DB engine Storage Transport
12
Application DB infrastructure DB driver DB engine Storage Transport
13
Application DB infrastructure DB driver DB engine Storage Transport
14
Total management of the DB
Security Scalability Fault tolerant (disaster management) Monitoring Services
Large DB engines include Microsoft SQL Server, Oracle,
Application DB infrastructure DB driver DB engine Storage Transport
15
Application DB infrastructure DB driver DB engine Storage Transport
16
We are interested in the storage-engine
Application DB infrastructure DB driver DB engine Storage Transport
17
18
GUI Application-User Management
Do not confuse with DB users!
Image processing And so on… The application needs
Runs on the application server
E.g., your computer at home
19
Application DB infrastructure DB driver DB engine Storage Transport
Entities in our application (Images,
Relations between entities (Image
Common operations (upload/edit/delete
20
Application DB infrastructure DB driver DB engine Storage Transport
Application DB infrastructure DB driver DB engine Storage Transport
21
Application DB infrastructure DB driver DB engine Storage Transport
22
E.g., MySQL Community Server The db stores
Our tables with the data (Images, users, etc.) Optimization components (Indexes, triggers) Predefined operations (procedures, functions)
Executes the requests we sent
E.g., insert an image
Application DB infrastructure DB driver DB engine Storage Transport
23
Application DB infrastructure DB driver DB engine Storage Transport
24
25
26
27
Application DB infrastructure DB bridge/driver Transport (TCP) DB engine Server Machine Client Machine
Application DB infrastructure DB bridge/driver DB engine Server Machine Client Machine Tunnel machine (SSH server) proxy Proxy Machine TCP SSH TCP
28
Application DB infrastructure Db bridge/driver DB engine Tunnel machine (SSH server) proxy
29
30
31
32
MySQL (Community Server – Home) MySQL (Enterprise Edition – TAU) MySQL Workbench (GUI Tool..) MySQL Connector (J) – In two weeks…
33
You can create your own user (schema) by following
For the project, each group will get a dedicated
34
35
Can be installed with the other MySQL products Schema: a set of tables (and views) in a database. Each schema has its
http://www.cs.tau.ac.il/system/MySQLConn
mysql -u sakila -h mysqlsrv.cs.tau.ac.il sakila –p
36
37
38
39
40
41
Make sure to install server, workbench and examples
42
Ope
Then open workbench and create new connection
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
http://dev.mysql.com/doc/refman/5.6/en/index.html
60
61