* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Public Management: Concepts and Big Questions
Microsoft SQL Server wikipedia , lookup
Microsoft Access wikipedia , lookup
Oracle Database wikipedia , lookup
Ingres (database) wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Concurrency control wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Functional Database Model wikipedia , lookup
Versant Object Database wikipedia , lookup
ContactPoint wikipedia , lookup
Clusterpoint wikipedia , lookup
Data Structure & File Systems Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International University of Japan 2 Outline Traditional Data Approach Database Approach Database Schema External Schema Conceptual Schema Internal Schema Relational Database Relations and Primary Key Database Management Systems 3 Traditional Data Approach 1 One program/application/system and its own data sets Program-data dependency; data are tightly tied to a program. Program A Data file a; Program B may not access data file a that is specific to A. Department C Master data file c; Department D may not use master data file c 4 Traditional Data Approach 2 Data redundancy (duplication of data) Lack of data integrity (accurate, consistent, and up to date) Limited data sharing Lack of standardization in data structure and access Time consuming and costly development and maintenance 5 Database Approach A data set shared by many programs and systems Program-data independence Minimize data redundancy Data integrity (consistency) Data sharing and standardization More complex and expensive More risk in database management 6 Database Applications Distributed databases Objective-oriented databases Data warehousing Online transaction processing (OLTP) Online analytical processing (OLAP) Data mining, business intelligence (BI) 7 Database Management Failure in database results in big loss Data center and data grid Database administrator (DBA) Database management systems (DBMS) Protect from natural disaster, misuse, or illegal access (inside and outside) 8 Types of Databases Hierarchical database: tree structure, Rootparent-child levels records, one-to-many relationship Network database: each child record can have more than on parent record. Relational database: key field (identifier) to link tables (relations) Object-oriented databases: objects (data and methods) Database Schema 10 Database Schema Views of database structure (e.g., tables, views, procedures, functions) Described by a formal language in DBMS (data dictionary). 11 Types of Database Schema Degrees of data abstraction External schema: Users’ view Conceptual schema: HW/SW independent Internal schema: HW independent, SW dependent) Physical schema: HW/SW dependent Users’ View External Schema (Application 1) Overall View DBMS View External Schema (Application 2) Conceptual Schema H/W independent S/W independent Internal Schema H/W independent S/W dependent Physical Schema H/W dependent S/W dependent External Schema (Application 3) 12 13 External Schema External schema describes (end) users’ view of databases Represents a subset of the database Multiple external schemas can exist depending on applications Ensure data security by limiting data access to the subset of a database 14 Conceptual Schema Conceptual schema describes a global views of the entire database Integrate all external views Basic blueprint of a database Only one conceptual schema ER-diagram represents this schema Software/hardware independence 15 Internal Schema Internal schema is a representation of conceptual schema from a specific DBMS’ view (not users’ view). Hardware independent but software dependent. Logical independent if a internal schema is changeable without touching its corresponding conceptual schema 16 Physical Schema Physical schema describes how data are actually stored on storage unit. Dependent on DBMS, methods of accessing files, types of hardware storage units, etc. Physical independent if a physical schema (model) is changeable without touching its corresponding internal schema (model) Relational Database 18 Relational Database 1 A collection of tables. A table (relation) consists of records each of which consists of a list of related fields Each table is related to other tables using keys (primary and secondary keys) 19 Relational Database 2 Table record 1 record 2 ............. record n field 1 field 2 field k 20 Relational Database 3 Table, relation, file, or object (entity set) Record, tuple, entity (instance or occurrence), or row Field, attribute, or columns. 21 Relational Database 4 Bit Byte Field (dot) Record (line or 1st dimension) Table (plane or 2nd dimension) Database (cubic or 3rd dimension) Data Warehousing 22 Attribute Types 1 Character (string) Variable character Integer (tiny, small): 1-2 bytes Long integer Float (decimal) 4 bytes Double precession: 8 bytes Numbers is preferred in terms of efficiency 23 Attribute Types 2 Date/time Logical or boolean (binary) Text (memo) Image/video/audio Object, etc 24 Variable Properties Length of an attribute is determined by types of data, and maximum length of data & systems. Allowable values and ranges (picture clause in COBOL) are considered to improve data quality and integrity Relations and Primary Key 26 Relations Joining combines two or more tables (relations) 27 Primary Key Primary key consists of one of more attributes whose values uniquely identify a record in a table. To identify a unique record No duplicate is allowed. Secondary key 28 Linking Tables Using Keys 29 Joining Types 1 Joining combines two or more tables (relations) Inner (intersection of left and right tables) Outer join (union of left and right) Left (outer) join (first table as a reference) Right (outer) join (second as reference) 30 Joining Types 2 Left outer join: Include all entities in the left table and entities in the right table matched to any entity in the left table. When the left table has A and B and the right contains A and C, the left outer join produce A, matched A (data items from the right table), and B excluding C Right outer join is the opposite to left outer join (reference table is switched) Database Management Systems 33 DB Management System Database management system (DBMS) Controls the structure of a database and access to the data. Relational DBMS (RDBMS) Object-oriented DBMS (OODBMS) 34 DBMS Components 1 Data dictionary descries the structure of data in databases such as name, type, length, access control. Utilities to create, modify, delete tables, records, and fields. Report generator Access security, and system recovery 35 DBMS Components 2 Query languages manipulate databases Structured query language (SQL) 36 DBMS Server Oracle DB2 (IBM) SQL Server (Microsoft) ASE (Adaptive Server Enterprise) and IQ (Sybase SAP) Informix (InformixIBM) Teradata (Teradata Co.) Open source: MySql, PostgreSQL 38 DBMS Client dBase III (+), IV (Ashton TateBorland) Clipper (programming language and compiler for dBase III) (Nantucket Co.) FoxBase (+), FoxPro, Visual FoxPro (Fox SoftwareMicrosoft’s Visual Studio) Paradox (Corel’s WordPerfect Office) Access (Microsoft’s Office Suite) with zengine 39 DBMS Service Database as a Service (DaaS) 40 Considerations Data dictionary and E-R modeling Attributes for the public sector Performance measures Data security: minimize use of private information when designing conceptual schemas, each department and application has its own schemas Database administrator’s role in ensuring security in response to evolving threats.