An Overview of Database Management. An Example A database system –A computerized record-keeping...

Preview:

Citation preview

An Overview of Database Management

An Example

• A database system– A computerized record-keeping system

• Database– A repository for a collection of computerized data fi

les– A kind of electronic filing cabinet

• Tables, records, SQL• Operations

– Add, insert, retrieve, update, delete, remove※Repository: 저장소 , operation: 연산

The wine cellar database

Retrieval 검색

SELECT WINE, BIN#, PRODUCER

FROM CELLARWHERE

READY=2000;WINE BIN# PRODUCE

R

Cab.Sanvignon 43 Windsor

Pinot Noir 51 Stemmler

Merlot 58 Clos Du Bois

Insert, update, delete 삽입 , 갱신 , 삭제

INSERT INTO CELLAR(BIN#, WINE, PRODUCER, YEAR, BOTTLES, READY)VALUES(53, ‘Pinot Noir’, ‘Saintsbury’, 1997, 6, 2001)

UPDATE CELLARSET BOTTLES =4WHERE BIN# = 3;

DELETEFROM CELLARWHERE BIN# = 2;

What is a database system?

• Database system– A computerized record-keeping system– Components

• Data• H/W• S/W• Users

※Record-keeping: 기록유지관리

Data in database system

• Integrated– Unification of several distinct filesEx) student files, book files

• Shared– Being shared among different users with dif

ferent purposesEx) book tables among students and librarian

s※Integrated: 통합된 , Shared: 공유된

H/W in database system

• Secondary storage devices – disk• Processor(s) and main memory to suppo

rt the execution of the database system S/W

• ※secondary storage device: 이차저장장치

S/W in database system

• DBMS(database management system)– Also known as

• database manager• Database server

– The shielding of database users from hardware-level details

• Ex) Microsoft ACCESS, Microsoft SQL Server, MySQL, ORACLE, DB2, SQLite…

• ※shield: 방패

Users in database system

• Application programmers– Write database application programs in some

programming language such as C, C++, Java, Visual Basic, COBOL, …

• End users– Use the system online thru interface– Interface

• Built-in query language processor– Command-driven interfaces– Menu- or forms-driven interfaces

• DBA (database administrator)– Creates and maintains database

What is a database?

• Database– A collection of shared persistent data used

by the application systems of some particular enterprise

– Persistent data• Data that live long time• Differ from short-lived data like input data, outp

ut data, intermediate results---transient in nature

• ※intermediate: 중간의

Example

• A manufacturing company – product data

• A bank – account data• A hospital – patient data• A university – student data• A government department –

planning data

Entities and relationships 개체 , 관계성

• A medium to represent database for an enterprise conceptually.

• Entities– Independent, distinguishable objects

• Relationship– Unary – Binary– Ternary※unary: 일진 , Binary: 이진 , ternary: 삼진

Example of E/R

• A manufacturing company: KnowWare Inc.– Wants to record data about

• The projects on hand• The parts used in the projects• The suppliers who supply the parts• The warehouses in which those parts are stored• The employees who work on the projects entities

Example of E/R• There are relationships linking entities - bidirectional • SP (suppliers and parts)

– Each supplier supplies certain parts– Each part is supplied by certain suppliers

• PJ (projects and parts)– Parts are used in projects– Projects use parts

• WP (warehouse and parts)– Parts are stored in warehouses– Warehouses store parts

※Bidirectional: 양방향의

Ex) SP relationship*given a supplier, get the parts supplied by that supplier*given a part, get the suppliers who supply that part

• Entity/relationship diagram (E/R diagram for short)

Properties

• Entities and relationships can be regarded as having properties corresponding to the data we wish to record about them

• Ex) suppliers: name, city, …

※property: 특성

Why database?• Advantages over paper-based method of record ke

eping– Compactness

• No need for voluminous paper files– Speed– Less drudgery

• Elimination of maintaining files by hand – Currency

• Accurate, up-to-date information– Centralized control in multi-user environment

※drudgery: 힘들고 반복적인 일 , currency: 최신

Benefits of database

• Data sharing– Not only existing applications but also new applicat

ions• Reduction of redundancy

– Integration by DBA– Controlled redundancy

• Avoidance of inconsistency– Corollary of reduction of redundancy

※Redundancy: 중복성 , corollary: 계 , 당연한 결론

Benefits of database

• Transaction support– Transaction: a logical unit of work– Ex) transfer of money from account A to B

• Account A and B have to be updated• What if crash occurs before update of account

B?

※crash: 시스템 고장

Benefits of database

• Integrity– Data in the database is accurate

• Security– Having the complete jurisdiction over the data by D

BA• Ensure proper channels to access DB• Define security rules for sensitive data (read, write, modif

y)

※integrity: 무결성 , jurisdiction: 관할권

Benefits of database

• Balancing conflicting requirements– Ex) Internal storage method of data

• For fast access for the most important applications : eg. Index structure

• slower access for certain other applications : eg. sequential file structure

• Standards– Representation of data– Aid to data interchange or migration between syste

ms※sequential file: 순차파일

Benefits of database

• Data independence– Separation of physical and logical aspect of

database– DBA can change physical storage structure

and access strategy without having to modify existing applications

※access-strategy: 액세스방법

Recommended