Code&Data Insights

[Databases] Schemas and Instances & Architecture of a DBMS 본문

Computer Science/Databases

[Databases] Schemas and Instances & Architecture of a DBMS

paka_corn 2023. 2. 25. 08:53

 

Schemas and Instances

 

-       Databases instance: the current content of the DB

-       Databases schema: the structure of the data(relations/classes)

->  Relation(table) is as a set or tuple!

 

What is the meaning of Data Independence??

: the ability to modify definition of schema at one level with little or no effect on the schema at a high level

-       Logical data independence: adding new fields to a record or changing the type of a field

-       Physical data independence: changing a file structure from sequential to direct access

 

 

DBMS Implementation

 

3 Types of inputs to DBMS

-       Queries

-       Transactions ( Data Modification )

-       Schema Creation & Modification

-> DDL (Data Definition Language): works with schema

(ex) CREATE

-> DML (Data Manipulation Language): works with instance

(ex) SELECT, INSERT, DELETE, UPDATE

 

 

Architecture of a DBMS

 

 

1) Query processor : it handles queries & modification (data & schema)

2) Query processor + query optimizer(QO) : find the  ‘best plan’ to process query

       Issue commands to storage manager

3) Storage manager : request the info from data storage

       Modify info to data storage when requested

 

4) Transaction manager : responsible for the consistency of the data

--> Several queries running simultaneously do not ‘interfere’ with each other

-->  Integrity of the data even if there is a power failure (Recovery system)

 

5) Data + Metadata

--> Data : a set of raw facts that help identify useful info when they are cleaned, processed, and organized

--> Metadata : data about data.

 

 

 

Comments