180 likes | 200 Views
Learn about file organization, traditional file processing problems, the database approach, logical and physical views, components of a DBMS, types of relations, relational DBMS, querying databases with SQL, designing databases, normalization, distributed databases, and data management requirements.
E N D
File Organization Terms • Field: group of characters that represent something • Record: group of related fields • File: group of related records • Database: group of related files • Entity: a person, place, thing, event • Attribute: a piece of information about an entity
Traditional File Processing • Each functional area has specialized applications • Each application requires an unique data file, that is often a subset of the master file PROBLEMS WITH TRADITIONAL FILE PROCESSING • Data integrity • Data redundancy and confusion • Program-data dependence • Lack of flexibility • Poor security • Lack of data sharing and availability
The Database Approach • Database • Collection of data organized to serve many applications efficiently • Data is centralized • Uses a database management system (DBMS) • Software to create and maintain a database • Allows individual business applications to extract and use the data they require
Logical and Physical Views • Physical view • How data are organized and stored on physical media • Logical View • How the data appear to an application programmer or end user • Could be multiple logical views • DBMS allows logical and physical views to be separated
Three components of DBMS • Data definition language • Defines each data element • Used by programmers in creating database • Data manipulation language • Used to manipulate data (e.g. SQL) • Data dictionary • Stores and organizes information about the data
STUDENT ID ONE-TO-ONE: CLASS 1 CLASS 2 MANY-TO-MANY: STUDENT A STUDENT B STUDENT C Types of Relations ONE-TO-MANY: Department --> Faculty Member
Types of Databases • Hierarchical DBMS • Older model • Treelike structure, one-to-many relationships • Network DBMS • Also older model, allows many-to-many relationships • Neither are as flexible nor as easy to use as relational DBMS
Relational DBMS Tables share a common data element
Basic Operations of Relational DBMS • Select • Creates a subset of records that meet criteria • E.g. all records (rows) with part number = 137 • Project • Creates a subset of columns • Allows user to create new tables, or views, of data • Join • Allows user to combine tables • E.g. table of parts + supplier
Querying Databases: SQL • SELECT • Lists the columns from tables that the user wants to see in the result • FROM • Identifies the tables from which the columns will be selected • WHERE • Includes conditions for selecting specific rows (records)
Designing Databases Entity-relationship diagram • A methodology for documenting databases • Illustrates relationships between entities • Relationship can be • One-to-many • One-to-one • Many-to-many
Normalization Eliminates redundant data and awkward relationships Unnormalized relation for ORDER Normalized relation for ORDER
Distributed Databases • A database can be stored at more than one location • Parts or copies are physically stored in different locations
Management Requirements • Data Administration • Data Planning and Modeling • DataBase Administration
Data Warehouses & Datamining • Extracts current & historical data from operational systems • Combined with external data • Create database for analysis by management • Usually read only