컴퓨터공학개론

(7/17/2024) 강의_컴퓨터공학개론_박매일강사님 (1/6)

연마페인킬러 2024. 7. 18. 09:13

인공지능에서 자주 쓰이는 Data Format

1. CSV (Comma-Separated Values)

  • Comma-separated values (CSV) is a text file format that uses commas to separate values, and newlines to separate records. A CSV file stores tabular data (numbers and text) in plain text, where each line of the file typically represents one data record.
  • e.g. Excel, ...

2. JSON (JavaScript Object Notation)

  • JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays.
  •  

JSON example

 

3. XML (Extensible Markup Language)

  • XML is a markup language (markup language is a set of rules that defines how the layout and presentation of text and images should appear in a digital document (e.g. html, xml, ...)) and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.
  •  

XML example

 

NOTE

  • JSON이 XML보다 데이터 저장 방식이 간단하다는 면에서는 (데이터 용량을 적게 잡아먹음) XML보다 JSON이 많이 사용됨.
  • 하지만 XML은 <>안에 속성을 정의할 수 있지만 JSON은 그럴 수 없기에, 그런 면에서는 XML이 JSON보다 나음.

 

 

Database Design

오늘은 Database Design 기초를 배웠다 (참고: https://polaris-a.tistory.com/m/11). 나는 학부시절 zyBooks로 배웠지만 YouTube나 Google에 "Database Design Course" 이런 식으로만 검색해도 굉장히 많은 자료들이 나오니 혼자 공부해봐도 좋을듯 싶다. 대충 오늘 강의시간에 나온 내용들을 list up 해보자면...

  • DBMS (DataBase Management System) vs. RDBMS (Relational DataBase Management System)

RDBMS는 DBMS의 advanced version이다.

테이블 정의서 예시
위의 테이블 정의서를 기반으로 한 MySQL에서 만들어 볼 EER Diagram 예시

 

MySQL에서 직접 code를 작성해도 되지만, 위와 같이 MySQL에서 EER Diagram을 만들면 자동적으로 해당 EER Diagram을 code로 변환시켜주는 기능이 있다는 것을 아는가? 나는 오늘 배웠다. Database -> Reverse Engineering -> Next 무한 클릭 후 원하는 Schema 선택 -> 이후 또 계속 Next 클릭하고, 마지막으로 Finish 클릭하면 -> Diagram 그릴 수 있는 판이 나옴 -> 거기서 EER Diagram 만들고 다 만들면 -> Database -> Forward Engineering -> Next 무한 클릭 후, 어떻게 export 할 지 정하고, code 확인하고, 마지막으로 Finish/Close 클릭하면 -> 원래 MySQL workbench로 돌아오면 내가 선택하였던 Schema에 내가 EER Diagram을 통해 만든 objects 또는 tables가 생성된 것을 확인할 수 있다.

-> Reverse Engineering은 code에서 EER Diagram으로 갈 때, Forward Engineering은 EER Diagram을 code로 변환할 때 쓰인다.

 

 

계속