|
| 1 | +--- |
| 2 | +layout: subpage |
| 3 | +title: Database Management Systems |
| 4 | +sidebarClass: sidebar |
| 5 | +navbar: |
| 6 | + - Back: study-wiki |
| 7 | +--- |
| 8 | + |
| 9 | +[refs]: c1 silber and ragu |
| 10 | + |
| 11 | +<div id="Purpose "></div> |
| 12 | + |
| 13 | +# Purpose of Database Management Systems # |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | + |
| 18 | +A DBMS is a collections of interrelated data and set of programs to access the data. |
| 19 | + |
| 20 | +DB contain relevant information about a particular enterprise/organization |
| 21 | + |
| 22 | +DBMS provides and environment which is efficient and convenient to use |
| 23 | + |
| 24 | +## Issues of file systems for data storage ## |
| 25 | + |
| 26 | +* Data redundancy and inconsistency (multiple formats, duplication of information in diff files) |
| 27 | +* Difficulty in data access (need a new program for each new task) |
| 28 | +* Data isolation (multiple files and formats) |
| 29 | +* Integrity (integrity problems become part of program code, making it hard to add new ones) |
| 30 | +* Atomicity of updates |
| 31 | +* Concurrent access |
| 32 | +* Security |
| 33 | + |
| 34 | +## Why a DBMS? ## |
| 35 | + |
| 36 | +* Provides independent data and (much more) efficient access to that data. |
| 37 | +* Since a DBMS removes the need to control data from the application itself, it reduces application development time. |
| 38 | +* Data integrity and security (obviously reducing development time), through usage of mechanisms such as Data Abstraction |
| 39 | +* Uniform data administration ???? |
| 40 | +* Concurrent access and crash recovery (namely through atomicity of access) |
| 41 | + |
| 42 | +## Levels of Data Abstractions ## |
| 43 | + |
| 44 | +### Physical level ### |
| 45 | + |
| 46 | +Describes how data is stored |
| 47 | + |
| 48 | +### Logical level ### |
| 49 | + |
| 50 | +Describes data stored in the database, and the relationships among the data |
| 51 | + |
| 52 | +### View level ### |
| 53 | + |
| 54 | +Application programs may hide details of data types; views can also hide information for security purposes |
| 55 | + |
| 56 | +## Data models ## |
| 57 | + |
| 58 | +A collection of conceptual tools for describing data, relationships among them, their semantics and constraints |
| 59 | + |
| 60 | +## Data Independence ## |
| 61 | + |
| 62 | +Applications are insulated from how data is structured and stored |
| 63 | + |
| 64 | +**Logical data independence** - protection from changes in the logical structure of data |
| 65 | +**Physical data independence** - protection from changes in the physical structure of data |
| 66 | + |
| 67 | +## Instances and Schema ## |
| 68 | + |
| 69 | +**Schema** - logical structure of the database, the description of a particular collection of data using a given data model |
| 70 | +(analogous to a class in java) |
| 71 | + * *Physical* and *Logical* schemas differ on what level they are designed in (physical or logical) |
| 72 | + |
| 73 | +**Instance** - the content of the database at a particular point in time (analogous to the value of variable) |
| 74 | + |
| 75 | +## SQL: Structured Query Language ## |
| 76 | + |
| 77 | +A relational DBMS provides a DDL and a DML as part of a single DB language (SQL) |
| 78 | + |
| 79 | +SQL is a declarative query language (user specifies what data is required, without specifying the method of access; |
| 80 | +in procedural languages the method is specified) |
| 81 | + |
| 82 | +### DDL (Data Definition Language)### |
| 83 | + |
| 84 | +DDL compiler generates a set of tables stored in a data dictionary, which essentially contains metadata |
| 85 | + |
| 86 | +### DML (Data Manipulation Language)### |
| 87 | + |
| 88 | +Language for accessing and manipulating data |
| 89 | + |
| 90 | +## Transaction Management ## |
| 91 | + |
| 92 | +A transaction is a collection of operations that perform a single logical function in a database application |
| 93 | + |
| 94 | +The transaction management component ensures that the database remains in a consistent state despite system and transaction failures |
| 95 | + |
| 96 | +Transactions must be ACID (Atomic, Consistent, Isolated and Durable/persistent) |
| 97 | + |
| 98 | +## Database Users ## |
| 99 | + |
| 100 | +Users are differentiated by the way they expect to interact with the system |
| 101 | + |
| 102 | +* Application programmers: interact with the system through DML calls |
| 103 | +* Sophisticated users: form requests in a database query language |
| 104 | +* Naïve/end users: invoke one of the permanent application programs that have been written previously |
| 105 | +* Database administrator: coordinate all the activities of the database system, has a good understanding of the enterprise's information |
| 106 | +resources and needs: |
| 107 | + * Schema definition |
| 108 | + * Storage structure and access method definition |
| 109 | + * Schema and physical organization modification |
| 110 | + * Granting user authority to access the database |
| 111 | + * Specifying integrity constraints |
| 112 | + * Acting as liaison with users |
| 113 | + * Monitoring performance, tuning the system and responding to changes in requirements |
| 114 | + |
| 115 | +## Database Tuning ## |
| 116 | + |
| 117 | +Activity of making a database application run faster (higher throughput, though it may mean lower response time for time-critical applications) |
0 commit comments