# ฐานข้อมูล NoSQL (Data Engineering) > GraphDB (Neo4j), Document DBs (MongoDB, Firestore), Wide Column (Cassandra, Bigtable), ทฤษฎีบท CAP, กรณีการใช้งาน - 20 คำถามสัมภาษณ์ - Senior - [คำถามสัมภาษณ์: Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions.md) ## 1. ทฤษฎีบท CAP คืออะไรและคุณสมบัติทั้งสามของมันคืออะไร? **คำตอบ** ทฤษฎีบท CAP ระบุว่าระบบแบบกระจายสามารถรับประกันคุณสมบัติเพียงสองในสามอย่างพร้อมกันเท่านั้น: Consistency (โหนดทั้งหมดเห็นข้อมูลเดียวกัน), Availability (ระบบตอบสนองเสมอ) และ Partition tolerance (ระบบทำงานต่อไปแม้จะมีการแบ่งเครือข่าย) ทฤษฎีบทนี้เป็นพื้นฐานสำหรับการทำความเข้าใจการแลกเปลี่ยนด้านสถาปัตยกรรมในฐานข้อมูล NoSQL ## 2. ความแตกต่างหลักระหว่างฐานข้อมูล Document (MongoDB) และฐานข้อมูล Wide Column (Cassandra) คืออะไร? **คำตอบ** ฐานข้อมูล Document เช่น MongoDB เก็บเอกสาร JSON/BSON ด้วย schema ที่ยืดหยุ่นและรองรับ query ที่ซับซ้อนบนฟิลด์ใดๆ ฐานข้อมูล Wide Column เช่น Cassandra จัดระเบียบข้อมูลในรูปแบบ column family พร้อม partition key ซึ่งปรับให้เหมาะกับการเขียนจำนวนมากและการอ่านตาม key MongoDB เก่งในข้อมูลแบบลำดับชั้น Cassandra เก่งในข้อมูลอนุกรมเวลาความเร็วสูง ## 3. ในกรณีการใช้งานใดควรเลือก Neo4j มากกว่า MongoDB หรือ Cassandra? **คำตอบ** Neo4j เป็นฐานข้อมูลกราฟที่ปรับให้เหมาะกับความสัมพันธ์ที่ซับซ้อนหลายระดับระหว่างเอนทิตี เก่งในด้านโซเชียลเน็ตเวิร์ก ระบบแนะนำ การตรวจจับการฉ้อโกง และการวิเคราะห์การพึ่งพา ภาษา Cypher ช่วยให้สามารถข้ามผ่านความสัมพันธ์นับล้านในไม่กี่มิลลิวินาที ในที่ที่ SQL join หรือ NoSQL lookup จะช้าเกินไปในแง่ของประสิทธิภาพ ## มีอีก 17 คำถาม - Partition key ใน Cassandra คืออะไรและทำไมจึงสำคัญต่อประสิทธิภาพ? - ไวยากรณ์ Cypher ในการค้นหาเพื่อนของเพื่อนทั้งหมดของผู้ใช้ใน Neo4j คืออะไร? สมัครฟรี: https://sharpskill.dev/th/login ## หัวข้อสัมภาษณ์ Data Engineering อื่นๆ - [Linux & Shell - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/linux-shell-basics.md): 20 คำถาม, Junior - [Git & GitHub - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/git-github-fundamentals.md): 20 คำถาม, Junior - [Python ขั้นสูงสำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/python-advanced-de.md): 25 คำถาม, Junior - [Docker - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/docker-fundamentals.md): 25 คำถาม, Junior - [Google Cloud Platform - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/gcp-fundamentals.md): 20 คำถาม, Junior - [CI/CD และคุณภาพโค้ด](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/ci-cd-code-quality.md): 20 คำถาม, Mid-Level - [Docker Compose](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/docker-compose.md): 20 คำถาม, Mid-Level - [FastAPI - Data API](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/fastapi.md): 20 คำถาม, Mid-Level - [SQL ขั้นสูงสำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/sql-advanced-de.md): 20 คำถาม, Mid-Level - [Data Lake - สถาปัตยกรรมและการนำเข้าข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-lake.md): 20 คำถาม, Mid-Level - [BigQuery สำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/bigquery-de.md): 20 คำถาม, Mid-Level - [PostgreSQL - การดูแลระบบ](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/postgresql-admin.md): 20 คำถาม, Mid-Level - [Data Modeling สำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-modeling-de.md): 20 คำถาม, Mid-Level - [Fivetran & Airbyte - การนำเข้าข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/fivetran-airbyte.md): 20 คำถาม, Mid-Level - [dbt - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/dbt-fundamentals-de.md): 20 คำถาม, Mid-Level - [Apache Airflow - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-fundamentals.md): 20 คำถาม, Mid-Level - [Kubernetes - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/kubernetes-fundamentals.md): 20 คำถาม, Mid-Level - [dbt - ฟีเจอร์ขั้นสูง](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/dbt-advanced-de.md): 20 คำถาม, Senior - [รูปแบบ ETL / ELT / ETLT](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/etl-elt-patterns.md): 20 คำถาม, Senior - [Apache Airflow - ขั้นสูง](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-advanced.md): 20 คำถาม, Senior - [Airflow + dbt - การจัดการ Pipeline](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-dbt-integration.md): 20 คำถาม, Senior - [PySpark - การประมวลผลขนาดใหญ่](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/pyspark.md): 20 คำถาม, Senior - [Google Pub/Sub - การสตรีมข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/pubsub-streaming.md): 20 คำถาม, Senior - [Apache Beam & Dataflow](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/apache-beam-dataflow.md): 20 คำถาม, Senior - [Kubernetes - Production และ Scaling](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/kubernetes-advanced.md): 20 คำถาม, Senior - [Terraform - Infrastructure as Code](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/terraform.md): 20 คำถาม, Senior - [Data Architecture สมัยใหม่](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-architecture.md): 20 คำถาม, Senior - [การมอนิเตอร์และการสังเกตการณ์](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/monitoring-observability.md): 20 คำถาม, Senior - [IAM และความปลอดภัยของข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/iam-security-de.md): 20 คำถาม, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/th/technologies/data-engineering/interview-questions/nosql-databases