assoc. prof. dr. ahmet turan Özcerİt. the concept of data, information and knowledge the...

29
Introduction to Computer Engineering WEEK-7 Database Systems Assoc. Prof. Dr. Ahmet Turan ÖZCERİT

Upload: anna-atkins

Post on 19-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Introduction to Computer Engineering

WEEK-7Database Systems

Assoc. Prof. Dr. Ahmet Turan ÖZCERİT

Page 2: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

2

The concept of Data, Information and Knowledge

The fundamental terms:

Database and database system

Database Management System

Database architectures

File Systems

Data models

Database Systems

You will learn:

Page 3: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Systems

He/She can explain the fundamental terms of database systems

3

Page 4: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Systems

He/She can explain the fundamental terms of database systems

4

Data... data is raw. It simply exists and has no significance beyond its existence (in and of itself). It can exist in any form, usable or not. It does not have meaning of itself

Information... information is data that has been given meaning by way of relational connection. This "meaning" can be useful, but does not have to be.

Knowledge... knowledge is the appropriate collection of information, such that it's intent is to be useful. Knowledge is a deterministic process. When someone "memorizes" information (as less-aspiring test-bound students often do), then they have amassed knowledge. This knowledge has useful meaning to them, but it does not provide for, in and of itself, an integration such as would infer further knowledge. For example, elementary school children memorize, or amass knowledge of, the "times table". They can tell you that "2 x 2 = 4" because they have amassed that knowledge (it being included in the times table). But when asked what is "1267 x 300", they can not respond correctly because that entry is not in their times table. To correctly answer such a question requires a true cognitive and analytical ability that is only encompassed in the next level... understanding

Page 5: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Systems

He/She can explain the fundamental terms of database systems

5

Phase-1Requirements and

Analysis

Phase-2Conceptual Modeling

Phase-3Logical

Modeling

Phase-4Physical

Modeling

Functional Analysis

ApplicationDesign

ApplicationPrograms

Functional Requirements User Requirements

Data Requirements

Page 6: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Systems

He/She can explain the fundamental terms of database systems

6

A database is an organized collection of data which can be manageable, portable, updatable.

It is the collection of schemes, tables, queries, reports, views and other objects that computer applications can manipulate them.

The data is typically organized to model aspects of reality

A database management system (DBMS) is a computer software application that interacts with the user, other applications, and the database itself to capture and analyze data.

A general-purpose DBMS is designed to allow the definition, creation, querying, update, and administration of databases.

Well-known DBMSs include MySQL, PostgreSQL, Microsoft SQL Server, Oracle, Sybase and IBM DB2. A database is not generally portable across different DBMSs, but different DBMS can interoperate by using standards such as SQL and ODBC or JDBC to allow a single application to work with more than one DBMS

Page 7: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Management Systems

He/She can explain the fundamental terms of database systems

7

DBMS SOFTWARE

Query Processing Software

Data Accessing Software

User InterfacesApplication Software

Queries

Page 8: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Management Systems

He/She can explain the fundamental terms of database systems

Actors on the Scene

Database Administrator

Database Developers

Database Programmers

Users

Actors on the Back

DBMS Developers

Tool Developers

Operators

Maintenance and Repair Personal

Page 9: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Database Management Systems

He/She can explain the fundamental terms of database systems

History

1960s Network Model (CODASYL) Hierarchical Model (IMS by IBM)

1970s Relational Model1976 Entity-Relationship1980s SQL, standard query language1990 Object-Relational1993 Object Oriented Data Model

Page 10: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Architectures of Database Management Systems

He/She can explain the fundamental terms of database systems

1- Central System Architecture

User tools, DBMS and data are located on a server

Client

DBMS

Database

Page 11: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Architectures of Database Management Systems

He/She can explain the fundamental terms of database systems

2- Two-Layered Client/Server System Architecture

Client

DBMS

Database

Network

Client Client

More than one user act as client. Clients access the database through network

First layer: Client layer

Second layer:Database server

Page 12: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Architectures of Database Management Systems

He/She can explain the fundamental terms of database systems

3- Three-Layered Client/Server System Architecture

ApplicationSoftware

Database

Network

Client Client

More than one user act as client. Clients access the database through network

First layer: Client layer

Second layer:Database server

DBMS

Database

Page 13: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Architectures of Database Management Systems

He/She can explain the fundamental terms of database systems

4- N-Layered Client/Server System Architecture

WebSoftware

Web Server

Network

Client

ApplicationSoftware

Application Server

Client

DBMS

Database

Page 14: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Architectures of Database Management Systems

He/She can explain the fundamental terms of database systems

5- Distributed Database System Architecture

Database

NetworkClient Client

DBMS

Database

Server 1 Server 2

Page 15: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

File Organization

He/She can explain the fundamental terms of database systems

A computer file is a resource for storing information, which is available to a computer program and is usually based on some kind of durable storage.

A file is "durable" in the sense that it remains available for other programs to use after the program that created it has finished executing.

Computer files can be considered as the modern counterpart of paper documents which traditionally are kept in office and library files, and this is the source of the term.

Page 16: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

File Organization

He/She can explain the fundamental terms of database systems

Sequential Files: A sequential file is one in which the individual records can only be accessed sequentially, that is, in the same order as they were originally written to the file. New records are always added to the end of the file.

Indexed Files: An indexed file is a file in which each record includes a primary key. To distinguish one record from another, the value of the primary key must be unique for each record. Records can then be accessed randomly by specifying the value of the record's primary key. Indexed file records can also be accessed sequentially. As well as a primary key, indexed files can contain one or more additional keys known as alternate keys. The value of a record's alternate key(s) does not have to be unique.

Hashed Files: Hash files are commonly used as a method of verifying file size. This process is called check-sum verification. When a file is sent over a network, it must be broken into small pieces and reassembled after it reaches its destination. In this situation the hash number represents the size of the data in a file. The hash can then be used as a tool for validating the entire file was successfully transmitted over the network.

Page 17: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

File Systems vs. DBMS

He/She can explain the fundamental terms of database systems

Advantages of DBMS :

No redundant data

Data consistency and integrity

Data security

Easy access

Easy recovery

Flexibility

What about disadvantages?

Cost

Complexity

Performance loss

Page 18: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Data Modeling

He/She can explain the fundamental terms of database systems

There are three different types of data models produced while progressing from requirements to the actual database to be used for the information system.

The data requirements are initially recorded as a conceptual data model which is essentially a set of technology independent specifications about the data and is used to discuss initial requirements with the business stakeholders.

The conceptual model is then translated into a logical data model, which documents structures of the data that can be implemented in databases. Implementation of one conceptual data model may require multiple logical data models.

The last step in data modeling is transforming the logical data model to a physical data model that organizes the data into tables, and accounts for access, performance and storage details. Data modeling defines not just data elements, but also their structures and the relationships between them.

Page 19: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Data Modeling

He/She can explain the fundamental terms of database systems

Step-1: Requirement analysis describes to determine data types, data groups, data related rules and processes operating on data. It also describes the functionalities of the system, the data to be stored in the system, relationship between data and user’s operations.

Step-2: Conceptual model describes the semantics of a domain (the scope of the model). For example, it may be a model of the interest area of an organization or of an industry. This consists of entity classes, representing kinds of things of significance in the domain, and relationships assertions about associations between pairs of entity classes. A conceptual schema specifies the kinds of facts or propositions that can be expressed using the model. In that sense, it defines the allowed expressions in an artificial "language" with a scope that is limited by the scope of the model. Simply described, a conceptual schema is the first step in organizing the data requirements.

Page 20: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Data Modeling

He/She can explain the fundamental terms of database systems

Step-3: Logical model describes the structure of some domain of information. This consists of descriptions of (for example) tables, columns, object-oriented classes, and XML tags. The logical schema and conceptual schema are sometimes implemented as one and the same

Step-4: Physical model describes the physical means used to store data. This is concerned with partitions, CPUs, tablespaces, and the like.

Page 21: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

The components of conceptual data modeling

Entity: Existing and distinguishable object Array of Entities

Page 22: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Example: Entity-Relation Sets

E1= { John, Alice}E2= { Math, ICE}The relationship between E1 and E2 is students and their course

E1 x E2 = { (John, Math), (John, ICE), (Alice, Math), (Alice, ICE)}

Then we can describe three relation sets below:

R1={(John,Math)}R2={(John,ICE)}R3={(John,ICE), (Alice , Math)}

So, all Rn relation sets are subsets of E1 x E2

Page 23: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Attributes and Domains (set of valid values)

Page 24: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Derived Attributes

Page 25: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Multi-valued Attributes

Page 26: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Composite Attributes

More than one attributes can be grouped as one attribute

Page 27: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Entity Roles

Page 28: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

Conceptual Data Modeling

He/She can explain the component of the data modeling

Relation of Entities

Page 29: Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database

QUESTIONS

29

?