1 / 19

Module # 8 Databases Module # 11

Module # 8 Databases Module # 11. Mostafa Abd -El-Barr Modified by Jehad Al Dallal July 2012. Objectives. Introduction to Data Files Introduction to Database Why Database? Database management Database Management Systems (DBMS) Organization Hierarchical Network Relational

kcolvin
Download Presentation

Module # 8 Databases Module # 11

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. Module # 8Databases Module # 11 MostafaAbd-El-Barr Modified by Jehad Al Dallal July 2012

  2. Objectives • Introduction to Data Files • Introduction to Database • Why Database? • Database management • Database Management Systems (DBMS) Organization • Hierarchical • Network • Relational • Object Oriented • Types of Databases • Individual • Shared • Distributed • Proprietary • Database Use and Issues

  3. Data Files • Data Organization • Data is organized into Groups or Categories. Each Group is more complex than the one before. • A Character is a single letter, number, or a special character. • A Fieldcontains a set of related characters, e.g., Person’s Name on the College Registration. • A Record is a collection of related fields, e.g., Your own information on the College Registration Form. • A Fileis a collection of related records, e.g., all Students’ Registration information could be a file. • A Databaseis a collection of related files, e.g., Registration information of all colleges in a University could be a database.

  4. Data Files (Cont’d) • A Key Fieldis the particular field of a record that is used to uniquely identifies each record. Examples: Student ID Number, Civil ID Number, Employee ID Number. • Batch Data Processing Data is collected over a long period of time and processed all at once. Example: Bank Credit Card Bill. • Real-Time Data Processing Data is processed at the same time the transaction occurs Example: Your ATM Balance.

  5. Data Files (Cont’d) • Two types of files are used to update data: master files and Transaction Files. • Master File:a complete file containing all records current up to the last update. Example: The data file used to prepare your last month’s telephone bill. • Transaction File:Contains recent changes to records that will be used to update the master file. Example: A temporary file that accumulates telephone charges.

  6. Data Files (Cont’d) • File Organization Three types of file organization: Sequential, Direct, and Index Sequential file organization. • Sequential File Organization Records are stored physically one after another in a predetermined order. The order is determined by the Key Field on each record, such as the student ID number. • Direct File Organization Records are stored on a disk in a particular address or location that can be determined by their Key Field. A Hashing Program is used to convert the Key Field’s numeric value to a particular storage address. • Index Sequential File organization An index lists the Key to each group of records stored and the corresponding disk address for that group of records. Records in a file are stored sequentially.

  7. Data Files (Cont’d) Type Advantages Disadvantages Sequential Efficient access Slow access to to all or large part specific records of records, Low cost Direct Fast Access to specific High Cost Records Index Faster than Sequential Not as Efficient as Sequential Sequential Efficient than Direct Not as fast as Direct High Cost

  8. Database • Why Database? Databases are used to integrate Data. They lead to the following advantages. • Sharing of Data. • Security of Data. • Reduced Data Redundancy. • Data Integrity: data consistency and accuracy

  9. Database (Cont’d) • Database Management Systems (DBMS) Special Software used to create, modify, and access database. DBMS consists of two main components. (1) Data Dictionary Contains the description of the structure of data used in the Database. Name of the field, data type, number of characters, etc. (2) Query Language An easy-to-use language understandable to most users. Example: Structured Query Language (SQL)

  10. Database (Cont’d) • Database Organization • Hierarchical In this case, Fields (records) are represented as nodes in a tree. A parent-children relation exists between nodes. A parent node can have more than one child node (a one-to-many relation). A child node has only one parent node. Drawbacks (1) Deletion of a parent node leads to the deletion of all its children nodes. (2) A child node can only be added if a parent node is added. (3) No relationships exist between children nodes

  11. Hierarchical Database: departure arrival Flight number passenger

  12. Database (Cont’d) • Network A hierarchical database in which a child node may have more than one parent, i.e., a many-to-many relationship. A node can be reached through more than one path. Advantages: More flexible and more efficient than the Hierarchical database. • Relational Data elements are stored in tables. A table is called a relation. Rows in the table represent Records and columns represent Fields. This is the most common database for PC, e.g., Access Advantages: Simple, easy to add and delete data

  13. Jones, P. Long, M. Miller, P. Network Database: Business 101 Computer Science 101 Mathematics 101 course teacher Eaton, P. Wayne, A. Allen, D. Hively, M. Moore, L. student

  14. Relational Database: Abell, Jack LK3457 Key fields linked Key fields linked Abell, Jack LK3457

  15. Database (Cont’d) • Object-Oriented Deals with objects. These can include both data (attributes) and actions (methods) to be taken on the data, e.g. how to calculate and when to print monthly bills. OO can also include unstructured data such as Photos, Graphics, and Video. Advantages:Flexibility.

  16. Object-Oriented Database: Time cards Classes Employees Objects Trainers Front desk Managers Photo: Last name: First name: Address: Wage rate: Photo: Last name: First name: Address: Wage rate: Photo: Last name: First name: Address: Yearly salary: Attributes Method to Calculate weekly Payroll check Wage rate X Hours worked Wage rate X Hours worked Yearly salary/ 52 weeks per year

  17. Types of Databases • Individual (Microcomputer) Collection of files used by only one person. The data and the DBMS are normally stored on the user’s HD. • Shared (Company) This is normally a large DB stored on a mainframe and managed by a Database Administrator. Company users can have access to the DB over a network. Company DBs are the foundation for Management Information Systems (MISs)

  18. Types Databases (Cont’d) • Distributed Data is stored in several locations. Accessibility is made through networks. • Proprietary (Information Utilities or Databanks) Typically a very large DB developed to cover particular needs for a specific organization.

  19. Database Uses and Issues • Data Warehouse A collection of data from a variety of internal and external DBs needed to support the work of managers and business professionals. • Data Mining This is a technique used to search Data Warehouses for related information and patterns. • Database Security DBs may contain personal and private information about people. Therefore they have to be protected against misuse or abuse.

More Related