170 likes | 328 Views
File and Database Concepts. " 640K ought to be enough for anybody ." -- Bill Gates, 1981 . Some Basic Terminology. Bit Byte Data element or field Record Data file or table Database. Types of File Organization. Sequential Direct-access Accessing an individual record - done thru indexing.
E N D
File and Database Concepts "640K ought to be enough for anybody." -- Bill Gates, 1981
Some Basic Terminology • Bit • Byte • Data element or field • Record • Data file or table • Database
Types of File Organization • Sequential • Direct-access • Accessing an individual record - done thru indexing
Indexing • Separate index file • Has values of keys • Maintained in order, while main data file is not • Can be searched much more quickly
Traditional File Processing • Multiple files, separately accessed • Problems • Redundant data • Programs have within them the structure of the data • Lack of control File 1 Application 1 File 2 Application 2 File 3 Application 3
Application Application Application Corporate database Database Management Systems • Single point of access to data • Single repository of data • Data structure maintained and stored by the DBMS rather than by programs DBMS Data Definition
Functions/Facilities of DBMSs • Maintain data definitions • Define file layouts, field names, length, format descriptions, validations • Control access to data • Read, write, add, delete • Defines who can do it (access privileges) • Maintain indexes
DBMS Functions (cont.) • Facility for online query of data • One-time • Create standardized queries for repetitive use • Facility for creating reports • Often a non-procedural language • Paint a report layout
DBMS Functions (cont.) • Facility for creating data-entry screens • Either create one automatically (not user-friendly) or customize one • Applications development facilities • Allows one to create customized applications • Define menus, processing modules, etc. • Own programming language, or an interface to the data from software written in another language • Structured Query Language
DBMS Functions (cont.) • Utility functions • Transaction control • Access coordination for multiple concurrent users (file and record locking) • Security features
Designing the Database Application • Database • Data entry screen • Report • User manual
Database • Data-driven design - create an abstraction (data model) of the enterprise • Goals • Accurately reflect what’s going on • Database that is easily modifiable and maintainable • Reduce redundancy
Database (cont.) • For our project, two questions: • What are we keeping track of? (defines the record) • What are the characteristics of that thing of which we’re keeping track? (defines elements of the record) • Single (flat) file will not adequately reflect the real world in most cases. Why? • Example walk-thru (one-to-many relationship)
Data Entry Screens • User-friendly (idiot-proof) • Automate user’s job - default/derived values - reduce keystrokes • Validate entered information • Clear prompts, error messages • Match source document • The user’s view of the data
Reports • Not a dump of the data in the database • Apply some value-added • Selection of records • Selection of fields • Order and grouping • Additional information (calculated fields)
Reports (cont.) • Additional decisions • Appearance of printed elements, layout of page • Summary statistics • Header/footer components • Date • Page number • Title • Legend
User Manual • Provide some context (purpose of application) • How to invoke the various application features • Specific instructions on entering data • Guidance on interpreting report(s)