Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Database Systems - Distributed Databases and Transactions - CAP Theorem - APPFICIAL
Play lesson

Database Systems with SQL - Full Course - Database Systems - Distributed Databases and Transactions - CAP Theorem - APPFICIAL

5.0 (0)
6 learners

What you'll learn

This course includes

  • 4.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Parallel computers and clusters A parallel computer has one operating system and can manage multiples processors, allowing them process multiple instructions concurrently. There are 3 types of parallel computer processors: shared memory - share the same memory and also storage media. shared storage - share storage media only, and memory is private shared nothing - do not share memory and do not share storage media. A node is a a single processor with it’s own memory and storage. You can connect nodes and they can communicate in one of two ways. Local area network (LAN) – connected by ethernet cables, typically once facility Wide area network (WAN) – connected by cables, satellite, or ethernet, and can span many miles or multiple facilities A cluster is a group of nodes connected by a LAN and managed by separate operating systems. Clusters are similar to parallel computers, since they both can execute multiple instructions concurrently. They could also share storage or not, but clusters cannot share memory since LANs access to memory is slow. Parallel and distributed databases Parallel database – a database system with running on a parallel computer or cluster, which runs queries concurrently. It can also break down some queries, such as a join query, into parts that run concurrently and execute faster. Distributed database – consist of nodes, or multiple computers, connected by a WAN. In the diagram Distributed transaction -  a set of operations on data that is performed across two or more databases. It is typically coordinated across separate nodes connected by a network, but may also span multiple databases on a single server. It updates data synchronously on multiple nodes of a distributed database. It does it in 2 phases: In phase 1, all nodes are informed of the updates by a transaction coordinator. In phase 2, the transaction coordinator receives all confirmations and instructs nodes to commit. Distributed transactions are relatively slow, as multiple nodes must respond before the transaction commits. A faster alternative is a local transaction, which updates data asynchronously on a single node of a distributed database. Multiple single nodes can be updated independently with local transactions. However, one problem is that local transactions may create temporary inconsistency, as nodes are updated at different times. Choosing between local or distributed transactions depends on your database performance and consistency requirements. For example, you should use distributed transactions for important data like financial records, or use local transactions if you want to count like clicks on an image you posted. A consistent database follows all the rules governing on the data on all nodes.. An available database is when the live nodes always respond to queries. A node is considered 'dead’ if it’s unresponsive, but 'live' nodes always respond. A network partition happens when network error prevents nodes from communicating. If a network partition occurs, a partition-tolerant database keeps functioning. The CAP theorem states that a distributed database system has to make a tradeoff between consistency and availability when a partition occurs. They cannot simultaneously be Consistent, Available, and Partition-tolerant. A distributed database can guarantee any two, but not all three, of these properties. For example in a distributed system, if a partition occurs between two nodes, it is impossible to provide consistent data on both the nodes and availability of complete data. Subscribe to Appficial for more programming videos coming soon. Also, don't forget to click LIKE and comment on the video if it helped you out!

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere