Free Essay

It, Network

In:

Submitted By Eyram
Words 6614
Pages 27
CS 143 Final Exam Notes

Disks

A typical disk

▪ Platter diameter: 1-5 in ▪ Cylinders: 100 – 2000 ▪ Platters: 1 – 20 ▪ Sectors per track: 200 – 500 ▪ Sector size: 512 – 50K ▪ Overall capacity: 1G – 200GB ❖ ( sectors / track ) ( ( sector size ) ( ( cylinders ) ( ( 2 ( number of platters )

Disk access time

▪ Access time = (seek time) + (rotational delay) + (transfer time) ❖ Seek time – moving the head to the right track ❖ Rotational delay – wait until the right sector comes below the head ❖ Transfer time – read/transfer the data

Seek time

▪ Time to move a disk head between tracks ❖ Track to track ~ 1ms ❖ Average ~ 10 ms ❖ Full stroke ~ 20 ms

Rotational delay

▪ Typical disk: ❖ 3600 rpm – 15000 rpm ❖ Average rotational delay ➢ 1/2 * 3600 rpm / 60 sec = 60 rps; average delay = 1/120 sec

Transfer rate

▪ Burst rate ❖ (# of bytes per track) / (time to rotate once) ▪ Sustained rate ❖ Average rate that it takes to transfer the data ❖ (# of bytes per track) / (time to rotate once + track-to-track seek time)

Abstraction by OS

▪ Sequential blocks – No need to worry about head, cylinder, sector ▪ Access to random blocks – Random I/O ▪ Access to consecutive blocks – Sequential I/O

Random I/O vs. Sequential I/O

▪ Assume ❖ 10ms seek time ❖ 5ms rotational delay ❖ 10MB/s transfer rate ❖ Access time = (seek time) + (rotational delay) + (transfer time) ▪ Random I/O ❖ Execute a 2K program – Consisting of 4 random files (512 each) ❖ ( ( 10ms ) + ( 5ms ) + ( 512B / 10MB/s ) ) ( 4 files = 60ms ▪ Sequential I/O ❖ Execute a 200K program – Consisting of a single file ❖ ( 10ms ) + ( 5ms ) + ( 200K / 10MB/s) = 35ms

Block modification

▪ Byte-level modification not allowed ❖ Can be modified by blocks ▪ Block modification ❖ Read the block from disk ❖ 2. Modify in memory ❖ 3. Write the block to disk

Buffer, buffer pool

▪ Keep disk blocks in main memory ❖ Avoid future read ❖ Hide disk latency ▪ Buffer, buffer pool ❖ Dedicated main memory space to “cache” disk blocks ❖ Most DBMS let users change buffer pool size

Files

Spanned vs. Unspanned

▪ Unspanned – Store as many tuples into a block, forget about the extra remaining space ▪ Spanned – Store as many tuples into a block, store part of the next tuple into the block

Deletion

▪ For now, ignore spanning issue, irrelevant for current discussion ▪ What should we do? ❖ Copy the last entry into the space ❖ Shift all entries forward to fill the space ❖ Leave it open and fill it with the next update ➢ Have a pointer to point to the first available empty slot ➢ Have a bit-map of the occupancy of the tuples

Variable-Length Tuples

▪ Reserved Space – Reserve the maximum space for each tuple ▪ Variable Length ❖ Tuple length in the beginning ❖ End-of-record symbol ❖ Pack the tuples tightly into a page ▪ Update on Variable Length Tuples? ❖ If new tuple is shorter than the tuple before – just place it where it was ❖ If new tuple is longer than the tuple before – delete the old tuple and place it at the end of the block with free space ▪ Slotted Page ❖ Header slots in the beginning, pointing to tuples stored at the end of the block

Long Tuples

▪ Spanning ▪ Splitting tuples – Split the attributes of tuples into different blocks

Sequential File – Tuples are ordered by some attributes (search key)

Sequencing Tuples

▪ Inserting a new tuple ❖ Easy case – One tuple has been deleted in the middle ➢ Insert new tuple into the block ❖ Difficult case – The block is completely full ➢ May shift some tuples into the next block, if there are space in the next block ➢ If there are no space in the next block, use the overflow page ▪ Overflow page ❖ Overflow page may over flow as well ➢ Use points to point to additional overflow pages ➢ May slow down performance, because this uses random access ▪ Any problem? ❖ PCTFREE in DBMS ➢ Keeps a percentage of free space in blocks, to reduce the number of overflow pages ➢ Not a SQL standard

Indexing

Basic idea – Build an “index” on the table

▪ An auxiliary structure to help us locate a record given to a “key” ▪ Example: User has a key (40), and looks up the information in the table with the key

Indexes to learn

▪ Tree-based index ❖ Index sequential file ➢ Dense index vs. sparse index ➢ Primary index (clustering index) vs. Secondary index (non-clustering index) ❖ B+ tree ▪ Hash table ❖ Static hashing ❖ Extensible hashing

Dense index

▪ For every tuple in the table, create an index entry which to search on, and a pointer to the tuple that it points to (so just an index with pointers to the tuple in the block that the tuple is in) ▪ Dense index blocks contain more indexes per block than tuples in their blocks, because dense indexes are much smaller in size than the tuple that they point to.

Why dense index?

▪ Example: ❖ 1,000,000 records (900-bytes/rec) ❖ 4-byte search key, 4-byte pointer ❖ 4096-byte block ▪ How many blocks for table? ❖ Tuples / block = size of block / size of tuples = 4096 / 900 = 4 tuples ❖ Records / tuples = 1,000,000 / 4 = 250,000 blocks ❖ 250,000 blocks * 4096 bytes / block = 1GB ▪ How many blocks for index? ❖ Index / block = 4096 / 8 = 512 ❖ Records / indexes = 1,000,000 / 512 = 1956 ❖ 1956 blocks * 4096 bytes / block = 8MB

Sparse index

▪ For every block, create an index entry which to search on, and a pointer to the block that it points to (even smaller index size of the dense index) ▪ In real world, this reduces the index size dramatically, because there may be many tuples in one block, for which sparse index only creates on index entry to those tuples

Sparse 2nd level

▪ For every index block, create an index entry which to search on, and a pointer to the index block that it points to (an index on the index, which further reduces in size) ▪ Can create multiple level of indexes (multi-level index)

Terms

▪ Index sequential file (Index Sequential Access Method) ▪ Search key (( primary key) ▪ Dense index vs. Sparse index ▪ Multi-level index

Duplicate keys

▪ Dense index, one way to implement – Create an index entry for each tuple ▪ Dense index, typical way – Create an index entry for each unique tuple

Updates on the index?

▪ Insertion (empty) – First follow the link structure to identify where the tuple should be located (found with enough space) ▪ Insertion (overflow) – Create an overflow block with a pointer from the original block, which adds the entry 15 into the overflow block ▪ Insertion (redistribute) ❖ Try to move blocks to other adjacent blocks ❖ Update any changes to the indexes as needed

Deletion (one tuple)

▪ See which index block the tuple is located ▪ If the first entry of the block is not deleted, no update to index necessary ▪ If the first entry of the block is deleted, update the index appropriately

Deletion (entry block)

▪ If the entire block is deleted, the index entry can be deleted ▪ Move all index entries within the block up to compact space

Primary index – Index that is created over the set of attributes that the table is stored (also called clustering index)

Secondary index

▪ Index on a non-search-key ▪ Unordered tuples – Non-sequential file ▪ Sparse index make sense? ❖ Does not make sense because the files are not not in sequence ▪ Dense index on first level ▪ Sparse index from the second level

Duplicate values & secondary indexes

▪ One option – Dense index for every tuple that exist ▪ Buckets ❖ Blocks that holds pointers to the same index keys ❖ Intermediary level between the index and the tables

Traditional index

▪ Advantage ❖ Simple ❖ Sequential blocks ▪ Disadvantage ❖ Not suitable for updates ❖ Becomes ugly (loses sequenality and balance) over time

B+ tree

B+ tree

▪ Most popular index structure in RDBMS ▪ Advantage ❖ Suitable for dynamic updates ❖ Balanced ❖ Minimum space usage guarantee ▪ Disadvantage ❖ Non-sequential index blocks

B+ tree example

▪ N pointers, (n-1) keys per node ▪ Keys are sorted within a node ▪ Balanced: all leaves at same level

Same non-leaf node (n = 3)

▪ At least (n/2( pointers (except root) ▪ At least 2 pointers in the root

Nodes are never too empty

▪ Use at least ❖ Non-leaf: (n/2( pointers ❖ Leaf: ((n-1)/2(+1 pointers

Insert into B+ tree (simple case)

Insert into B+ tree (leaf overflow)

▪ Split the leaf, insert the first key of the new node ▪ Move the second half to a new node ▪ Insert the first key of the new node to the parent

Insert into B+ tree (non-leaf overflow)

▪ Find the middle key ▪ Move everything on the right to a new node ▪ Insert (the middle key, the pointer to the new node) into the parent

Insert into B+ tree (new root node)

▪ Insert (the middle key, the pointer to the new node) into the new root

Delete from B+ tree (simple case)

▪ Underflow (n = 4) ❖ Non-leaf < (n/2( = 2 pointers ❖ Leaf < ((n-1)/2(+1 = 3 pointers

Delete from B+ tree (coalesce with sibling)

▪ Move the node across to its sibling if there are rooms available

Delete from B+ tree (re-distribute)

▪ Grab a key from the sibling and move it to the underflowing node

Delete from B+ tree (coalesce at non-leaf)

▪ Push down the parent key into the child node ▪ Get the mid-key from parent ▪ Push down one of the grand-parent keys into the neighboring parent key ▪ Point the child key to the push-down grand-parent key

Delete from B+ tree (redistribute at non-leaf)

▪ Combine the parent and the neighboring keys to make one full node ▪ Push down one of the grand-parent keys ▪ Push up one of the neighboring parent keys

B+ tree deletions in practice

▪ Coalescing is often not implemented ❖ Too hard and not worth it!

Question on B+ tree

▪ SELECT * FROM Student WHERE sid > 60 ▪ Very efficient on B+ tree ▪ Not efficient with hash tables

Index creation in SQL

▪ CREATE INDEX ON <table> (<attr>, <attr>, …) ▪ i.e.,

CREATE INDEX ON Student (sid)

❖ Creates a B+ tree on the attributes ❖ Speeds up lookup on sid ▪ Clustering index (in DB2)

CREATE INDEX ON Student (sid) CLUSTER

❖ Tuples are sequenced by sid

Hash table

What is a hash table?

▪ Hash table ❖ Hash function ➢ Divide the integer by the key ➢ h(k): key ( integer [0…n] ➢ i.e., h(‘Susan’) = 7 ❖ Array for keys: T[0…n] ❖ Given a key k, store it in T[h(k)] ▪ Properties ❖ Uniformity – entries are distributed across the table uniformly ❖ Randomness – even if two keys are very similar, the hash values will eventually be different

Why hash table?

▪ Direct access ▪ saved space – Do not reserve a space for every possible key

Hashing for DBMS (static hashing)

▪ Search key ( h(key), which points to a (key, record) in disk blocks (buckets)

Record storage

▪ Can store as whole record or store as key and pointer, which points to the record

Overflow

▪ Size of the table is fixed, thus there is always a chance that a bucket would overflow ▪ Solutions: ❖ Overflow buckets (overflow block chaining) – link to an additional overflow bucket ➢ More widely used ❖ Open probing – go to the next bucket and look for space ➢ Not used very often anymore

How many empty slots to keep?

▪ 50% to 80% of the blocks occupied ❖ If less than 50% used ➢ Waste space ➢ Extra disk look-up time with more blocks that needs to be looked up ❖ If more than 80% used ➢ Overflow likely to occur

Major problem of static hashing

▪ How to cope with growth? ❖ Data tends to grow in size ❖ Overflow blocks unavoidable

Extensible hashing

▪ Two ideas ❖ Use i of b bits output by hash function ➢ Use the prefix of the first i bits of a string of b-bits in length (i.e., use the first 3 bits of a 5-bit hash value) ❖ Use directory that maintains pointers to hash buckets (indirection) ➢ Maintain a directory and do some indirection ▪ Possible problems ❖ When there are many duplicates, because there are more copies than digits (?) ➢ Still need to use overflow buckets ❖ No space occupancy guarantee when values are extremely skewed, thus needing a very good hash function ❖ Efficient for equality operator (=), but not efficient for range operators (>, <, etc.) ▪ Bucket merge ❖ Bucket merge condition ➢ Bucket i’s are the same ➢ First (i-1) bits of the hash key are the same ❖ Directory shrink condition ➢ All bucket i’s are smaller than the directory i ▪ Summary ❖ Can handle growing files ➢ No periodic reorganizations ❖ • Indirection ➢ Up to 2 disk accesses to access a key ❖ • Directory doubles in size ➢ Not too bad if the data is not too large

Extendible Hashing

Data Structure

▪ Use the first i of b bits output by the hash function to identify each record ▪ Use a directory that maintains pointers to hash buckets (indirection)

Queries and Updates

▪ To locate the bucket, look up the first i bits and traverse the directory using those bits ▪ To insert into a bucket, use the first i bits and traverse the directory using those bits to the appropriate bucket ❖ If there is space in the bucket, insert the record into the bucket ❖ If there is no space in the bucket, and the i digit of the bucket address table is equal to the bucket i digit ➢ Only one entry in the bucket address table points to the bucket ➢ Increase both the i digit of the bucket address table and the i digit of the bucket by 1, and split the bucket into two, and insert into the appropriate bucket ❖ If there is no space in the bucket, and the i digit of the bucket address table is greater then the i digit of the bucket ➢ More than one entry in the bucket address table points to the bucket ➢ Redirect one of the entries in the bucket address table to point to a new bucket, and increase the i digit current bucket by 1

Join Algorithms

Givens

▪ 10 tuples/block ▪ Number of tuples in R (|R|) = 10,000 ▪ Number of blocks for table R (BR) = |R| / (tuples/block) = 10,000 / 10 = 1,000 blocks in R ▪ Number of tuples in R (|S|) - 5,000 ▪ Number of blocks for table S (BS) = |S| / (tuples/block) = 5,000 / 10 = 500 blocks in S ▪ Number of buffer blocks in main memory (M) = 102

Block Nested-Loop Join

▪ Steps: ❖ Read a number of blocks into main memory (using M – 1 blocks) ❖ Read the blocks of another table one by one into main memory (using one block) ❖ Compare and output the joined tuples (using 1 block) ❖ Repeat until done ▪ Example: ❖ Since main memory is too small to hold either table, we should use the memory to hold as many blocks of the larger table, and leave the smaller table on the outside. ❖ Main memory usage ❖ 102 main memory blocks – 100 blocks (S), 1 block (R), 1 block (writing output) ❖ I/O count: ➢ For S, read 100 blocks into memory at a time = [pic] = 5 ➢ For R, read 1 block into memory at a time = 1,000 ➢ Total I/O = [pic] = 5,500

Merge Join

▪ Steps: ❖ If the tables are already sorted, can proceed straight into the merging and compare part of the algorithm ❖ If the tables are not sorted, sort each table first using merge sort, then merge and compare the two tables ➢ To sort: o Read M blocks into main memory, sort them, then output it to a resultant partition o Repeat until done ➢ To merge: o Read the first blocks of the first M partitions (if less than or equal to M partitions), or the first blocks of the first M – 1 partitions (if more than M partitions, with one block for writing the output) into main memory, sort them, then output it to a resultant partition o Repeat until done ▪ Example: ❖ Main memory usage ➢ M blocks are used in the splitting stage ➢ In the first pass of the merging stage (while sorting the tables), M blocks are used to store the blocks from the table ➢ In the second pass and on of the merging stage (while sorting the tables), M – 1 blocks are used to store the blocks from the table ❖ Sorting the R table ➢ Number of partitions = [pic] = 10 ➢ Splitting pass ➢ Resulting in 10 partitions ➢ Merging pass ➢ Resulting in one sorted table ➢ I/O for sorting = number of passes * (2 * number of blocks in the table = 2 * (2 * 1,000) = 4,000 ❖ Sorting the S table ➢ Number of partitions = [pic] = 5 ➢ Splitting pass ➢ Resulting in 10 partitions ➢ Merging pass ➢ Resulting in one sorted table ➢ I/O for sorting = number of passes * (2 * number of blocks in the table = 2 * (2 * 500) = 2,000 ❖ Merging ➢ I/O for merging = BR + BS = 1,000 + 500 = 1,500 ❖ Total I/O = Sorting + Merging = (4,000 + 2,000) + 1,500 = 7,500

Hash Join

▪ Steps: ❖ Hashing (bucketizing) ➢ Split the tables into M – 1 buckets ❖ Joining ➢ Read buckets from each table into main memory and see which tuples in the buckets match ▪ Example: ❖ Hashing the S table ➢ Number of buckets = [pic] = 5 ➢ Blocks in a bucket = [pic] = 100 ➢ I/O for hashing = 2 * BS = 2 * 500 = 1,000 ❖ Hashing the R table ➢ Number of buckets = [pic] = 10 ➢ Blocks in a bucket = [pic] = 100 ➢ I/O for hashing = 2 * BR = 2 * 1,000 = 2,000 ❖ Joining the S and R tables ➢ Load the smaller table into main memory (if all of the buckets of the smaller table fits into main memory) ➢ I/O for joining = BR + BS = 1,000 + 500 = 1,500 ❖ Total I/O = Hashing + Joining = (1,000 + 2,000) + 1,500 = 4,500

Index Join

▪ Steps: ❖ Given an existent index on table S ❖ For each tuple in R, look up whether a matching tuple exist in S using the index of S ▪ Factors to consider: ❖ Index look up cost (C) ➢ How many blocks for index? ➢ How many levels? ❖ Number of matching tuples (J) ❖ Disk I/O = BR + |R| * (C + J) ➢ Read R blocks ➢ Look up index on S o For every R tuples, disk I/O = C + J (assume that disk blocks are not clustered) ▪ Example: ❖ Given: J = 0.1, BI (number of index blocks) = 90 ❖ Load index into main memory (because index will be accessed multiple times, and it is smaller than the main memory size) = BI = 90 ➢ Therefore, the index lookup variable C is 0, because the whole index is in main memory. ❖ For every tuple in R, look up the tuple in S = |R| * (C + J) ❖ For every block in R = BR ❖ Total I/O = BI + (BR + |R| * (C + J)) = 90 + (1,000 + 10,000 (0 + 0.1)) = 2,090 ▪ Example: ❖ Given: J = 1, BI = 200 ❖ Main memory usage: ➢ Cannot load index into main memory, because it is bigger than the number of buffer blocks in main memory ➢ Load as many index blocks into main memory ➢ 102 blocks – 1 block for reading R table, 1 block for reading S table, 1 block for writing output, 1 block for index node, 98 blocks for index leaf nodes ➢ Therefore, the index lookup variable C ( 0.5 (98/199 and 101/199 for the two cases), since only the root of the index and 98 leaf nodes can be in the main memory ❖ Total I/O = BI + (BR + |R| * (C + J)) = 99 + (1,000 + 10,000 * (0.5 + 1)) = 16,099

Relational Design Theory

Problems with redundancy: Update anomalies

▪ Modification anomaly – A situation in which the modification of a row of a table creates an inconsistency with another row ❖ i.e., modifying the class that a student is taking ▪ Deletion anomaly – A situation in which the deletion of one row of a table results in the deletion of an unintended information ❖ i.e., deleting a class may also delete information about a student (if that is the last entry of the student in the database) ▪ Insertion anomaly – A situation in which the insertion of a row in a table creates an inconsistency with other rows ❖ i.e., inserting a new class must also include student information for students in that class

Functional Dependency

▪ Definition: Given A1, A2, ..., An, we can uniquely determine B1, B2, ..., Bm ❖ Trivial functional dependency: A ( B, and B ( A ❖ Completely non-trivial functional dependency: A ( B, X ( Y = ( ▪ Logical implication ❖ Example: R ( A, B, C, G, H I ) ➢ Functional dependencies: o A ( B o A ( C o CG ( H o CG ( I o B ( H ➢ Conclusions: o A ( BCH, because A ( ABCH o CG ( HI, because CG ( CGHI o AG ( I, because AG ( ABCGHI o A does not ( I, because A ( BCH ▪ Canonical cover ❖ Functional dependencies ➢ A ( BC ➢ B ( C ➢ A ( B ➢ AB ( C ❖ Is A ( BC necessary? ➢ No, because A ( B, and B ( C, so A ( BC, thus A ( BC is not necessary ❖ Is AB ( C necessary? ➢ No, because B ( C, so AB ( is not necessary ❖ Canonical cover may not be unique ❖ Most of the time, people directly find a canonical cover by intuition ▪ Closure (of attribute set) ❖ CLOSURE OF X: X+. the set of all attributes functionally determined by X ❖ Algorithm for closure computation: start with T = X repeat until no change in T if T contains LHS of a FD, add RHS of the FD to T ❖ Example: ➢ F = o A ( B o A ( C o CG ( H o CG ( I o B ( H ➢ {A}+ = {A, B, C, H} ➢ {AG}+ = {A, B, C, G, H, I} ❖ Example: StudentClass ➢ {sid}+ = sid, name, ▪ Key & functional dependency ❖ Notes: ➢ A key determines a tuple ➢ Functional dependency determines other attributes ❖ X is a key of R if ➢ X ( all attributes of R (ie, X+ = R) ➢ No subset of X satisfies the prior property mentioned above (i.e., X is minimal)

Decomposition

▪ Notes: ❖ To obtain a "good" schema, we often split a table into smaller ones ➢ Split table R(A1, ..., An) into R1(A1, ..., Ai) and R2(Aj, ..., An) ➢ {A1, ... An} = {A1, .., Ai} UNION {Aj, ..., An} ❖ Why do we need common attributes? ➢ So we can put the tables back together to form the original table ▪ Lossless decomposition ❖ Definition ➢ We should not lose any information by decomposing R ➢ R = R1 NJ R2 ❖ Example: cnum sid name 143 1 James 143 2 Jane 325 2 Jane ➢ What if we use the following schema? R1 ( cnum, sid ), R2 ( cnum, name ) o Not lossless decomposition, we get additional answers not in the original table ➢ What if we use the following schema? R1 ( cnum, sid ), R2 ( sid, name ) o It is a lossless decomposition, because sid ( name, so the common attribute uniquely determines a tuple in the R2 table ❖ When is decomposition lossless? ➢ Common attribute should uniquely determine a tuple in at least one table ➢ R ( X, Y, Z ) ( R1 ( X, Y ), R2 ( Y, Z ) is loss iff either Y ( Z or Y ( X ❖ Example: ClassInstructor ( dept, cnum, instructor, office, fax ) ➢ FDs: o dept, cnum ( instructor o instructor ( office o office ( fax ➢ Decomposed tables: o R1 ( dept, cnum, instructor, office ) ▪ R3 ( instructor, office ) ▪ R4 ( dept, cnum, instructor ) o R2 ( office, fax )

Boyce-Codd Normal Form (BCNF)

▪ Definition: R is in BCNF with regard to F, iff for every non-trivial X ( Y, X contains a key ❖ No redundancy due to FD ▪ Algorithm: ❖ For any R in the schema If (X ( holds on R AND X ( Y is non-trivial AND X does not contain a key), then 1) Compute X (X : closure of X) 2) Decompose R into R1 (X+) and R2 (X, Z) // X becomes common attributes // Z: all attributes in R except X+ Repeat until no more decomposition ▪ Example: ❖ StudentAdvisor ( sid, sname, advisor ) ➢ FDs: o sid ( sname o sid ( advisor ➢ Is it BCNF?

Dependency-preserving decomposition

▪ FD is a kind of constraint ▪ Checking dependency preserving decomposition ❖ Example: R ( office, fax ), office ( fax ➢ A local checking operation: look up office in the table, and make sure the newly inserted fax number is the same ❖ Example: R1 ( A, B ), R2 ( B, C ), A ( B, B ( C, A ( C ➢ Check for each part of the tuple corresponding to each table to make sure that it does not violate any constraints ➢ Do not need to check A ( C because it is implied where A ( B and B ( C ❖ Example: R1 ( A, B ), R2 ( B, C ), A ( C ➢ Have to join tables together to make sure that the attributes are not duplicated ▪ BCNF does not guarantee dependency preserving decomposition ❖ Example: R ( street, city, zip ), street, city ( zip, zip ( city ➢ Use violating FD to split up table o R1 ( zip, city ) o R2 ( zip, street ) ➢ Have to join the two tables together in order to check whether street, city ( zip

Third-Normal Form (3NF)

▪ Definition: R is in 3NF regards to F iff for every non-trivial X ( Y, either 1. X contains a key, or 2. Y is a member of key ▪ Theorem: There exist a decomposition in 3NF that is a dependency-preserving decomposition ❖ May have redundancy, because of the relaxed condition

Multivalue dependency (MVD)

▪ Example: Class(cnum, ta, sid). Every TA is for every student ❖ Table: ➢ cnum: 143, TA: tony, james, sid: 100, 101, 103 ➢ cnum: 248, TA: tony, susan, sid: 100, 102 ➢ cnum ta sid ------------------------------- 143 tony 100 143 tony 101 143 tony 103 143 james 100 143 james 101 143 james 103 248 tony 100 248 tony 102 248 susan 100 248 susan 102 ❖ Where does the redundancy come from? ➢ In each class, every TA appears with every student o For C1, if TA1 appears with S1, TA2 appears with S2, then TA1 also appears with S2 ▪ Definition: X (> R For every tuple u, v in R if u[x] = v[x], then there exist a tuple w such that 1. w[X] = u[X] = v[X] 2. w[Y] = u[Y] 3. w[Z] = v[Z] where Z is all attributes in R except (X, Y) ▪ MVD requires that tuples of a certain form exist ▪ X (> Y means that if two tuples in R agree on X, we can swap Y values of the tuples and the two new tuples should still exist in R. ▪ Complementation rule: Given X (> Y, if Z is all attributes in R except (X, Y), then X (> Z ▪ MVD as a generalization of FD ❖ If X ( Y, then X (> Y

Fourth Normal Form (4NF)

▪ Definition: R is in 4NF iff for every non-trivial MVD X (> Y, X contains a key ▪ Since every FD is a MVD, 4NF implies BCNF ▪ Decomposition algorithm for 4NF For any R in the schema If non-trivial X (> Y holds on R, and if X does not have a key Decompose R into R1(X, Y) and R2(X, Z) // X is common attributes where Z is all attributes in R except X Repeat until no more decomposition

Summary

▪ 4NF ( BCNF ( 3NF ❖ 4NF ➢ Remove redundancies from MVD, FD ➢ Not dependency preserving ❖ BCNF ➢ No redundancies from FD ➢ Not dependency preserving ❖ 3NF ➢ May have some edundancies ➢ Dependency preserving. ▪ BCNF may not lead to a unique decomposition when there the dependency graph cannot be represented using a tree structure

Transactions and concurrency control

▪ Transaction – Sequence of SQL statements that is considered as a unit ▪ Example: ❖ Transfer $1M from Susan to Jane ➢ S1: UPDATE Account SET balance = balance – 1,000,000 WHERE owner = ‘Susan’ ➢ S2: UPDATE Account SET balance = balance + 1,000,000 WHERE owner = ‘Jane’ ❖ Increase Tony’s salary by $100 and by 40% ➢ S1: UPDATE Employee SET salary = salary + 100 WHERE name = ‘Tony’ ➢ S2: UPDATE Employee SET salary = salary * 1.4 WHERE name = ‘Tony ▪ Transactions and ACID property ❖ ACID property ➢ Atomicity: “ALL-OR-NOTHING” o Either ALL OR NONE of the operations in a transaction is executed. o If the system crashes in the middle of a transaction, all changes by the transaction are "undone" during recovery. ➢ Consistency: If the database is in a consistent state before a transaction, the database is in a consistent state after the transaction ➢ Isolation: Even if multiple transactions are executed concurrently, the result is the same as executing them in some sequential order o Each transaction is unaware of (is isolated from) other transaction running concurrently in the system ➢ Durability o If a transaction committed, all its changes remain permanently even after system crash ❖ With AUTOCOMMIT mode OFF ➢ Transaction implicitly begins when any data in DB is read or written ➢ All subsequent read/write is considered to be part of the same transaction ➢ A transaction finishes when COMMIT or ROLLBACK statement is executed o COMMIT: All changes made by the transaction is stored permanently o ROLLBACK: Undo all changes made by the transaction ❖ With AUTOCOMMIT mode ON ➢ Every SQL statement becomes one transaction is committed ▪ Serializable schedule ❖ Example in handout ➢ Schedule A o T1 Read(A); A ( A + 100; Write(A); Read(B); B ( B + 100; Write(B); o T2 Read(A); A ( A x 2; Write(A); Read(B); B ( B x 2; Write(B); o Result = 250 vs. 250, database is still in a consistent state ➢ Schedule B (switch the order that the transactions are executed) o T2 Read(A); A ( A x 2; Write(A); Read(B); B ( B x 2; Write(B); o T1 Read(A); A ( A + 100; Write(A); Read(B); B ( B + 100; Write(B); o Result = 150 vs. 150, database is still in a consistent state ➢ It is the job of the application to make sure that the transactions gets to the database in the correct order ➢ Schedule C (inter-mingled statements) o T1 Read(A); A ( A + 100; Write(A); o T2 o Read(A); A ( A x 2; Write(A); o T1 Read(B); B ( B + 100; Write(B); o T2 Read(B); B ( B x 2; Write(B); o Result = 250 vs. 250, database is still in a consistent state ➢ Schedule D (inter-mingled statements) o T1 Read(A); A ( A + 100; Write(A); o T2 o Read(A); A ( A x 2; Write(A); Read(B); B ( B x 2; Write(B); o T1 Read(B); B ( B + 100; Write(B); o Result = 250 vs. 150, database is NOT in a consistent state ➢ Schedule E (inter-mingled statements) o T1 Read(A); A ( A + 100; Write(A); o T2 o Read(A); A ( A x 1; Write(A); Read(B); B ( B x 1; Write(B); o T1 Read(B); B ( B + 100; Write(B); o Result = 150 vs. 150, database is still in a consistent state ❖ Simplifying assumption ➢ The "validity" of a schedule may depend on the initial state and the particular actions that transactions take o It is difficult to consider all transaction semantics ➢ We want to identify "valid" schedules that give us the "consistent" state regardless of o the initial state o 2) transaction semantics ➢ We only look at database read and write operation and check whether a particular schedule is valid or not. o Read/write: input/output from/to database o The only operations that can screw up the database o Much simpler than analyzing the application semantics ❖ Notation ➢ Sa = r1(A) w1(A) r1(B) w1(B) r2(A) w2(A) r2(B) w2(B) o Subscript 1 means transaction 1 o r(A) means read A o w(A) means write to A ➢ Schedule A: Sa = r1(A) w1(A) r1(B) w1(B) r2(A) w2(A) r2(B) w2(B) o SERIAL SCHEDULE: all operations are performed without any interleaving ➢ Schedule C: Sc = r1(A) w1(A) r2(A) w2(A) r1(B) w1(B) r2(B) w2(B) o COMMENTS: Sc is good because Sc is "equivalent" to a serial schedule ➢ Schedule D: Sc = r1(A) w1(A) r2(A) w2(A) r2(B) w2(B) r1(B) w1(B) o Dependency in the schedule ▪ w1(A) and r2(A): T1 -> T2 ▪ w2(B) and r1(B): T2 -> T1 o Cycle. T1 should precede T2 and T2 should precede T1 o Cannot be rearranged into a serial schedule o Is not "equivalent" to any serial schedule ❖ Conflicting actions: A pair of actions that may give different results if swapped ❖ Conflict equivalence: S1 is conflict equivalent to S2 if S1 can be rearranged into S2 by a series of swaps of non-conflicting actions ❖ Conflict serializability: S1 is conflict serializable if it is conflict equivalent to some serial schedule ➢ A “good” schedule ❖ Precedence graph P(S) ➢ Nodes: transactions in S ➢ Edges: Ti ( Tj if o pi(A), qj(A) are actions in S o 2) pi(A) precedes qj(A) o 3) At least one of pi, qj is a write ➢ P(S) is acyclic ( S is conflict serializable ❖ Summary: ➢ Good schedule: conflict serializable schedule ➢ Conflict serializable <=> acyclic precedence graph ▪ Recoverable/cascadeless schedule ❖ Recoverable schedule: Schedule S is RECOVERABLE if Tj reads a data item written by Ti, the COMMIT operation of Ti appears before the COMMIT operation of Tj ❖ Cascadeless schedule: A single transaction abort leads to a series of transaction rollback

Transaction

▪ Sequence of SQL statements that is considered as a unit ❖ Motivation ➢ Crash recover ➢ Concurrency ▪ Transactions and ACID property ❖ ACID property ➢ Atomicity: “ALL-OR-NOTHING” o Either ALL OR NONE of the operations in a transaction is executed. o If the system crashes in the middle of a transaction, all changes by the transaction are "undone" during recovery. ➢ Consistency: If the database is in a consistent state before a transaction, the database is in a consistent state after the transaction ➢ Isolation: Even if multiple transactions are executed concurrently, the result is the same as executing them in some sequential order o Each transaction is unaware of (is isolated from) other transaction running concurrently in the system ➢ Durability o If a transaction committed, all its changes remain permanently even after system crash ❖ Main questions: ➢ What execution orders are "valid"? o We first need to understand what execution orders are okay ❖ Serializability, Recoverability, Cascading rollback ➢ How can we allow only "valid" execution order? o Concurrency control mechanism ▪ Serializable and conflict serializable schedules ❖ Simplifying assumption ➢ We only look at database read and write operation and check whether a particular schedule is valid or not. o Read/write: input/output from/to database o The only operations that can screw up the database o Much simpler than analyzing the application semantics ❖ Definition: All operations are performed without any interleaving ➢ Is r1(A) w1(A) r2(A) w2(A) r1(B) w1(B) r2(B) w2(B) a serializable schedule? o No, r1(B) w1(B) of transaction 1 went after r2(A) w2(A) of transaction 2, which makes transaction 1 and transaction 2 interleaving ❖ Dependencies in the schedule ➢ Example: r1(A) w1(A) r2(A) w2(A) r2(B) w2(B) r1(B) w1(B) o w1(A) and r2(A): T1 ( T2 w2(B) and r1(B): T2 ( T1 ❖ Cycle. T1 should precede T2 and T2 should precede T1 ❖ Cannot be rearranged into a serial schedule ❖ Is not "equivalent" to any serial schedule ➢ Some sequence of operations cause dependency ➢ A schedule is bad if we have a cycle in the dependency graph ➢ Without a cycle, the schedule is "equivalent" to a serial schedule ❖ Conflicting actions: A pair of actions that may give different results if swapped ❖ Conflict equivalence: S1 is conflict equivalent to S2 if S1 can be rearranged into S2 by a series of swaps of non-conflicting actions ❖ Conflict serializability: S1 is conflict serializable if it is conflict equivalent to some serial schedule ➢ A “good” schedule ❖ Precedence graph P(S) ➢ Nodes: transactions in S ➢ Edges: Ti ( Tj if o pi(A), qj(A) are actions in S o 2) pi(A) precedes qj(A) o 3) At least one of pi, qj is a write ➢ P(S) is acyclic ( S is conflict serializable ▪ Recoverable and cascadeless schedules ❖ Recoverable schedule: Schedule S is recoverable if Tj reads a data item written by Ti, the commit operation of Ti appears before the COMMIT operation of Tj ❖ Cascadeless schedule: A schedule S is cascadeless if Tj is a data item written by Ti the commit operation of Ti appears before Tj read ➢ Cascading rollback: T2 depends on data from T1, and if T1 is aborted, T2 is aborted ➢ Dirty reads – data is read from an uncommitted transaction ▪ Relationship between different schedules? ❖ Serial ( conflict serializable ❖ Serial ( recoverable ❖ Serial ( cascadeless ➢ Serial guarantees read/write/commit actions of one transaction are all grouped together, thus transactions are cascadeless ❖ Cascadeless ( recoverable ➢ The commit action is guaranteed to be before the read/write actions ❖ Example: w1(A) w1(B) w2(A) r2(B) c1 c2 ➢ Not serial ➢ Conflict serializable ➢ Recoverable ➢ Not cascadeless ❖ Example: w1(A) w1(B) w2(A) c1 r2(B) c2 ➢ Not serial ➢ Conflict serializable ➢ Recoverable ➢ Cascadeless

Two-phase locking

▪ Main objective: Achieve serializable and cascadeless schedule ❖ Why do we have cascading rollback? How can we avoid it? ➢ Dirty read ❖ Basic idea: ➢ Before T1 writes, T1 obtains a lock ➢ 2) T1 releases the lock only when T1 commits ➢ 3) No one else can access the tuple/object when T1 has the lock ❖ What should T2 do before read? ➢ Obtain a lock before a read. Release it after the read ▪ Potential locking protocol ❖ Rules ➢ Rule (1): Ti lock a tuple before any read/write ➢ Rule (2): If Ti holds the lock on A, Tj cannot access A (j != i) ➢ Rule (3): After write, release the lock at commit, after read, release the lock immediately ❖ Does it guarantee conflict-serializability? ➢ Example: o T1 T2 r(A) w(A) w(A) o Is it conflict serializable? ❖ No, because are dependencies between r1(A) and w2(A), and w2(A) and w1(A) o How can we avoid this problem? ❖ Keep the lock until the end of the transaction ▪ Rigorous Two Phase Locking Protocol ❖ Rules: ➢ Rule (1): Ti locks a tuple before any read/write ➢ Rule (2): If Ti holds the lock on A, Tj cannot access A (j != i) ➢ Rule (3): Release all locks at the commit ❖ Theorem: Rigorous 2PL ensures conflict-serializable and cascadeless schedule. ❖ Rigorous 2PL schedule: schedules that can be produced by rigorous 2PL schedule ▪ Two Phase Locking Protocol: Less strict locking protocol than rigorous 2PL ❖ Rules ➢ Rule (1): Ti lock a tuple before any read/write ➢ Rule (2): If Ti holds the lock on A, Tj cannot access A (j != i) ➢ Rule (3): Two stages: o growing stage: Ti may obtain locks, but may not release any lock o shrinking stage: Ti may release locks, but my not obtain any lock ❖ Theorem: 2PL ensures a serializable schedule ▪ Shared & exclusive lock ➢ Separate locks for read and write ❖ Shared lock: ➢ Lock for read ➢ Multiple transactions can obtain the same shared lock ❖ Exclusive lock ➢ Lock for write ➢ If Ti holds an exclusive lock for A, no other transaction can obtain a shared/exclusive lock on A ❖ r(A), r(A): allowed, w(A), r(A): disallowed ➢ Before read, Ti requests a shared lock ➢ Before write, Ti requests an exclusive lock ➢ The remainder is the same as 2PL or rigorous 2PL ❖ Compatibility matrix ➢ Shared Exclusive (trying to get lock) Shared Yes No Exclusive No No ➢ Rigorous 2PL with shared lock ( conflict serializable and cascadeless 2PL with shared lock ( conflict serializable ❖ One more problem: Phantom ➢ Tuples are inserted into a table during a transaction ➢ Does it follow rigorous 2PL? o Yes ➢ Why do we get this result? o T1 reads the "entire table" not just e3 o Before T1 reads e3, T1 should lock everything before e3 (ie, e1), so that "scanned part" of the table does not change ❖ T1 has to worry about "non-existing" tuple: PHANTOM PHENOMENON ➢ Solution: o When T1 reads tuples in table R, do not allow insertion into R by T2 o T2 may update existing tuples in R, as long as it obtains proper exclusive locks ❖ The problem is from insertion of NEW tuples that T1 cannot lock ➢ INSERT LOCK on table o Before insertion, Ti gets an exclusive insert lock for the table o (2) Before read, Ti gets a shared insert lock for the table ❖ Same compatibility matrix as before ➢ NOTE: Ti should still obtain shared/exclusive lock for every tuple it reads/writes

Transactions in SQL

▪ To be filled in…

Similar Documents

Free Essay

Networks

...Case: You are appointed as a technical expert to implement a network system for a small size maritime supplyrepresentative company with four users. The company provides supply services to Maritime shipping companies through a worldwide network of suppliers. Its owner is a maritime business expert who doesnot know much about the use of computer systems to support her business. Therefore, she has decidedto employ you as a consultant on a short term basis to set-up appropriate systems in a network. She hasheard about various technologies and the efficiency achieved by computer systems and would welcomeadvice on the acquisition of hardware, software and network items to augment her existing systems inorder to meet the company’s growing needs. The company has a budget of £100,000 for this project. The company currently consists of the following departments (all located in the same open space office): The sales Manager who is responsible for dealing with Maritime companies. She is assisted by asales assistant, equipped with a laptop but with no ability to access the web. This department iscurrently the only one with a connection to the Internet and with access to the company’s commonemail.  The General Manager who is responsible for the general operation of the company. She tradeswith suppliers all over the world in order to ensure the best prices of goods for the company’sMaritime shipping clients. For client communication, she uses plain telephone services and a faxmachine....

Words: 545 - Pages: 3

Premium Essay

Network Infrastructure

... * How much growth is this network going to have to support? When planning for this, you want to make sure that the company is going to have room to grow, which may vary depending on the company. For example, Target is probably going to be a faster growing network than a local mom/pop shop. * Availability * How long your network is available to users. Basically: is your network and up and running all day, every day? * Network Performance * This includes categories that measure the throughput of data and how efficient your network actually is. (Optimum Utilization) * Security * Security design is one of the most important aspects of a network. Without proper security your network is vulnerable to online cyber attacks that can cripple and steal from your databases. * Manageability * This technical goal is going to vary based on company needs. Some customers are going to have more precise goals. The book talks about a company planning to record the number of bytes sent and received to each router. Other clients may have less specific goals than this, it just tends to vary based on company objectives. * Usability * Close to manageability, but different. Usability refers to people who are accessing and using the network you have setup. Your network needs to be easy to use for them (different from management. Easier To Use =/= Easier To Manage) * Adaptability * Design the network so that in can accept new technologies...

Words: 381 - Pages: 2

Premium Essay

Network

...Assignment 2: Network Topology Design You are the network manager of a company that has grown from 10 employees to 100 employees in 12 months. Year 2 projected growth is estimated to be 100 additional employees located at a remote location. The aggressive growth has brought about some unique challenges and opportunities. The company has one remote warehouse and no off-site disaster recovery services or servers. The network design remains a non-redundant, flat topology. Your assignment must consider the three-layer hierarchical model. You are free to make supported assumptions of the applications and services that this organization uses. Write a one (1) page paper in which you: 1. Depict a network topology graphical model of the initial environment of 10 employees using Visio or its open source alternative software. Note: The graphically depicted solution is not included in the required page length. 2. Depict a network topology graphical model of the current 100 employees using Visio or its open source alternative software. Note: The graphically depicted solution is not included in the required page length. 3. Depict a network topology graphical model for future growth to 200 employees using Visio or its open source alternative software. Note: The graphically depicted solution is not included in the required page length. 4. Create a two-paragraph executive summary. Your assignment must follow these formatting requirements: Be typed, double spaced, using Times New...

Words: 378 - Pages: 2

Premium Essay

Network

...IT140-1302A-05: Introduction to Operating Systems and Client/Server Environments Group Assignment Carroll Backus, Sonia Crumbley, Willie Coffie, Jason Duggan, Christopher West 13 May 2013 Instructor: Dr. Betty Tipton Colorado Technical University Table of Contents Technology Analysis and Assessment Plan 3 Technology Analysis and Assessment Improvement Plan 6 Operating System Platform and Cost Containment 6 Architecture Assessment and Governance 9 Enterprise Authentication 11 Directory Services and Domain Consolidation 13 System Administration 15 Operating Systems 17 Email System 19 Maintenance 21 Network Security 23 Summary 25 References 26 Technology Analysis and Assessment Plan Listed below is a simple diagram of the hardware layout in Acme Gym Inc., a small local fitness company that serves the community from a single location. Following the diagram is a detailed description of the current technology available on-site and an assessment of its weaknesses. There are currently four workstation computers located across several office locations. All four workstations currently contain essentially the same hardware and software consisting of: * Microsoft Windows XP operating system * 2 GHz CPU * 2 GB RAM * 120 GB Hard drive * DVD burner drive * Built-in USB and Ethernet ports The server on-site is currently running Microsoft Windows Server 2000 operating system. It contains the following hardware: * 2 each removable 250...

Words: 5202 - Pages: 21

Premium Essay

Network

...Networks, Telecommunications, and Wireless Computing | | | Telecommunication systems enable the transmission of data over public or private networks. A network is a communications, data exchange, and resource-sharing system created by linking two or more computers and establishing standards, or protocols, so that they can work together. Telecommunication systems and networks are traditionally complicated and historically ineffi cient. However, businesses can benefi t from today’s modern network infrastructures that provide reliable global reach to employees and customers. Businesses around the world are moving to network infrastructure solutions that allow greater choice in how they go to market—solutions with global reach. These alternatives include wireless, voice-over internet protocol (VoIP), and radio-frequency identification (RFID). | | | | | Knowledge Areas | Business Dilemma | | | Business Dilemma Personal sensing devices are becoming more commonplace in everyday life. Unfortunately, radio transmissions from these devices can create unexpected privacy concerns if not carefully designed. We demonstrate these issues with a widely-available commercial product, the Nike+iPod Sport Kit, which contains a sensor that users put in one of their shoes and a receiver that users attach to their iPod Nanos. Students and researchers from the University of Washington found out that the transmitter in a sneaker can be read up to 60 feet away. Through the use of a prototype...

Words: 2881 - Pages: 12

Premium Essay

Network Design

...Microsoft account Joseph Jackson  Westwood College Designing a Network Microsoft account Joseph Jackson  Westwood College Designing a Network Determining the networking requirements the designing of a network can be a difficult situation. Whether its data transfer rules that determine the number of channels needed and the priorities to be used. An alternate real issue is the most extreme size of data that can be sent and received leads to the need for segmentation at the sending end and reassembly at the receiving end. Networking design must reflect the objectives, attributes, and approaches of the associations in which they work. A decently planned network can help adjust these targets. At the point when legitimately executed, the network base can improve application accessibility and permit the savvy utilization of existing network assets. The primary step is to comprehend your networking necessities. (Cisco Systems, Inc.) There are two essential objectives when setting up a networking design and having the capacity to execute the design into a live environment. The principal objective is to have application accessibility. The system conveys application information between machines. On the off chance that the applications are not accessible to system clients, the system is not doing its occupying. Which can make trouble managing getting to applications over the system. The second of the essential objectives is the Cost of possession. The Information system (IS) plans...

Words: 874 - Pages: 4

Premium Essay

Network

...Home » Resources » Networking Tutorials » Network Switching Tutorial Network Switching Tutorial Network Switching Switches can be a valuable asset to networking. Overall, they can increase the capacity and speed of your network. However, switching should not be seen as a cure-all for network issues. Before incorporating network switching, you must first ask yourself two important questions: First, how can you tell if your network will benefit from switching? Second, how do you add switches to your network design to provide the most benefit? This tutorial is written to answer these questions. Along the way, we’ll describe how switches work, and how they can both harm and benefit your networking strategy. We’ll also discuss different network types, so you can profile your network and gauge the potential benefit of network switching for your environment. What is a Switch? Switches occupy the same place in the network as hubs. Unlike hubs, switches examine each packet and process it accordingly rather than simply repeating the signal to all ports. Switches map the Ethernet addresses of the nodes residing on each network segment and then allow only the necessary traffic to pass through the switch. When a packet is received by the switch, the switch examines the destination and source hardware addresses and compares them to a table of network segments and addresses. If the segments are the same, the packet is dropped or “filtered”; if the segments are different...

Words: 3115 - Pages: 13

Premium Essay

Networks

...Chapter 1 Analyzing Business Goals and Constraints This chapter serves as an introduction to the rest of the book by describing top-down network design. The first section explains how to use a systematic, top-down process when designing computer networks for your customers. Depending on your job, your customers might consist of other departments within your company, those to whom you are trying to sell products, or clients of your consulting business. After describing the methodology, this chapter focuses on the first step in top-down network design: analyzing your customer’s business goals. Business goals include the capability to run network applications to meet corporate business objectives, and the need to work within business constraints, such as budgets, limited networking personnel, and tight timeframes. This chapter also covers an important business constraint that some people call the eighth layer of the Open System Interconnection (OSI) reference model: workplace politics. To ensure the success of your network design project, you should gain an understanding of any corporate politics and policies at your customer’s site that could affect your project. The chapter concludes with a checklist to help you determine if you have addressed the business issues in a network design project. Using a Top-Down Network Design Methodology According to Albert Einstein: 000200010270745975 “The world we’ve made as a result of the level of thinking we have done...

Words: 8812 - Pages: 36

Premium Essay

Network

...Computer network From Wikipedia, the free encyclopedia "Computer networks" redirects here. For the periodical, see Computer Networks (journal). "Datacom" redirects here. For other uses, see Datacom (disambiguation). Network science Theory · History Graph · Complex network · Contagion Small-world · Scale-free · Community structure · Percolation · Evolution · Controllability · Topology · Graph drawing · Social capital · Link analysis · Optimization Reciprocity · Closure · Homophily Transitivity · Preferential attachment Balance · Network effect · Influence Types of Networks Information · Telecommunication Social · Biological · Neural · Semantic Random · Dependency · Flow Graphs Vertex · Edge · Component Directed · Multigraph · Bipartite Weighted · Hypergraph · Random Cycle · Loop · Path Neighborhood · Clique · Complete · Cut Data structure · Adjacency list & matrix Incidence list & matrix Metrics and Algorithms Centrality · Degree · Betweenness Closeness · PageRank · Motif Clustering · Degree distribution · Assortativity · Distance · Modularity Models Random · Erdős–Rényi Barabási–Albert · Watts–Strogatz ERGM · Epidemic · Hierarchical Browse Topics · Software · Network scientists Graph theory · Network theory v t e A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources...

Words: 7339 - Pages: 30

Free Essay

Networks

...The Wealth of Networks The Wealth of Networks How Social Production Transforms Markets and Freedom Yochai Benkler Yale University Press New Haven and London Copyright _ 2006 by Yochai Benkler. All rights reserved. Subject to the exception immediately following, this book may not be reproduced, in whole or in part, including illustrations, in any form (beyond that copying permitted by Sections 107 and 108 of the U.S. Copyright Law and except by reviewers for the public press), without written permission from the publishers. The author has made an online version of the book available under a Creative Commons Noncommercial Sharealike license; it can be accessed through the author’s website at http://www.benkler.org. Printed in the United States of America. Library of Congress Cataloging-in-Publication Data Benkler, Yochai. The wealth of networks : how social production transforms markets and freedom / Yochai Benkler. p. cm. Includes bibliographical references and index. ISBN-13: 978-0-300-11056-2 (alk. paper) ISBN-10: 0-300-11056-1 (alk. paper) 1. Information society. 2. Information networks. 3. Computer networks—Social aspects. 4. Computer networks—Economic aspects. I. Title. HM851.B457 2006 303.48'33—dc22 2005028316 A catalogue record for this book is available from the British Library. The paper in this book meets the guidelines for permanence and durability of the Committee on Production Guidelines for Book Longevity of the Council on Library Resources. 10 9 8 7 6 5 4 3 2 1...

Words: 214717 - Pages: 859

Premium Essay

Network

...2.1.1 Network History The history of computer networking is complex. It has involved many people from all over the world over the past 35 years. Presented here is a simplified view of how the Internet evolved. The processes of invention and commercialization are far more complicated, but it is helpful to look at the fundamental development. In the 1940s computers were large electromechanical devices that were prone to failure. In 1947 the invention of a semiconductor transistor opened up many possibilities for making smaller, more reliable computers. In the 1950s mainframe computers, which were run by punched card programs, began to be used by large institutions. In the late 1950s the integrated circuit that combined several, then many, and now millions, of transistors on one small piece of semiconductor was invented. Through the 1960s mainframes with terminals were commonplace, and integrated circuits were widely used. In the late 1960s and 1970s, smaller computers, called minicomputers came into existence. However, these minicomputers were still very large by modern standards. In 1977 the Apple Computer Company introduced the microcomputer, also known as the personal computer. In 1981 IBM introduced its first personal computer. The user-friendly Mac, the open-architecture IBM PC, and the further micro-miniaturization of integrated circuits led to widespread use of personal computers in homes and businesses. In the mid-1980s users with stand-alone computers...

Words: 2656 - Pages: 11

Premium Essay

Network

...Network Design Following the acquisition of new premises comprising a two-story office in Adeplhi, Maryland this provides UMUC with the ability to revise and improve their network topology accordingly and ensure that not only is connectivity provided in a consistent fashion but also to provide the required security for information accordingly. One of the fundamental requirements is to ensure that data is segregated in terms of staff and students so this will require the creation of dedicated subnets accordingly to follow through and implement the solution, while there is also a requirement to provide wireless connectivity for students in the lobby area. Given that there is a specific opportunity to develop a comprehensive infrastructure it is important that the fundamental basis in terms of cabling is of a sufficiently high quality to support current and future operational requirements. Due to the size of the building there would be limitations if using Cat 5 based Ethernet cables for example and so therefore there should be a requirement to utilize Cat 6 based Ethernet as this will support a maximum cable length in excess of 300 ft without there being any connectivity or performance issues (Mitchell, 2014). Each of the two floors will have a designated server room that is designed to provide a central point of connectivity for all locations on that floor, and each of the rooms on the first and second floor will require a certain number of data ports based on their expected utilization...

Words: 1451 - Pages: 6

Premium Essay

Network+

...XelPharm owns a large distribution warehouse approximately four miles away from the headquarters. Until now, its networks have relied entirely on wired connections. The company’s CIO (chief information officer) decided long ago that he would wait until wireless technology “settled down” before investing in it. 1. What can you tell him about the wireless standards that might convince him that now is the time to adopt wireless technology? Ans: Since 1997 after IEEE released its first wireless network standard, wireless network has evolved into several distinct standards. Most attracting thing about Wireless connection is the absence of wire. Addition to that, the newer technology of wireless network can provide maximum downlink throughput to120 Mbps and maximum uplink throughput to 60 Mbps (WiMax 2). This technology is being considered to be an alternative to DSL and T-carrier services for homes and businesses. It achieves much faster throughput than T-carriers at a lower cost for end users. This type of technology can transmit and receive signals up to 50 km, or approximately 30 miles, when antennas are fixed or up to 15 km, or approximately 10 miles, when they are mobile with QoS (quality of service) provisions. 2. Also, what can you tell him to convince him that wireless networking could improve the company’s productivity? Ans: Wireless networks are a powerful tool for boosting productivity and encouraging information sharing. With...

Words: 747 - Pages: 3

Premium Essay

Networks

...would be sharing only data files and accessing servers on the network. It is more flexible and less expensive if they use wireless a network than a wire network. However, for building number 3, I would recommend to use bound transmission media because people on this building would be sharing files that contain videos. As we know sharing videos require a lot of data bandwidth; therefore, bounded transmission media is the best transmission media that we can use for the network on this building. For building number 4, I would recommend wire transmission media too. As they mention on the book, in building four, 50 shipping and packing will be riding up and down every day. This building needs a lot of bandwidth because it will be transmitting a lot of data. What type of media would you recommend using to connect the buildings and why? I would recommend using a bounded connection to connect these buildings. Even though two of these building would be using wireless networks, some of the data that will be shared by these building require a lot of bandwidth. It’s better if we use a wire network to connect these buildings. Also, the distance between building four and the other buildings might cause problems if we used a wireless network. What kind of media should the company request from its ISP for connecting the corporate WAN to the Internet? Public IP Block, this block could be in the form of /29, /28, or /27 network; depending on which plan or subnet you choose to have. Moreover...

Words: 685 - Pages: 3

Free Essay

Network

...Analysis and Review Questions 1. Compare the currents obtained from calculation and simulation. Comment on the findings of the values. | Calculation | Simulation using Multisim | Simulation using Pspice | Current when RL = 50 ohms | 2.994 < 69.91 A | 2.994 A | 4.273 A | Current when RL = 200 ohms | 2.306 < 47.92 A | 2.306 A | 3.277 A | Table above show the results of current obtained from the experiment and simulation. There is a different result between simulation using pspice and simulation using multisim and calculation.From calculation, the value of current used in the calculation and multisim is rms current while value of current used in pspice simulation is peak current.The value of rms current if converted to peak current have to multiply by 2 . Current when RL = 50Ω from calculation if multiply by 2 will get 4.234 A which is almost the same with Pspice simulation. Same goes when RL = 200, from calculation 2.306 x 2 = 3.261 A, which give the value almost the same with current from Pspice simulation. In calculation method, the value of current through RL is obtained using the Norton’s theorem. Each RL is calculated using the equivalent Norton’s circuit. Norton theorem is used to simplify the circuit to make the calculation easier. Below show the equivalent circuit using Norton theorem to obtain the current through RL. Norton equivalent circuit Based on the table above, the results through simulation and calculation are similar which proves...

Words: 927 - Pages: 4