1 / 43

Introduction to Databases

Introduction to Databases. Examples of Database Applications. File-Based Processing. What problems exist?. Database Approach. Arose because: Definition of data was embedded in application programs, rather than being stored separately and independently.

alma
Download Presentation

Introduction to Databases

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. Introduction to Databases

  2. Examples of Database Applications

  3. File-Based Processing What problems exist?

  4. Database Approach • Arose because: • Definition of data was embedded in application programs, rather than being stored separately and independently. • No control over access and manipulation of data beyond that imposed by application programs. • Result: • the database and Database Management System (DBMS).

  5. Database • Shared collection of logically related data (and a description of this data), designed to meet the information needs of an organization. • System catalog (metadata) provides description of data to enable program–data independence. • Logically related data comprises entities, attributes, and relationships of an organization’s information.

  6. Database Management System (DBMS) • A software system that enables users • define • create • maintain the database • provides controlled access to this database.

  7. Database Management System (DBMS) How have things improved?

  8. Database Approach • Data definition language (DDL). • Permits specification of • data types • structures • any data constraints. • All specifications are stored in the database. • Data manipulation language (DML). • General enquiry facility (query language) of the data.

  9. Database Approach • Controlled access to database may include: • A security system. • An integrity system. • A concurrency control system. • A recovery control system. • A user-accessible catalog. • A view mechanism. • Provides users with only the data they want or need to use.

  10. Views • Allows each user to have his or her own view of the database. • Reduced complexity • Consistency regardless of underlying structural changes • A view is essentially some subset of the database.

  11. Components of DBMS Environment

  12. Roles in the Database Environment • Data Administrator (DA) • Responsible management of all data assets • Standards, Policies and Procedures • Conceptual/Logical • Database Administrator (DBA) • Security • Maintenance • Operations • Physical/Technical • Database Designers (Logical and Physical) • Identifying data/relationship • Business rules/Constraints • Logical Physical • Application Programmers • End Users (naive and sophisticated)

  13. History of Database Systems • First-generation • Hierarchical • Tree uses pointers to forward and backward segments • Strictly 1:M • Network • Use set concepts • Supports M:M • Second generation • Relational • Third generation • Object Relational • Object-Oriented

  14. Advantages of DBMSs • Control of data redundancy • Data consistency • More information from the same amount of data • Sharing of data • Improved data integrity • Improved security • Enforcement of standards • Economy of scale

  15. Advantages of DBMSs • Balanced conflicting requirements • Improved data accessibility and responsiveness • Increased productivity • Improved maintenance through data independence • Increased concurrency • Improved backup and recovery services

  16. Disadvantages of DBMSs • Complexity • Size • Cost of DBMS • Additional hardware costs • Cost of conversion • Performance • Higher impact of a failure

  17. Database Environment

  18. ANSI-SPARC Three-Level Architecture

  19. ANSI-Sparc Three Level Architecture • External / Semantic • User Views • Conceptual/Logical • Entities, attributes, relationships • Constraints • Semantic information • Security • Internal • Storage • Encryption/compression • Etc.

  20. Objectives of Three-Level Architecture • All users should be able to access same data. • A user’s view is immune to changes made in other views. • Users should not need to know physical database storage details. • Should be able to change database storage structures without affecting the users’ views. • Internal structure of database should be unaffected by changes to physical aspects of storage. • Should be able to change conceptual structure of database without affecting all users.

  21. Differences between Three Levels of ANSI-SPARC Architecture

  22. Data Independence • Logical Data Independence • Refers to immunity of external schemas to changes in conceptual schema. • Conceptual schema changes (e.g. addition/removal of entities). • Should not require changes to external schema or rewrites of application programs.

  23. Data Independence • Physical Data Independence • Refers to immunity of conceptual schema to changes in the internal schema. • Internal schema changes (e.g. using different file organizations, storage structures/devices). • Should not require change to conceptual or external schemas.

  24. Database Languages • Data Definition Language (DDL) • Allows the DBA or user to describe and name entities, attributes, and relationships required for the application • plus any associated integrity and security constraints. • Data Manipulation Language (DML) • Provides basic data manipulation operations on data held in the database. • Procedural DML • allows user to tell system exactly how to manipulate data. • Non-Procedural DML • allows user to state what data is needed rather than how it is to be retrieved.

  25. Database Languages • Fourth Generation Language (4GL) • Query Languages • Forms Generators • Report Generators • Graphics Generators • Application Generators.

  26. Data Model Integrated collection of concepts for describing data, relationships between data, and constraints on the data in an organization. • High-Level description of the schema • Data Model comprises: • a structural part; • Rules for constructing Databases • a manipulative part; • Defines the operations allowed • possibly a set of integrity rules • Ensures data accuracy

  27. Data Model • Purpose • To represent data in an understandable way. • Categories of data models include: • Object-based • Record-based • Physical.

  28. Evolution of Data Models

  29. Data Models • Hierarchical / CODASYL • Physical dependency • Difficult to represent M:M relationships • No Ad Hoc queries • Access path predetermined • Relational • Ad Hoc queries • Table oriented • Weak Semantics • Entity-Relationship • Easy to understand • More semantics • Semantic • More semantics • More complex objects • Inheritance

  30. Modeling • Physical • Storage details • Conceptual • Conceptual schema is the core of a system supporting all user views. • Should be complete and accurate representation of an organization’s data requirements. • Documents the semantic relationships between data elements with little or no consideration for structure • Semantic relationships deal with the meaning and usage of data • Conceptual modeling is process of developing a model of information use that is independent of implementation details.

  31. Data Modeling and Lifecycle External Analyze Conceptual Architect Logical Specify Design Physical Code& Test New External Integrate& Test Deploy

  32. Data Modeling Process

  33. Data Storage, Retrieval, and Update. A User-Accessible Catalog. Transaction Support. Concurrency Control Services. Recovery Services. Authorization Services. Support for Data Communication. Integrity Services. Services to Promote Data Independence. Utility Services Functions of a DBMS

  34. Components of a DBMS See Next Slide

  35. Components of Database Manager (DM)

  36. Multi-User DBMS Architectures

  37. Teleprocessing Topology • Traditional architecture. • Single mainframe with a number of terminals attached. • Trend is now towards downsizing.

  38. File-Server Architecture • File-server is connected to several workstations across a network. • Database resides on file-server. • DBMS and applications run on each workstation. • Disadvantages include: • Significant network traffic. • Copy of DBMS on each workstation. • Concurrency, recovery and integrity control more complex.

  39. Client-Server Architecture • Server holds the database and the DBMS. • Client manages user interface and runs applications. • Advantages include: • wider access to existing databases; • increased performance; • possible reduction in hardware costs; • reduction in communication costs; • increased consistency.

  40. Transaction Processing Monitor as middle tier of a three-tier client-server architecture • Program that controls data transfer between clients and servers in order to provide a consistent environment, particularly for Online Transaction Processing (OLTP).

  41. System Catalog • Repository of information (metadata) describing the data in the database. • Typically stores: • names of authorized users; • names of data items in the database; • constraints on each data item; • data items accessible by a user and the type of access. • Used by modules such as Authorization Control and Integrity Checker.

  42. IRDS services • Response to an attempt to standardize data dictionary interfaces. • Objectives: • extensibility of data; • integrity of data; • controlled access to data.

More Related