Presentation is loading. Please wait.

Presentation is loading. Please wait.

File StructuresSNU-OOPSLA Lab.1 Chap 0. Background 서울대학교 컴퓨터공학부 객체지향시스템연구실 (SNU-OOPSLA-LAB) 김 형주 교수.

Similar presentations


Presentation on theme: "File StructuresSNU-OOPSLA Lab.1 Chap 0. Background 서울대학교 컴퓨터공학부 객체지향시스템연구실 (SNU-OOPSLA-LAB) 김 형주 교수."— Presentation transcript:

1 File StructuresSNU-OOPSLA Lab.1 Chap 0. Background 서울대학교 컴퓨터공학부 객체지향시스템연구실 (SNU-OOPSLA-LAB) 김 형주 교수

2 File StructuresSNU-OOPSLA Lab.2 Contents u Database Definitions u Database Organizations u DBMS Trend u Why File Structures? u Basic File Concepts Contents

3 File StructuresSNU-OOPSLA Lab.3 Database Definitions u One definition - anything conceivably useful in collecting, using, maintaing, or managing data u Webster’s Ninth New Collegiate Dictionary defines “a collection of data organized especially for rapid search and retrieval(as by computer)” u In addition to these, these are many definitions of “DataBase” u The common thread all of these definitions is data organization and easy retrieval Database Definitions

4 File StructuresSNU-OOPSLA Lab.4 Database Organization(1) u The organization of a database affects u the way the actual data is stored u what types of data operations are possible u the ease or difficulty of expressing requests (queries) u The organization even affects the way you think about your data Database Organization

5 File StructuresSNU-OOPSLA Lab.5 Database Organization(2) u Traditionally there has been 3 ways of database reorganizations u Hierarchical database organization u Network database organization u Relational database organization u Nowadays u Object-oriented database organization u Object-relational database organizaton Database Organization

6 File StructuresSNU-OOPSLA Lab.6 DBMS Trend u 70 년 대 : Network & Hierarchical DBMS u 80 년 대 : Relational DBMS u 90 년 대 : RDBMS 확장형, Object-Oriented DBMS u 98 년 이후 : Object-Relational DBMS u 2000 년 대 : Next-Generation DBMS u Multimedia, Intelligence, WEB support DBMS Status

7 File StructuresSNU-OOPSLA Lab.7 Why File Structures? Why File Structures

8 File StructuresSNU-OOPSLA Lab.8 Basic File Concepts(1) u Entity & Attributes u Entity : data object u Attributes : charaters of the entity e.g. employee = (name, address, id_number, department,...) u Data field, data item u Information is not data Basic File Concepts

9 File StructuresSNU-OOPSLA Lab.9 Basic File Concepts(2) u Records u Record : method of storing an entity using fields collection of data values that describes an entity record employee = name : array [1..30] of char; address : array [1..40] of char; id : array [1..9] of char; dept : (executive, management, sales, research, support) salary : integer; end u Record type u Record instance (= record occurrence) Basic File Concepts

10 File StructuresSNU-OOPSLA Lab.10 Basic File Concepts(3) u Fixed-length record u Variable-length record u Variable length fields u Variable-length record u Variable length fields NameAddressIdDeptSalary 30bytes40bytes9bytesinteger NameAddressIdDeptSalary 30bytes40bytes9bytesinteger NameAddressId 30bytes25bytes9bytes DeptSalary integer Basic File Concepts

11 File StructuresSNU-OOPSLA Lab.11 Basic File Concepts(4) u variable format records : Pascal’s variant records(e.g. hourly, monthly, yearly salary) NameAddressIdDeptSalaryMonthly RateType=“S”NameAddressIdDeptSalaryHourly RateType=“H”Hours Worked u repeating groups : multiply occurring fields Emp Nbr Insurance Type Dependent Name Dependent BirthDate Dependent Name Dependent BirthDate Name... Basic File Concepts

12 File StructuresSNU-OOPSLA Lab.12 Basic File Concepts(5) u Key u Keys : attributes to select or order records within a file u Primary keys : should uniquely distingush the records; often basis for ordering records physically within a file u e.g. employee id # or vehicle id # or ju-min # u Secondary key : e.g. name to access alphabetically, dept-name u External key : artificially assigned, record number within file, independent of attributes values Basic File Concepts

13 File StructuresSNU-OOPSLA Lab.13 Basic File Concepts(6) u File u File : group of all records representing entities of the same type collecting of records about similar entities u File Structure : A method of structuring (or organizing) records of a file on secondary storage device u Data Structure : A method of structuring (or organizing) records of a file on main memory Continued.. Basic File Concepts

14 File StructuresSNU-OOPSLA Lab.14 Basic File Concepts(6) u Phsical database : A collection of inter-connected file structures; an implementation of a logical database FordFairmontAB789V6silver1978 HondaAccordQXJ55V4red1988 BuickRegalA21MV8red1982 u Why use file concept? u Data set is too large to store all in main memory u Program access part of all data set in specific time u To keep data independence (it can be shared by application program) Basic File Concepts

15 File StructuresSNU-OOPSLA Lab.15 Basic File Concepts(7) u Classification of File u By function u master file u transaction file u report file u work file u program file u By access type of program u input file u output file u input/output file Continued.. Basic File Concepts

16 File StructuresSNU-OOPSLA Lab.16 Basic File Concepts(8) u Classification of File(Continued) u By organizing method u sequential file u B-Tree file u Hashing file u Grid file Basic File Concepts

17 File StructuresSNU-OOPSLA Lab.17 LET’S REVIEW!! u Database Definitions u Database Organizations u DBMS Trend u Why File Structures? u Basic File Concepts Contents


Download ppt "File StructuresSNU-OOPSLA Lab.1 Chap 0. Background 서울대학교 컴퓨터공학부 객체지향시스템연구실 (SNU-OOPSLA-LAB) 김 형주 교수."

Similar presentations


Ads by Google