Unfazed❗️🎯

Data Abstraction and Data Model 본문

Database (데이터베이스)

Data Abstraction and Data Model

9taetae9 2023. 10. 20. 10:54
728x90

Schema

-refers any logical or physical structure of the database

-similar to the vairable type in program languages (프로그래밍언어의 type과 유사)

-view, logical, physical schema

ex) create table student {...} =>student schema

 

Instance

-actual content of the databases for schema(at a particular point in time)

-similar to the values of a vairable (변수의 값과 유사)

=> 어떤 시점에서의 table에 있는 row,record 개체들

 

Levels of Data Abstraction

Physical level : how a record is (physically) stored

Logical level : stored data and the relationships among the data

ex) type professor = record ID :string; name : string; department : string; end;

View level : part of database that a particul user is interested in

-Hide the rest of the database(for security purposes)

View level(view schemea1, .., view schema n) =>(view/logical mapping)=>Logical level(Logical schmema)=>(logical/physical mapping)=>Physical level(Physical schema)-DB

 

Data Independance 

Physical data independence => modify the physical schema without changing the logical schema

Logical data independence => modify the logical schema without changing the view schema,

applications depend on the view schema

 

Data Model

Real data => randomly scattered over storage devices(ex) disk)/ hard to describe how data reside.

we need to abstract them! 

 

Data models abstract data conceptually => we can describe&manipulate data conceptually

Data model is specification that describes (Data, Data relationships, Data semantics, Data constraints etc.)

 

-Relational/ Object-relational/ Object-oriented data model

-Entity-Relationship data model (for database design)

-XML (for semi-structured data)

-Hierarchical data model/ Network data model

 

Object-Relational Data model

-extend the relational data model by including object orientation and constructs to deal with added data types

-attributes of tuples can have complex types, including non-atomic values such as nested relation

-preserve relational foundations(decalarative access to data, while extending modeling power)

-provide upward compatibility with existing relational languages

 

XML(Extensible Markup Language)

-defined by the WWW Consortium(W3C)

-specify new tags, to create nested tag structures made XML a great way to exchange data

-wide variety of tools is avilable for parsing, browsing and querying XML documents/data

 

Database Design 

-process of designing the general structure of the databse

-logical design : decide on the databse schema (logical schema, view schema)

-physical design : decide on the physical layout of the database (physical schema)

-database schema is importan for databse system performance

 

Databases Design Approaches 

1. Entity Relationship Model

-Models an enterprise as a collection of entities and relationships

-Represented diagrammatically by an entity-relationship diagram

-Maps an entity-relationship diagram into target DBMS schema

 

2. Normalization Theory

-Formalize what designs are bad

-How to get good schema

728x90