Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Systems, 2008-2009 Presented by Rubi Boim (based on Jackie Assa’s Slides) 1.

Similar presentations


Presentation on theme: "Database Systems, 2008-2009 Presented by Rubi Boim (based on Jackie Assa’s Slides) 1."— Presentation transcript:

1 Database Systems, 2008-2009 Presented by Rubi Boim (based on Jackie Assa’s Slides) 1

2  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 2

3  Please join the forum at: https://forums.cs.tau.ac.il/ https://forums.cs.tau.ac.il/ 3

4  Submission date is Dec 2. (No late arrivals will be accepted)  Work should be done in pairs  Please, please, please, names and ID on the submittals. 4

5  Hard work, but real.  Work in groups of 4  Project goal: to tackle and resolve real-life DB related development issues  One Two stages.  Please use JAVA (SWT). (Check with me for other programming languages)  Thinking out of the box will be rewarded 5

6  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 6

7 Data files Database server (someone else’s C program) Applications connection (ODBC, JDBC) “Two tier database system” 7

8 8

9 9

10 Application DB infrastructure DB driver DB engine Storage Transport 10

11 DB programmer App programmer DBA Gui designer Tester 11

12  Why should it actually use database?  Persistence layer  Access data storage  Interfacing between systems  Large volumes  Scalability  Redundancy Application DB infrastructure DB driver DB engine Storage Transport 12

13  Goals:  Database “hiding”  Schema abstraction  Encapsulation of db mechanisms  How: (In two words) Application DB infrastructure DB driver DB engine Storage Transport 13

14 Application DB infrastructure DB driver DB engine Storage Transport  Used for:  API for database connectivity  Protocol converter  Performance improvements  Transaction management  Examples:  In a minute… 14

15  Mainly TCP but not only  Secure  Efficient  Fast but not fast enough Application DB infrastructure DB driver DB engine Storage Transport 15

16  Total management of the DB environment including  Security  Scalability (clustering)  Maintenance  Fault tolerant (disaster management)  Monitoring  Services  Large DB engines include Microsoft SQL Server, Oracle, SyBase, MySQL, etc. Application DB infrastructure DB driver DB engine Storage Transport 16

17 DB engine management includes:  Databases/Tables/Fields Creation/removal/modification/ optimization  Connections/Users/Roles Security/monitoring/logging  Jobs/Processes/Threads Scheduling/balancing/managing Application DB infrastructure DB driver DB engine Storage Transport 17

18  NAS/SAN, Raid and other stuff… (sorry… not in this course) Application DB infrastructure DB driver DB engine Storage Transport 18

19  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 19

20  ODBC  ADO  OLE-DB  MDAC/UDA  JDBC  ORM 20

21  Various standards have been developed for accessing database servers.  Some of the important standards are  ODBC (Open Database Connectivity) is the early standard for relational databases.  OLE DB is Microsoft’s object-oriented interface for relational and other databases.  ADO (Active Data Objects) is Microsoft’s standard providing easier access to OLE DB data for the non-object-oriented programmer. 21

22  Open Database Connectivity (ODBC) is a standard software API method for using database management systems (DBMS)  Maximum interoperability 22

23 Examples of common tasks:  Selecting a data source and connecting to it.  Submitting an SQL statement for execution.  Retrieving results (if any).  Processing errors.  Committing or rolling back the transaction enclosing the SQL statement.  Disconnecting from the data source. 23

24  UDA (Universal Data Access) and/or MDAC (Microsoft Data Access Components) include (ADO), OLE DB, and (ODBC). 24

25  Java DB connectivity API  Similar to ODBC  Why do you need it:  Pure Java  Simple API  Well….Multi-platform 25

26  API includes:  DriverManager, Connection, Statement, PreparedStatement, CallableStatement, ResultSet, SQLException, DataSource  JDBC Type Driver:  Type 1 - (JDBC-ODBC Bridge) drivers.  Type 2 - native API for data access which provide Java wrapper classes  Type 3 - 100% Java, makes use of a middle-tier between the calling program and the database..  Type 4 - They are also written in 100% Java and are the most efficient among all driver types. Calls directly into the vendor-specific database protocol. 26

27 27 Type 1Type 2Type 3Type 4

28  Object-Relational mapping is a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages.  For example: Hibernate, EJB3.0, JDO 28

29  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 29

30 30

31 Application DB infrastructure DB bridge/driver Transport (TCP) DB engine Server Machine Client Machine Standard wayUsing Tunnel Application DB infrastructure DB bridge/driver DB engine Server Machine Client Machine Tunnel machine (SSH server) proxy Proxy Machine TCP SSH TCP 31

32 Application DB infrastructure Db bridge/driver DB engine Tunnel machine (SSH server) proxy YOUR MACHINE define DB at localhost, port 1555 Nova.cs.tau.ac.il orasrv port 1521 Putty connects to nova and forward local port 1555 to orasrv port 1521 32

33 33

34  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 34

35  Oracle database – (at home express edition)  SQLDeveloper Free to download on oracle.com More tutorials on the course slides page 35

36  Host:localhost/orasrv  Port:1521  SID:xe/csodb/other?  Schemahr/user/system  Use the connection guide (link on the course slides page) for instruction on how to create a DB user:  TAU HR user / password: hr_readonly / hrro 36

37 Invoking (TAU): Sqlplus http://www.cs.tau.ac.il/~boim/courses/databases2009/slides/moreinfo/03-connection-guide.htm 37

38 38

39 39

40 40

41 41

42 42

43 43

44 44

45 45

46 46

47 47

48 48

49 Invoking (TAU): sqldeveloper 49

50 50

51 51

52 52

53 53

54 54

55 55

56 56

57 57

58 58

59 59

60 60

61 61

62 62

63 63

64 64

65 65

66 66

67 67

68 68

69 69

70 Installation only at home… 70

71  Installation  Create a user  Run a script  Query  Other database objects  Administration tasks Similar tutorial can be found in http://st-curriculum.oracle.com/tutorial/DBXETutorial/index.htm 71

72  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on homework 72

73  SQL functions and arithmetic conditions.  Usage of quotes (‘ and “)  LIKE, LOWER  Use the Syntax help in Query browser  MAX, MIN  IN 73

74 74

75 75

76 76

77 77

78 78

79 79

80 80


Download ppt "Database Systems, 2008-2009 Presented by Rubi Boim (based on Jackie Assa’s Slides) 1."

Similar presentations


Ads by Google