What is “data”?
- Known facts that can be recorded and have an implicit meaning. • E.g., Names, phone numbers, and addresses of your acquaintances
What is “database” (DB)?- A(n) (organized) collection of related data
Data Base Management System (DBMS)?- A “software package/system” to enable users to create and maintain a database: e.g. Oracle, MySQL, ...
Database system?- DB + DBMS (+ DB Applications)
Traditional Applications
More Recent Applications
Businesses, Service Industries, Education, More recent applications (Social Networks ... ), Personalized Applications (Based on smart mobile devices, in which databases ard embedded)
• NoSQL is a term used for a broad group of data management technologies varying in features and functionality
• An SQL database is concrete concept, but NoSQL is NOT.
Features
• High performance writes and massive scalability:
E.g., MongoDB, Elasticsearch, Cassandra
• Do not require a defined schema for writing data; See the next slide.
• Primarily eventually-consistent by default
• Support of wide range of modern programming languages (Python, Scala, Go, ...) and tools
• Support of fault tolerance; typically, distributed computing
Example
MongoDB
Actual Impletmetation of MapReduce Programming Model for Big Data Processing
[Source : https://www.edureka.co/blog/mapreduce-tutorial/]
Features
Architecture
For road situation collection/analysis/diagnosis
1) Applications interact with a DB by generating:
Query: typically causes some data to be retrieved
Transaction: may cause some data to be read and/or to be written into the database atomically
2) Applications must not allow unauthorized users to access data: provide data protection.
3) Applications must keep up with changing user requirements against the DB; ex) password policy change, authorization change
- DB의 특정 데이터 유형, 구조, 및 제약 조건을 정의하는 것
- 초기 DB 콘텐츠를 secondary storage medium(HDD, SSD)에 물리적으로 생성하거나 로드하는 것
- Manipulating the database:
- Retrieval : Querying, generating reports
- Modification : Insertions, deletions and updates to its content
- Access : Having access to the database through Web applications
- 모든 Data는 유효성과 일관성은 유지하면서, 동시 사용자와 application programs의 집합 단위로 processing AND sharing을 수행한다.
- Mini-world for the example
Like a University environment
위에 표시한 'Entities'와 'Relationships'는 입란적으로 Conceptual data model에 표현된다.
Consider a UNIVERSITY (relational) database
- DB System은 DB 자체뿐만 아니라 DB Structure, types, constraints를 포함한다.
- Catalog : stores the description, called metadata, of a particular DB
That said, some newest systems (a few NoSQL ones: MongoDB, Cassandra, Redis) don’t need metadata.
Why?
-> They store the data definition within its structure so that it makes it self-describing (e.g. ‘key’ : ‘value’)
Called program-data indepence
- DBMS Access program에서 변경하지 않고 데이터 구조 및 저장 구성을 변경할 수 있게 한다.
- In file-processing systems, you “have to” change your program if the structure of a file accessed by the program gets altered.
Whay if you try to insert a Birth_Date attribute in the STUDENT record ?
-> Starting Position in Record : 40
If, you want to use VARCHAR, 한국의 주민 번호 기준 980509 -> 6 bytes
- program-data와 program-operation(on objects) independence를 허용해주는 특성
- Data model의 비공식적인 정의: data 추상화의 한 유형
- storage details를 숨기고 conceptual view of the DB를 users에게 보여주기 위해 사용
- Data가 어떻게 저장되고 접근되는지는 알 필요가 없다. -> Declarative property
- Application programs는 data storage 세부 정보가 아닌 data model 구성을 참조한다.
- Each user may see a different view(or, a virtual data) of the DBMS
- Then, 각 유저는 해당 유저가 관심있는 Data만을 보고 싶어한다.
- EX1) 한 사용자는 각 학생의 수강신청 내용을 확인하고 출력하는 데 관심이 있을 수 있다.
- EX2) 다른 사용자는 각 학생이 수강 신청한 각 과목의 선수과목을 모두 이수했는지 확인하는 데만 관심이 있을 수 있다.
- concurrent users의 집합이 DB로부터 데이터를 검색하고 DB를 갱신하는 것을 가능하게 한다.
E.g. U1(read) - U2(write) - U3(read) - U4(update) ...- DBMS의 Concurrency control(동시성 제어)은 각 transaction이 정상적인 경우에는 정확하게 실행되고, 이상이 있는 경우에는 중단되도록 보장한다.
- Transaction: DB 접근을 포함하는 일련의 statements로 구성되어 실행중인 프로그램이나 프로세스
- ACID (Atomicity, Consistency, Isolation, Durability) 특성을 만족해야 한다.
- Recovery subsystem은 완료된 각 transaction이 DB에 영구적으로 기록되는 것을 보장한다.
- OLTP (OnLine Transaction Processing)은 DB application이 주요 파트이다.
- 매 초단위로 수 백개의 동시적인 transactions가 실행되도록 한다.
- E.g. airline/train reservation, stock market, class reg, etc...
어떤 응용 프로그램의 엄격한 real-time 요구를 DBMS의 Overhead때문에 만족하지 못할 때
Modeling limitations으로 인해 DB system이 data의 Complexity를 처리할 수 없는 경우
E.g. 복잡한 유전체 및 단백질 데이터베이스
DBMS에서 지원하지 않는 특별한 작업이 필요한 경우 (예: GIS 및 위치 기반 서비스),
Reference
Database System Concepts | Abraham Silberschatz
데이터베이스 시스템 7th edition