TID Chapter 10 Introduction To Database

  • Published on
    14-May-2015

  • View
    3.691

  • Download
    0

Embed Size (px)

Transcript

<ul><li>1.Introduction to Database Changes and new experience make life delightful. Unanimous</li></ul> <p>2. Data and Information </p> <ul><li>How aredataandinformationrelated? </li></ul> <p>processing data stored on disk Step 1.The member data, including a photograph, is entered and stored on the hard disk. Step 2.The computer extracts the member data from disk. Step 3.The receipt is created and printed. </p> <ul><li>Datais raw facts </li></ul> <ul><li>Informationis data that is organized and meaningful </li></ul> <p>receipt </p> <ul><li>Computers processdata into information </li></ul> <p>Next 3. Data and Information </p> <ul><li>What is adatabase ? </li></ul> <p>Database software allows you to Collection of dataorganized soyou can access,retrieve, anduse it Database softwarealso calleddatabasemanagement system(DBMS) Add,change,and deletedata Create database Sortandretrievedata Create formsandreports Next 4. </p> <ul><li>To create a database, designers must develop a conceptual design and a physical design</li></ul> <ul><li>Conceptual design: An abstract model of a database from the user or business perspective.</li></ul> <ul><li>Physical design: Layout that shows how a database is actually arranged on storage devices. </li></ul> <p>Creating the Database 5. </p> <ul><li>Entity-relationship modeling: The process of designing a database by organizing data entities to be used and identifying the relationships among them. </li></ul> <ul><li>Entity-relationship (ER) diagram: Document that shows data entities and attributes and relationships among them. </li></ul> <ul><li>Entity classes: A grouping of entities of a given type. </li></ul> <ul><li>Instance: A particular entity within an entity class. </li></ul> <p>6. </p> <ul><li>Identifier: An attribute that identifies an entity instance . </li></ul> <ul><li>Relationships: The conceptual linking of entities in a database. </li></ul> <ul><li>The number of entities in a relationship is the degree of the relationship. Relationships between two items are common and are calledbinary relationships . </li></ul> <p>7. </p> <ul><li>There are three types of binary relationships: </li></ul> <ul><li><ul><li>In a 1:1 (one-to-one) relationship, a single-entity instance of one type is related to a single-entity instance of another type. </li></ul></li></ul> <ul><li><ul><li>In a 1: M (one-to-many) relationship, a single-entity instance of one type is related to many-entity instance of another type. </li></ul></li></ul> <ul><li><ul><li>In a M:M (many-to-many) relationship, a single-entity instance of one type is related to many-entity of another type and vice versa. </li></ul></li></ul> <p>8. Entity- relationship diagram model 9. </p> <ul><li>Normalization </li></ul> <ul><li>A method for analyzing and reducing a relational database to its most streamlined form for minimum redundancy, maximum data integrity, and best processing performance </li></ul> <p>10. Non-normalized relation 11. Normalized relation 12. </p> <ul><li>Physical view: The plan for the actual, physical arrangement and location of data in the direct access storage devices (DASDs) of a database management system.</li></ul> <ul><li>Logical view: The users view of the data and the software programs that process that data in a database management system. </li></ul> <p>13. The Hierarchy of Data </p> <ul><li>What is ahierarchy ? </li></ul> <ul><li><ul><li>Database contains files, file contains records, record contains fields, field contains characters </li></ul></li></ul> <p>Next 14. The Hierarchy of Data </p> <ul><li>What is afield ? </li></ul> <ul><li><ul><li>Combination of one or more characters </li></ul></li></ul> <ul><li><ul><li>Smallest unit of data user accesses </li></ul></li></ul> <ul><li><ul><li><ul><li>Field size defines the maximum number of characters a field can contain </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Field nameuniquely identifies each field </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Data typespecifies kind of data field contains </li></ul></li></ul></li></ul> <p>Next 15. The Hierarchy of Data </p> <ul><li>What are common data types? </li></ul> <p>Yes/No (also calledBoolean )only the values Yes or No (or True or False) Hyperlink Web address that links to document or Web page Object (also calledBLOBfor binary large object)photograph, audio, video, or document created in other application such as word processing or spreadsheet Next Currency dollar and cent amounts or numbers containing decimal values Date month, day, year, and sometimes time Memo lengthy text entries Text (also calledalphanumeric )letters, numbers, or special characters Numeric numbersonly AutoNumber unique number automatically assigned to each new record 16. The Hierarchy of Data </p> <ul><li>What is arecord ? </li></ul> <p>Group ofrelated fields Key field , orprimary key ,uniquely identifies each record Next 17. The Hierarchy of Data </p> <ul><li>What is adata file ? </li></ul> <ul><li><ul><li>Collection of related records stored on disk </li></ul></li></ul> <p>Next key field records fields 22 Fifth Avenue P.O. Box 45 15 Duluth Street 33099 Clark Street 1029 Wolf Avenue Address Auburn Clanton Prattville Montgomery Montgomery City AL Weinberg Jonah 3928 AL Marcus 4872 AL Valesquez Adrian 3376 AL Murray Shannon 2928 AL Vandenberg Donna 2295 State Last Name First Name Member ID Green 18. File Processing Versus Databases </p> <ul><li>What is afile processing system ? </li></ul> <p>Each department or area within organization has own set of files May have weaknesses Records in one file may not relate to records in any other file Isolated data data stored in separate files so it is difficult to access Next Data redundancy same fields stored in multiple files 19. File Processing Versus Databases </p> <ul><li>What is thedatabase approach ? </li></ul> <ul><li><ul><li>Many programs and users can share data in database </li></ul></li></ul> <ul><li><ul><li>Secures data so only authorized users can access certain data </li></ul></li></ul> <p>Next 20. File Processing Versus Databases </p> <ul><li>What are the strengths of the database approach? </li></ul> <p>Reduced data redundancy Improved data integrity Shared data Easieraccess Reduced development time Next 21. File Processing Versus Databases </p> <ul><li>How do a database application and a file processing application differ in the way they store data? </li></ul> <p>Next 22. Database Management Systems </p> <ul><li>What are popular database management systems (DBMSs)? </li></ul> <p>Next Personal computer, midrange server, mainframe IBM Corporation DB2 Personal computer, midrange server, mainframe IBM Corporation Informix Server Microsoft Corporation SQL Server Personal computer, midrange server, PDA Sybase Inc. Sybase Personal computer, midrange server, mainframe, PDA Oracle Corporation Oracle Personal computer, midrange server, mainframe Computer Associates International, Inc. Ingres Personal computer, server, PDA Microsoft Corporation Access Computer Type Manufacturer Database 23. Database Management Systems </p> <ul><li>What is adata dictionary ? </li></ul> <ul><li><ul><li>Contains data about each file in database and each field within those files </li></ul></li></ul> <p>Next 24. Database Management Systems </p> <ul><li>What isStructured Query Language (SQL) ? </li></ul> <ul><li><ul><li>Allows you to manage, update, and retrieve data </li></ul></li></ul> <ul><li><ul><li>Has special keywords and rules included in SQL statements </li></ul></li></ul> <p>SQL statement SQL statement results Next 25. Database Management Systems </p> <ul><li>What is aquery ? </li></ul> <ul><li><ul><li>Request for specific data from a database </li></ul></li></ul> <ul><li><ul><li>Query languageconsists of simple, English-like statements that allow users to specify data to display, print, or store </li></ul></li></ul> <p>Step 1.Select the fields you want to display in the resulting query. Step 2.Assign a name to the query, so you can open it later. Step 3.View query on the screen. Next 26. Database Management Systems </p> <ul><li>What is aquery by example (QBE) ? </li></ul> <ul><li><ul><li>Program retrieves records that match criteria entered in form fields </li></ul></li></ul> <p>Query by example screen criteria Query results </p> <ul><li><ul><li>Has a graphical user interface that assists users with retrieving data </li></ul></li></ul> <p>Next 27. Database Management Systems </p> <ul><li>What is aform ? </li></ul> <ul><li><ul><li>Window on screen that provides areas for entering or changing data in database </li></ul></li></ul> <ul><li><ul><li>Used to retrieve and maintain data in a database </li></ul></li></ul> <ul><li><ul><li>Form that sends data across network or Internet is called e-form, short for electronic form </li></ul></li></ul> <p>Next 28. Database Management Systems </p> <ul><li>What is areport generator ? </li></ul> <p>p. 532 Fig. 10-16 </p> <ul><li><ul><li>Allows user to design a report on screen, retrieve data into report design, then display or print reports </li></ul></li></ul> <ul><li><ul><li>Also called report writer </li></ul></li></ul> <p>Next 29. </p> <ul><li>What is adata model ? </li></ul> <p>Data model p. 534 Fig. 10-18 </p> <ul><li><ul><li>Rules and standards that define how databaseorganizes data </li></ul></li></ul> <ul><li><ul><li>Defines how users view organization of data </li></ul></li></ul> <ul><li><ul><li>The three most common data models arehierarchical, network , andrelational . </li></ul></li></ul> <ul><li>Other types of data models include multidimensional, object-relational, hypermedia, embedded, and virtual </li></ul> <p>DATA MODELS FOR POPULAR DBMSs Next 30. Relational database</p> <ul><li>What is arelational database ? </li></ul> <ul><li><ul><li>Stores data in tables that consist ofrowsandcolumns </li></ul></li></ul> <ul><li><ul><li><ul><li>Each row has primary key </li></ul></li></ul></li></ul> <ul><li><ul><li><ul><li>Each column has unique name </li></ul></li></ul></li></ul> <ul><li><ul><li>Stores data relationships </li></ul></li></ul> <ul><li><ul><li>Uses specialized terminology </li></ul></li></ul> <p>DATA TERMINOLOGY Next 31. Relational database </p> <ul><li>What is arelationship ? </li></ul> <ul><li><ul><li>Connection within data </li></ul></li></ul> <p>Next 32. </p> <ul><li>Hierarchical database model rigidly structures data into an inverted tree in which each record contains two elements, a single root or master field, often called a key, and a variable number of subordinate fields.</li></ul> <ul><li>The strongest advantage of the hierarchical database approach is the speed and efficiency with which it can be searched for data. </li></ul> <ul><li>The hierarchical model does have problems : Access to data in this model is predefined by the database administrator before the programs that access the data are written. Programmers must follow the hierarchy established by the data structure. </li></ul> <p>Hierarchical Database Model 33. Hierarchical Database model 34. </p> <ul><li>Data model that creates relationships among data in which subordinate records can be linked to more than one data element. </li></ul> <p>Network Database Model 35. 36. Advantages andD isadvantages of LogicalD ata Models Processing efficiency and speedare lower. Data redundancy is common, requiring additional maintenance. Conceptual simplicity; there are no predefined relationships among data. High flexibility in ad-hoc querying. New data an d records can be added easily. Relational database This is the most complicated database model to design, I mplement, and maintain.Greater query flexibility than withhierarchical model, but less thanwith relational mode l . Many more relationships can be defined. There is greater speed and efficiency than with relational database models. Network Access to data is predefined by exclusively hierarchical relationships, predetermined by administrator. Limited search/queryflexibility. Not all data aren aturally hierarchical. Searching is fast and efficient. Hierarchical database Disadvantages Advantages Model 37. EmergingData Models </p> <ul><li>Two emerging data models are theobject-relationalandhypermediamodels </li></ul> <ul><li><ul><li>Object-relational database model: Data model that adds new object storage capabilities to relational databases. </li></ul></li></ul> <ul><li><ul><li>Hypermedia database model: Data model that stores chunks of information in nodes that can contain data in a variety of media; users can branch to related data in any kind of relationship. </li></ul></li></ul> <p>38. Specialized Database Models </p> <ul><li>Geographical information database: Data model that contains locational data for overlaying on maps or images. </li></ul> <ul><li>Knowledge database: Data model that can store decision rules that can be used for expert decision making.</li></ul> <p>39. </p> <ul><li>Small-footprint database: The subset of a larger database provided for field workers. </li></ul> <ul><li>Embedded database: A database built into devices or into applications; designed to be self-sufficient and to require little or no administration.</li></ul> <ul><li>Virtual database: A database that consists only of software; manages data that can physically reside anywhere on the network and in a variety of formats. </li></ul> <p>40. </p> <ul><li>What is anobject-oriented database (OODB) ? </li></ul> <p>Objectis item that contains data, as well as actions that read or process data </p> <ul><li><ul><li>Can store more types of data </li></ul></li></ul> <ul><li><ul><li>Can access data faster </li></ul></li></ul> <p>Next Advantages Often usesobject query language (OQL) Stores data in objects 41. </p> <ul><li>What are examples of applications appropriate for anobject-oriented database? </li></ul> <p>Next Multimedia databases Store images, audio clips,and/or video clips Groupware databases Store documents such as schedules, calendars, manuals, memos, and reports Computer-aided design(CAD) databases Store data aboutengineering, architectural,and scientific designs Hypertext databases Contain text linksto other documents Hypermedia databases Contain text, graphics,video, and sound Web databases Link to e-form on Web page </p>