Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chap 0. Background 서울대학교 컴퓨터공학부 객체지향시스템연구실 (SNU-OOPSLA-LAB) 김 형주 교수 File Structures SNU-OOPSLA Lab. 1 Contents Contents Database Definitions Database Organizations DBMS Why File Structures? Basic File Structures Trend File Concepts SNU-OOPSLA Lab. 2 Database Definitions Database Definitions One definition - anything conceivably useful in collecting, using, maintaing, or managing data Webster’s Ninth New Collegiate Dictionary defines “a collection of data organized especially for rapid search and retrieval(as by computer)” In addition to these, these are many definitions of “DataBase” The common thread all of these definitions is data organization and easy retrieval File Structures SNU-OOPSLA Lab. 3 Database Organization Database Organization(1) The organization of a database affects the way the actual data is stored what types of data operations are possible the ease or difficulty of expressing requests (queries) The organization even affects the way you think about your data File Structures SNU-OOPSLA Lab. 4 Database Organization Database Organization(2) Traditionally there has been 3 ways of database reorganizations Hierarchical database organization Network database organization Relational database organization Nowadays Object-oriented database organization Object-relational database organizaton File Structures SNU-OOPSLA Lab. 5 DBMS Status DBMS Trend 70년 대 : Network & Hierarchical DBMS 80년 대 : Relational DBMS 90년 대 : RDBMS 확장형, Object-Oriented DBMS 98년 이후: Object-Relational DBMS 2000년 대 : Next-Generation DBMS Multimedia, Intelligence, WEB support File Structures SNU-OOPSLA Lab. 6 Why File Structures Why File Structures? Data Intensive Application Data Intensive Application DBMS File System Query, Transaction Storage Engine File Management File Management Operating System Operating System File Structures SNU-OOPSLA Lab. 7 Basic File Concepts Basic File Concepts(1) Entity & Attributes Entity : data object Attributes : charaters of the entity e.g. employee = (name, address, id_number, department, ...) Data field, data item Information is not data Processing Data File Structures Information SNU-OOPSLA Lab. 8 Basic File Concepts Basic File Concepts(2) Records 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 Record type Record instance (= record occurrence) File Structures SNU-OOPSLA Lab. 9 Basic File Concepts Basic File Concepts(3) Fixed-length record Name 30bytes Address 40bytes Id Dept 9bytes integer Salary integer Variable-length record Variable length fields Name Address 30bytes 40bytes Name Address 30bytes 25bytes File Structures Id Dept 9bytes integer Id 9bytes SNU-OOPSLA Lab. Dept integer Salary integer Salary integer 10 Basic File Concepts Basic File Concepts(4) variable format records : Pascal’s variant records(e.g. hourly, monthly, yearly salary) Type=“S” Name Address Id Dept Salary Monthly Rate Type=“H” Name Address Id Dept Salary Hourly Rate repeating Name Emp Nbr File Structures Hours Worked groups : multiply occurring fields Insurance Type Dependent Name Dependent BirthDate SNU-OOPSLA Lab. Dependent Name Dependent BirthDate . . . 11 Basic File Concepts Basic File Concepts(5) Key Keys : attributes to select or order records within a file Primary keys : should uniquely distingush the records; often basis for ordering records physically within a file e.g. employee id # or vehicle id # or ju-min # Secondary key : e.g. name to access alphabetically, dept-name External key : artificially assigned, record number within file, independent of attributes values File Structures SNU-OOPSLA Lab. 12 Basic File Concepts Basic File Concepts(6) File File : group of all records representing entities of the same type collecting of records about similar entities File Structure : A method of structuring (or organizing) records of a file on secondary storage device Data Structure : A method of structuring (or organizing) records of a file on main memory Continued.. File Structures SNU-OOPSLA Lab. 13 Basic File Concepts Basic File Concepts(6) Phsical database : A collection of inter-connected file structures; an implementation of a logical database Ford Fairmont AB789 V6 Honda Accord QXJ55 V4 Buick Regal A21M V8 silver red red 1978 1988 1982 Why use file concept? Data set is too large to store all in main memory Program access part of all data set in specific time To keep data independence (it can be shared by application program) File Structures SNU-OOPSLA Lab. 14 Basic File Concepts Basic File Concepts(7) Classification By function master file transaction file report file work file program file By File Structures of File access type of program input file output file input/output file SNU-OOPSLA Lab. Continued.. 15 Basic File Concepts Basic File Concepts(8) Classification By File Structures of File(Continued) organizing method sequential file B-Tree file Hashing file Grid file SNU-OOPSLA Lab. 16 Contents LET’S REVIEW!! Database Definitions Database Organizations DBMS Why File Structures? Basic File Structures Trend File Concepts SNU-OOPSLA Lab. 17