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
INF 280 Database Systems BASIC CONCEPTS D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 1 Typical software application Business Logic INF 280 I n t e r f a c e D. Christozov / G.Tuparov Transforming interface into data request Query (SQL) Data Processing Transforming datasets into reports/forms Datasets INF 280 Database Systems: Basic Concepts Database 2 Basic Concepts - Topics 1. A database as a collection of related data 2. Database and Database Management System 3. Characteristics and advantages of DB approach 4. DB users 5. DB Architecture 6. DBMS Architecture D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 3 DB as a collection of related data (1) • Data: facts that can be recorded and that have implicit meaning. • Database implicit properties: – A database represents some aspect of the real world, sometimes called the miniworld or the Universe of Discourse (UoD). – A database is a logically coherent collection of data with some inherent meaning. – A database is designed, built, and populated with data for a specific purpose. It has an intended groups of users and some preconceived applications in which these users are interested. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 4 DB as a collection of related data (2) D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 5 Basic characteristics 1. Self-Describing Nature of a Database System 2. Insulation between Programs and Data, Data Abstraction 3. Support of Multiple Views of the Data 4. Sharing of Data and Multiuser Transaction Processing D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 6 Basic characteristics (1) Self-Describing Nature of a Database System • System catalogue contains information about the structure of each file, the type and storage format of each data item, and various constraints on the data. The information stored in the catalogue is called meta-data, and it describes the structure of the primary database. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 7 Basic characteristics (2) Insulation between Programs and Data, and Data Abstraction • The characteristic that allows program-data independence and program-operation independence is called data abstraction. • A DBMS provides users with a conceptual representation of data that does not include many of the details of how the data is stored or how the operations are implemented. Data model (or logical data model) is a type of data abstraction that is used to provide this conceptual representation. Data model hides storage and implementation details. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 8 Basic characteristics (3) Support of Multiple Views of the Data • A view may be a subset of the database or it may contain virtual data that is derived from the database files but is not explicitly stored. • Different categories of users need different views on the database. • One user may need to solve different problems with database and for every problem may need different view on the data. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 9 Basic characteristics (4) Sharing of Data and Multiuser Transaction Processing • Multiple users may need to access database simultaneously. • The DBMS must include concurrency control software to ensure that several users trying to update the same data do so in a controlled manner so that the result of the updates is correct. • On-line transaction processing (OLTP) applications. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 10 Advantages of Using DBMS • • • • • • • • Controlling Redundancy (reducing) Preserving Data Integrity Restricting Unauthorized Access Providing Persistent Storage for Program Objects and Data Structures (Object-Oriented DB) Permitting Inferencing and Actions Using Rules Providing Multiple User Interfaces Representing Complex Relationships Among Data Providing Backup and Recovery D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 11 Redundant Data Id# Name Address Code 000101 Ivan Ivanov Scapto 1 COS480 DB System 3 000101 Ivan Ivanov Scapto 1 COS 221 FDS 000101 Ivan Ivanov Scapto 1 AUB 102 000102 Georgi Georgiev Scapto 2 000102 Georgi Georgiev Scapto 2 Student’s information D. Christozov / G.Tuparov Title Cr. Instructor Section Grade Christozov A B- 3 Christozov B B+ Writing 3 Colman C D+ COS 480 DB System 3 Christozov A B+ AUB 102 Writing 3 Colman C C+ Course information INF 280 Database Systems: Basic Concepts Grade information 12 Integrity Grades Id# Name Address Code Title Cr. Instructor Section Grade 000101 Ivan Ivanov Scapto 1 COS480 DB System 3 Christozov A B- 000101 Ivan Ivanov Scapto 1 COS 221 FDS 3 Christozov B B+ 000101 Ivan Ivanov Scapto 1 AUB 102 Writing 3 Colman C D+ 000102 Georgi Georgiev Scapto 2 COS 480 DB System 3 Christozov A B+ 000102 Georgi Georgiev Scapto 2 AUB 102 Writing 3 Colman C C+ missing Faculty Family Name Given Name Title Office Bonev Stoyan Assoc. Professor 221 Colman Mark Professor 231 D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 13 Actors on the Scene • DB Administrators • DB Designers • End Users: – Casual – Naive (parametric) – Sophisticated – Stand-alone – System Analysts and Application Programmers D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 14 Actors Behind the Scene • DBMS Systems designers and implementers • Tools developers • Operators and Maintenance personnel D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 15 DB History Database Systems: the success story of Computer Science • • • • • • Early applications: use of File Systems 1960s: Hierarchical and Network DB models Late 1970s: Codd’s Relational Model Late 1980s: OODB -> R-OO DB 1990s: SQL standards, WWW, E-Commerce Spatial DB, Data Warehouses, Data Mining D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 16 DB Model Data Model:collection of concepts that can be used to describe the structure of a database Structure: data types; relationships; constraints Operation: retrieve, insert, delete, modify user-defined operations Behavior: dynamic Object-Oriented Models incorporate both structure and behavior In “classical” models (hierarchical, network or relational) behavior is limited to generic operations. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 17 DB Model: Categories of Data Models High-level – conceptual: How users perceive data. Low-level – physical: How data is actually stored on computer. Representational Close to the way users – logical: understand data, but allow direct interpretation by given DBMS Database schema: Description of database model Diagram Schema Instance State D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 18 DB and DBMS • A database management system (DBMS) is a collection of programs that enables users to create and maintain a database. • The DBMS is a general-purpose software system that facilitates the processes of – defining, – constructing, and – manipulating databases for various applications. D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 19 DBMS • DBMS supports the following categories of languages: – Data definition language (DDL). – Storage definition language (SDL) – View definition language (VDL) – Data manipulation language (DML), including querying language • Note: In current DBMSs, these types of languages are not considered distinct languages D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 20 DBMS Components DB designers DB administrators Sophisticate Users Naïve Users Query compiler DML compiler DDL interpreter System catalogue Run-time processor Boundaries of DBMS Data manager Concurrency control, recovery, backup subsystems Recorded DB D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 21 DBMS Architecture • The Three-Schema Architecture 1. The internal level (internal schema), describes the physical storage structure of the database. 2. The conceptual level (conceptual schema), describes the structure of the whole database for a community of users. 3. The external or view level includes a number of external schemas or user views. • Data Independence 1. Logical data independence. 2. Physical data independence D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 22 The Three-Schema Architecture Categories of Users External Schemas Logical Data Independence Logical Schema Physical Schema Data Files Master Files D. Christozov / G.Tuparov Indexes INF 280 Database Systems: Basic Concepts Physical Data Independence Meta Data System Catalog 23 Database System Utilities 1. 2. 3. 4. Loading Backup File reorganization Performance monitoring D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 24 Q&A D. Christozov / G.Tuparov INF 280 Database Systems: Basic Concepts 25