HND Agri DBMS Introduction MH Mohamed Nafas 1 Why DBMS? Suppose we need to develop a Information system. How do we store the data? (use file structures…) query the data? (write programs…) Update data safely? (write more programs…) provide different views on the same data? (staff & students diffrent) ( prog…) deal with crashes? (prog…) DBMS helps to above activities. 2 File based system Manual file Processing (paper based) Time Consuming Does not support large volumes of data File based Processing Database Management system 3 ID File Based Processing Name Data Entry File Processing Address TelNo 001 mery colombo 747374 Marks 34 Student System Files ID Name Address TelNo Data Entry 4 File Processing Data Duplication Books-bor 001 mery colombo 747374 6 Library System Files ID File Based Processing Name Change request Data Entry File Processing Address TelNo 001 mery colombo 747374 Marks 34 Student System Files ID Name Address TelNo Data Entry File Processing Books-bor 001 mery colombo 747374 6 Library System Files 5 ID File Based Processing Name Address Change request Data Entry File Processing 001 mery Address Kandy TelNo 747374 Marks 34 Student System Files ID Name Address TelNo Data Entry 6 File Processing Inconsistent Data Books-bor 001 mery colombo 747374 6 Library System Files Problem in file based system Inconsistent data Data duplication Security Inflexibility Limited data sharing Excessive program maintenance How do we resolve these problems? 7 Solution is DBMS DBMS is solution to rectify file based processing problems 8 Database Processing Change Request Data Entry & Reports Students stno Name 001 mery ……………. address colombo Application Programs DBMS Data Entry & Reports Library App. Programs Database Database Processing Change Request Data Entry & Reports Students stno 001 ……………. Name mery address Kandy Application Programs DBMS Data Entry & Reports Library App. Programs Database DATABASE DEFINITION A shared collection of logically related data designed to meet the information requirements of an organisation. 11 Database Management System (DBMS) A software system that enables users to define, create and maintain the database and which provides controlled access to the database. 12 History of Database Systems 1950s and early 1960s: Data processing using magnetic tapes for storage Tapes provide only sequential access Punched cards for input Late 1960s and 1970s: Hard disks allow direct access to data Network and hierarchical data models in widespread use Ted Codd defines the relational data model 13 Would win the ACM Turing Award for this work IBM Research begins System R prototype UC Berkeley begins Ingres prototype High-performance (for the era) transaction processing History (cont.) 1980s: Research relational prototypes evolve into commercial systems Parallel and distributed database systems Object-oriented database systems 1990s: SQL becomes industry standard Large decision support and data-mining applications Large multi-terabyte data warehouses Emergence of Web commerce 2000s: 14 XML and XQuery standards Automated database administration Increasing use of highly parallel database systems Web-scale distributed data storage systems Database models Early Types of DBMS Hierarchical Network Current Generation Relational Advanced Systems - 15 Object Based What is a Database System? Database System = Database + DBMS A Database is A large, integrated collection of data Models (represents) a real-world enterprise. Entities (e.g., students, courses) Relationships (e.g., Mary takes CS123) A Database Management System (DBMS) is A software package designed to store and Manages databases easily and efficiently. 16 Common Uses of Databases Try to think why each of these need to use a database: Supermarkets Insurance Credit Cards/Banking Libraries Travel Agents Universities 17 Examples: DBMS MSAccess MySQL – freeware (Windows & Unix) McKoi – freeware, Java based. Oracle SQL Server – Microsoft product – we use in this course Any other ? Common features: Relational model SQL as query language Server-client architecture 18 Advantages of using a DBMS Minimal data redundancy Efficient data access Data integrity and security Data administration Concurrent access, recovery from crashes Reduced application development time 19 Disadvantages Complexity Additional Hardware costs Experts – Specialised personnel Higher impact of failure Simple applications may not need DBMS at all 20 Questions? 21