Database Systems - Introduction

1,517 views

Published on

Definitions in database systems, problems with record files, database management system architecture.

Published in: Education, Technology, Business
1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total views
1,517
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
154
Comments
1
Likes
5
Embeds 0
No embeds

No notes for slide

Database Systems - Introduction

  1. 1. Introduction Database Management Systems References Database Systems Introduction H. Turgut Uyar ¸Sule ¨O˘g¨ud¨uc¨u 2002-2015 H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  2. 2. Introduction Database Management Systems References License c 2002-2015 T. Uyar, ¸S. ¨O˘g¨ud¨uc¨u You are free to: Share – copy and redistribute the material in any medium or format Adapt – remix, transform, and build upon the material Under the following terms: Attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. NonCommercial – You may not use the material for commercial purposes. ShareAlike – If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. For more information: https://creativecommons.org/licenses/by-nc-sa/4.0/ Read the full license: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  3. 3. Introduction Database Management Systems References Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  4. 4. Introduction Database Management Systems References Problem Record Files Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  5. 5. Introduction Database Management Systems References Problem Record Files Problem store and process large amounts of data effectively add new data change existing data delete data query data: planned - ad hoc CRUD: create - read - update - delete H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  6. 6. Introduction Database Management Systems References Problem Record Files Problem store and process large amounts of data effectively add new data change existing data delete data query data: planned - ad hoc CRUD: create - read - update - delete H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  7. 7. Introduction Database Management Systems References Problem Record Files Data persistent data: data that must be stored due to the nature of the information temporary data output data: data that can be derived from persistent data (query results, reports, etc.) input data: unprocessed data that just entered the system H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  8. 8. Introduction Database Management Systems References Problem Record Files Example: University student data Student Affairs: student name, number, department, courses taken, internships, . . . common data: student name, number, department, . . . Library: student name, number, department, books lent, . . . application specific data: courses, internships, books, . . . H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  9. 9. Introduction Database Management Systems References Problem Record Files Example: University student data Student Affairs: student name, number, department, courses taken, internships, . . . common data: student name, number, department, . . . Library: student name, number, department, books lent, . . . application specific data: courses, internships, books, . . . H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  10. 10. Introduction Database Management Systems References Problem Record Files Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  11. 11. Introduction Database Management Systems References Problem Record Files Record Files every application has its own data every application keeps its data in the files that it manages itself H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  12. 12. Introduction Database Management Systems References Problem Record Files Redundancy same data kept in multiple places waste of disk space example names, numbers and departments of students are kept both in Student Affairs and in the Library H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  13. 13. Introduction Database Management Systems References Problem Record Files Inconsistency multiple copies of the same data can become different example the name of the same student can be recorded as“Victoria Adams”in Student Affairs and as“Victoria Beckham”in the Library H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  14. 14. Introduction Database Management Systems References Problem Record Files Integrity it is difficult to keep the data correct example “Control and Computer Engineering”department is closed but the department data of its students remains the same H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  15. 15. Introduction Database Management Systems References Problem Record Files Duplicated Work a lot of work must be duplicated for every new application example a new application will be developed for the Scholarship Office H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  16. 16. Introduction Database Management Systems References Problem Record Files Policy Gaps no standards in the applications of the institution different paradigms, methods, programming languages data transfer between applications each department considers only its own requirements H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  17. 17. Introduction Database Management Systems References Problem Record Files Policy Gaps no standards in the applications of the institution different paradigms, methods, programming languages data transfer between applications each department considers only its own requirements H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  18. 18. Introduction Database Management Systems References Problem Record Files Security hard to define detailed security permissions security depends only on the operating system H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  19. 19. Introduction Database Management Systems References Problem Record Files Data Dependence data dependence: application code depends on the organization of the data and the access method hard to make changes in the code H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  20. 20. Introduction Database Management Systems References Problem Record Files Data Dependence Example student number is a string in Student Affairs but a number in the Library Student Affairs application keeps a B-tree index on the student number B-tree search algorithms are used for queries what if we decide to switch to a hashed index? H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  21. 21. Introduction Database Management Systems References Introduction Client / Server SQL Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  22. 22. Introduction Database Management Systems References Introduction Client / Server SQL Database Management Systems data is kept in a shared system applications access data over a common interface H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  23. 23. Introduction Database Management Systems References Introduction Client / Server SQL ANSI/SPARC Architecture H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  24. 24. Introduction Database Management Systems References Introduction Client / Server SQL External Level external level from the end user’s perspective: data needed by that end user interface of the application external level from the application programmer’s perspective: programming language database extensions to this language: data sublanguage H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  25. 25. Introduction Database Management Systems References Introduction Client / Server SQL External Level external level from the end user’s perspective: data needed by that end user interface of the application external level from the application programmer’s perspective: programming language database extensions to this language: data sublanguage H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  26. 26. Introduction Database Management Systems References Introduction Client / Server SQL Conceptual Level conceptual level: the entire data where data independence is achieved catalogue: definitions that describe the data databases data types, integrity constraints users, privileges, security constraints H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  27. 27. Introduction Database Management Systems References Introduction Client / Server SQL Internal Level internal level: implementation details how the data is represented files, records how the data is accessed pointers, indexes, B-trees H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  28. 28. Introduction Database Management Systems References Introduction Client / Server SQL Conversions conversions between levels for data independence example: conceptual - external present the student number as a string to the Student Affairs application, and as a number to the Library application example: conceptual - internal generate an index on the student number H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  29. 29. Introduction Database Management Systems References Introduction Client / Server SQL Conversions conversions between levels for data independence example: conceptual - external present the student number as a string to the Student Affairs application, and as a number to the Library application example: conceptual - internal generate an index on the student number H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  30. 30. Introduction Database Management Systems References Introduction Client / Server SQL Administrator Roles data administator: makes the decisions which data will be stored? who can access which data? database administrator: applies the decisions defines the conceptual - external/internal conversions adjusts system performance guarantees system availability H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  31. 31. Introduction Database Management Systems References Introduction Client / Server SQL Administrator Roles data administator: makes the decisions which data will be stored? who can access which data? database administrator: applies the decisions defines the conceptual - external/internal conversions adjusts system performance guarantees system availability H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  32. 32. Introduction Database Management Systems References Introduction Client / Server SQL DBMS Functions data definition language data manipulation language checking data manipulation requests for security constraints checking data manipulation requests for integrity constraints processing simultaneous requests properly performance H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  33. 33. Introduction Database Management Systems References Introduction Client / Server SQL DBMS Functions data definition language data manipulation language checking data manipulation requests for security constraints checking data manipulation requests for integrity constraints processing simultaneous requests properly performance H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  34. 34. Introduction Database Management Systems References Introduction Client / Server SQL Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  35. 35. Introduction Database Management Systems References Introduction Client / Server SQL Client / Server Architecture server: provides the DBMS functions client: provides the interaction between the user and the server vendor supplied tools (query processors, report generators, . . . ) applications developed by application programmers H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  36. 36. Introduction Database Management Systems References Introduction Client / Server SQL Architecture client and server can be on the same computer or on different computers H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  37. 37. Introduction Database Management Systems References Introduction Client / Server SQL Multiple Clients / Single Server many clients can connect to a single server server is a bottleneck replication H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  38. 38. Introduction Database Management Systems References Introduction Client / Server SQL Topics 1 Introduction Problem Record Files 2 Database Management Systems Introduction Client / Server SQL H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  39. 39. Introduction Database Management Systems References Introduction Client / Server SQL SQL Structured Query Language data definition language data manipulation language interaction with general purpose programming languages started by IBM in the 1970s standards: 1992, 1999, 2003 H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  40. 40. Introduction Database Management Systems References Introduction Client / Server SQL SQL Products Oracle, IBM DB2, MS-SQL, . . . open source: PostgreSQL, MySQL, . . . embedded: SQLite, . . . H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems
  41. 41. Introduction Database Management Systems References References Required Reading: Date Chapter 1: An Overview of Database Management 1.4. Why Database? 1.5. Data Independence Chapter 2: Database System Architecture H. Turgut Uyar, ¸Sule ¨O˘g¨ud¨uc¨u Database Systems

×