Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Module # 8 Databases Module # 11 Mostafa Abd-El-Barr Modified by Jehad Al Dallal July 2012.

Similar presentations


Presentation on theme: "1 Module # 8 Databases Module # 11 Mostafa Abd-El-Barr Modified by Jehad Al Dallal July 2012."— Presentation transcript:

1 1 Module # 8 Databases Module # 11 Mostafa Abd-El-Barr Modified by Jehad Al Dallal July 2012

2 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 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 Field contains 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 File is a collection of related records, e.g., all Students ’ Registration information could be a file.  A Database is a collection of related files, e.g., Registration information of all colleges in a University could be a database.

4 4 Data Files (Cont ’ d)  A Key Field is 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 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 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 7 Data Files (Cont ’ d) TypeAdvantagesDisadvantages SequentialEfficient accessSlow access to to all or large part specific records of records, Low cost DirectFast Access to specificHigh Cost Records Index Faster than SequentialNot as Efficient as Sequential SequentialEfficient than DirectNot as fast as Direct High Cost

8 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 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 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 11 Hierarchical Database: Los Angeles ChicagoClevelandNew York 110 Adams, S.Howell, R. McGillen, T. 139209 Boston departure arrival Flight number passenger

12 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 13 Network Database: course teacher student Business 101 Computer Science 101 Mathematics 101 Miller, P. Long, M.Jones, P. Allen, D. Wayne, A. Moore, L.Hively, M. Eaton, P.

14 14 Relational Database: Address Table NameLicense NumberStreet AddressCityStateZip Aaron, Linda Abar, John FJ1987 D12372 10032 Park Lane 1349 Oak St 95874 State St San Jose Lakeville Stone CA 95127 94128 95201 Outstanding Citation Table License Number Citation Code Violation T25476 D98372 00031 19001 89100 Speed Park Speed Abell, JackLK3457 Owner’s Table NamePlate Number Abrams, Sue Abril, Pat LMJ198 ZXA915 ABK241 Abell, Jack LK3457 Key fields linked

15 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 16 Employees Time cards TrainersFront deskManagers Photo: Last name: First name: Address: Wage rate: Photo: Last name: First name: Address: Wage rate: Photo: Last name: First name: Address: Yearly salary: Wage rate X Hours worked Wage rate X Hours worked Yearly salary/ 52 weeks per year Classes Objects Attributes Method to Calculate weekly Payroll check Object-Oriented Database:

17 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 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 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.


Download ppt "1 Module # 8 Databases Module # 11 Mostafa Abd-El-Barr Modified by Jehad Al Dallal July 2012."

Similar presentations


Ads by Google