CHEAT SHEET.pdf

# CHEAT SHEET.pdf - DDBMS Extension of two-phase locking...

• 2

This preview shows pages 1–2. Sign up to view the full content.

• If coordinator fails, cohorts block until coordinator’s recovery to decide whether to commit or abort. | Independent recovery is not possible in two-phase commit . 2P 3P Schedule is serializable if it produces the same results as if the transactions were performed serially in some order. If Ti writes x, and then Tj reads x, draw edge from Ti to Tj If Ti reads x, and then Tj writes x, draw edge from Ti to Tj If Ti writes x, and then Tj writes x, draw edge from Ti to Tj Deadlock- two or more transactions wait for locks being held by each another cycle RSA Algorithm Choose p=3 and q=11 Compute n=p*q => 3*11 = 33 Compute φ(n)=(p -1)*(q- 1)=2*10=20 Choose e such that 1<e<φ(n) and e and φ(n) are coprime. Let e=7 Compute a value for d such that (d*e)% φ(n) =1. One solution is d=3 [(3*7)%20=1] Public key is (e, n) => (7,33) Private key is (d, n) => (3, 33) The encryption of M M = 2 C=2^7 % 33 = 29 The decryption of C C = 29 M = 29^3 %33 = 2 ----------------------------------------- Diffie-Hellman Example 1. Alice and Bob agree on p = 23 and g = 5. 2. Alice chooses a = 6 and sends 5^6 mod 23 = 8. 3. Bob chooses b = 15 and sends 5^15 mod 23 = 19. 4. Alice computes 19^6 mod 23 = 2. 5. Bob computes 8^15 mod 23 = 2. Then 2 is the shared secret. Transaction Management for DDBMS • Each site that initiates transactions has a transaction coordinator to manage transactions that originate there • Additional concurrency control problem Multiple-copy inconsistency problem • Solutions use locking and timestamping ----------------------------------------- Centralized All data at one site only • Replicated All data duplicated at all sites • Partitioned Data divided among sites Fragmentation scheme: horizontal, vertical, mixed fragments Each item appears only once • Hybrid Combination of the others Locking Protocols

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Spring '17
• Dr. Cynthia Xin Zhang

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern