1 / 79

Database Systems

Database Systems. Overall view. Unit I Architecture, introduction to DBMS,RDBMS and SQL Unit II Basics of relational model Unit III Views, FDs and Normal forms (1NF – 3NF, BCNF) Unit IV 4NF, 5NF, ER diagrams, transactions Unit V Security, Distributed database, Object/Relational DB.

ajimmie
Download Presentation

Database Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database Systems www.techstudent.co.cc

  2. Overall view • Unit I • Architecture, introduction to DBMS,RDBMS and SQL • Unit II • Basics of relational model • Unit III • Views, FDs and Normal forms (1NF – 3NF, BCNF) • Unit IV • 4NF, 5NF, ER diagrams, transactions • Unit V • Security, Distributed database, Object/Relational DB www.techstudent.co.cc

  3. Definitions www.techstudent.co.cc

  4. Basic Definitions • Data -raw facts that are recorded( unprocessed) • Informationis derived from data • Example : • Unprocessed facts(data) • Bill Number : 3425 • Bill date : 20-June-2007 • Bill amount: Rs. 10000 • Information is processed facts • The bill number 3425 dated 20th june 2007 has amount of Rs. 10,000. www.techstudent.co.cc

  5. Basic Definitions • Database • collection of related data DBMS • A system for defining, creating, manipulating and querying data • Shelters users from storage format of database www.techstudent.co.cc

  6. Functions of DBMS • Major Functions • Data Definition • Data construction • Data manipulation • Other functions • Data recovery • Data security and integrity • Data dictionary etc… www.techstudent.co.cc

  7. To note….. • Not every database is managed by a DBMS • A DBMS is general purpose software. i.e, it is not application specific • A DBMS takes care of storing and accessing data, leaving only application specific tasks to application programs www.techstudent.co.cc

  8. Files Vs Databases www.techstudent.co.cc

  9. Files Vs databases • Database • a collection of data that is multidimensional • internal links between its entries make the information accessible from a variety of perspectives • Flat File • a traditional one-dimensional file storage system that presents its information from a single point of view www.techstudent.co.cc

  10. www.techstudent.co.cc

  11. Conceptual layers of DB management www.techstudent.co.cc

  12. What is a database system? www.techstudent.co.cc

  13. Database Systems • A software that controls the • Organization • Storage • Retrieval • Security • Integrity of data in a database www.techstudent.co.cc

  14. Database systems It accepts requests from the application program and instructs the operating system to fetch the desired data www.techstudent.co.cc

  15. Database systems • A database system is a computerized system whose overall purpose is to store information and to allow users to retrieve and update the informationon demand www.techstudent.co.cc

  16. Simplified picture of database systems database Application programs End users Database Management System(DBMS) www.techstudent.co.cc

  17. Database systems • Four major components • Data • Hardware • Software • users www.techstudent.co.cc

  18. Data • Database systems are available in smaller or larger systems • Single-user system: • System in which at most one user can access the database at any given time • Multi-user system: • System in which many users can access the database at the same time www.techstudent.co.cc

  19. Data • Data in the database is both integrated and shared • Integrated: • database is a unification of several distinct files • The redundancy among the files are partially or wholly eliminated • Shared : • Different users can have access to the same data • I.e, database can be shared among different users www.techstudent.co.cc

  20. Hardware • Hardware components consists of • Secondary storage volumes • Magnetic disks, I/O devices, device controllers, I/O channels etc. • Hardware processor and associated main memory that support the execution of the database system software www.techstudent.co.cc

  21. Software • Between the actually stored data andthe users of the system, there is a layer of software called as Database Management System(DBMS). • DBMS is also called as database manager or database server • All requests for accessing the database are handled by the DBMS • Thus the main function of DBMS is to shield the database users from the hardware-level details www.techstudent.co.cc

  22. Software • Note: • DBMS is the most important software component in the overall system. • Others software include utilities, application development tools, design aids, report writers and the transaction manager. • The term DBMS instance refers to a particular copy of a product that runs at a particular time. www.techstudent.co.cc

  23. Users • Application Programmers • End User • Database Administrator www.techstudent.co.cc

  24. Users-Application Programmers • Responsible for writing application programs which allow end users to access the database interactively. • Application can be written in some programming languages like COBOL ,C, C++, Java etc.. • Programs access the database by issuing appropriate requests to the DBMS www.techstudent.co.cc

  25. Users- End Users • Persons who access database for querying, updating and generating reports • Categories • Casual End Users • Naïve or parametric users • Sophisticated end users • Stand alone users www.techstudent.co.cc

  26. Users- End Users • Casual End Users: • Occasional access • Different information each time • Typically middle or high level managers or occasional browsers • Naïve or parametric end users • Constant querying and updating database • Use standard queries www.techstudent.co.cc

  27. Users- End Users • Sophisticated End users • Familiarized with the facilities of DBMS inorder to meet the complex requirements • Include engineers, scientists, business analysts, etc.,, • Stand-alone users • Maintain personal databases by using ready-made program packages that provide easy-to-use menu or graphics-based interfaces www.techstudent.co.cc

  28. Users- Database administrator • a person who has the central responsibility of data is data administrator • Data administrator is a manager. • The technical person who implements data manager’s decision isDatabase administrator(DBA) www.techstudent.co.cc

  29. Users- Database administrator • DBA is responsible for • Creating the actual database • Authorizing access • Coordinating and monitoring the db use • Acquiring hardware and software resources • Ensures that system operates with adequate performance www.techstudent.co.cc

  30. Why Database? www.techstudent.co.cc

  31. Database Vs paper-based methods • Compactness • Speed • Less drudgery • Current, up-to-date information • Protection www.techstudent.co.cc

  32. Benefits of database Approach • Data can be shared • Redundancy can be reduced • Inconsistency can be avoided • Transaction support can be provided www.techstudent.co.cc

  33. Benefits of database Approach • Integrity can be maintained • Security can be enforced • Conflicting requirements can be balanced • Standards can be enforced www.techstudent.co.cc

  34. Data independence • One of the most important benefits of DBMS • Two types • Physical data independence • Logical data independence www.techstudent.co.cc

  35. Data independence • Logical data independence • Protection from changes in logical structure of data • Physical data independence • Protection from changes in physical structure of data www.techstudent.co.cc

  36. Types of DBMSs • Relational – Data model based on tables • Network – data model based on graphs with records as nodes and relation ship between records as edges • Hierarchical – data model based on trees www.techstudent.co.cc

  37. Types of DBMSs • Object-oriented – data model based on object-oriented programming paradigm • Distributed- composed of several independent DBMSs running at the nodes of a communications network www.techstudent.co.cc

  38. Overhead costs of a DBMS • High initial investment in hardware, software and training • Generality for defining and processing data • Overhead for providing security, concurrence control, recovery and integrity functions www.techstudent.co.cc

  39. When not to use a DBMS • Can't afford the overhead • Cost of the DBMS • Training time • Processing time • Application is simple • Single table www.techstudent.co.cc

  40. Database System Architecture www.techstudent.co.cc

  41. Three levels of Architecture • Internal level (or storage level) • Concerned with the way data is stored inside the system • External level (or user logical level) • Concerned with the way data is seen by individual users • Conceptual level (or community logical level) • Level ofindirection between the other two www.techstudent.co.cc

  42. Three levels of Architecture External level Conceptual Level Internal Level www.techstudent.co.cc

  43. Three levels of Architecture • There may be many distinct external views • There will be precisely one conceptual view • There will be precisely one internal view representing the data stored internally • External and conceptual are both model levels • Internal level is an implementation level www.techstudent.co.cc

  44. Three levels of Architecture- Example External (C) Struct employee{ char empno(6); int salary; } External (COBOL) 01 EMPC. 02 EMPNO PIC X(6). 02 DEPTNO PIC X(4). Conceptual EMPLOYEE EMPLOYEE_NUMBER CHARACTER(6) DEPARTMENT_NUMBER CHARACTER(4) SALARY DECIMAL(5) Internal STORED_EMPLOYEE BYTES=20 PREFIX BYTES=6, OFFSET=0 EMP# BYTES=6, OFFSET=6, INDEX=EMPX DEPT# BYTES=4.OFFSET=12 PAY BYTES=4,ALIGN=FULLWORD,OFFSET=16 www.techstudent.co.cc

  45. External Level • Individual user level • User can be application programmer or end user • Each user has a language • Application programmer may use a conventional programming language or a language specific to the system • End user may use a query language or some special-purpose language. www.techstudent.co.cc

  46. External level • All languages will include a data sublanguage • Data Sublanguage is said to be embedded within the host language • A data sublanguage supported by all current systems is SQL • SQL can be used interactively as stand-alone query language and also embedded in other languages www.techstudent.co.cc

  47. External Level • If the data sublanguage and the host language are not distinct, it is said to be tightly coupled • If they are clearly and easily separable , it is loosely coupled. • Any data sublanguage has two subordinate languages • Data Definition Language (DDL) • Data Manipulation Language (DML) www.techstudent.co.cc

  48. External Level • ANSI SPARC term for individual user’s view is an external view • External view consists of many occurrences of many types of external record • Each external view is defined by an external schema • External schema is written using the DDL portion of the user’s data sublanguage www.techstudent.co.cc

  49. Conceptual Level • Conceptual view is a representation of entire information in a form somewhat similar to the physical storage. • Consists of many occurrences of many types of conceptual record • Conceptual view is defined by a conceptual schema www.techstudent.co.cc

  50. Conceptual Level • Conceptual schema is written using conceptual DDL • To achieve physical data independence, the DDL definitionsshould not involve any physical representation or access technique at all. www.techstudent.co.cc

More Related