1 / 18

PINQ vs LINQ

Table of Contents. Differences(LINQ)Differences(PINQ)ComparisonsLINQ ProgramLINQ OutputPINQ ProgramPINQ OutputReferences. Differences(LINQ). LINQ introduces .NET objects which wrap data-parallel sources, with SQL-style methods such as Select, Where, GroupBy, and Join.These methods return ne

bridgit
Download Presentation

PINQ vs LINQ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. PINQ vs LINQ Alex Mack

    2. Table of Contents Differences(LINQ) Differences(PINQ) Comparisons LINQ Program LINQ Output PINQ Program PINQ Output References

    3. Differences(LINQ) LINQ introduces .NET objects which wrap data-parallel sources, with SQL-style methods such as Select, Where, GroupBy, and Join. These methods return new objects wrapping sources that reflect the operations, but without invoking computation until the source is either enumerated or aggregated.

    4. Differences(LINQ) (cont) LINQ providers choose the best execution plan when given an entire query, and they have the option to transport the execution to a remote computer such as a DryadLINQ cluster. DryadLINQ - a simple, powerful, and elegant programming environment for writing large-scale data parallel applications running on large PC clusters

    5. Differences(LINQ) (cont) DryadLINQ combines the Dryad distributed execution engine and LINQ. LINQ can be implemented with SQL and XML Methods as arguments in LINQ, such as the predicates in Where, functions in Select, and key selectors in GroupBy and Join are represented as expression trees.

    6. Differences(PINQ) PINQ provides .NET objects which wrap data sources and supporting declarative transformations and aggregations, to support the analysis of sensitive data without needing to provide the data itself to the analyst.

    7. Differences(PINQ) (cont) PINQ can take over and conduct the analysis, and return aggregate results that have privacy applied to them. The language restrictions and careful implementations of aggregations result in computations that provide the guarantee of Differential Privacy

    8. Differences(PINQ) (cont) Differential Privacy - ensures that the system behaves the same way, independent of whether any individual, or small group of individuals, opts into or opts out of the database The PINQ data type PINQAgent is responsible for accepting or rejecting increments to epsilon.

    9. Differences(PINQ) (cont) PINQAgent interface has the method Alert(epsilon), which is invoked before executing any differentially-private aggregation with the appropriate vale of epsilon, to confirm access.

    10. Comparisons LINQ and PINQ are based on C# programming PINQ wraps LINQ data sources with a specified differential privacy allotment for each analyst. LINQ is centered around IQueryable<T>, which is a generic sequence of records of type T. IQueryable<T> admits methods such as Where, GroupBy, Union, Join, and more, which returns new IQueryable objects over new types.

    11. Comparisons (cont) PINQ’s implementation centers on PINQueryable<T>, which supports the same methods as IQueryable. PINQueryable guards the data, and does not respond to queries unless it can confirm that their privacy properties are within the bounds set up by the provider of the data set

    12. Comparisons (cont) PINQ’s Join method invokes LINQ’s GroupBy method on each input, using their key selection functions. Groups with more than one element are discarded and the rest of the elements are joined using LINQ’s Join method.

    13. LINQ Program using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { public class Student { public string First { get; set; } public string Last { get; set; } public int ID { get; set; } public List<int> Scores; } static List<Student> students = new List<Student> { new Student {First="Svetlana", Last="Omelchenko", ID=111, Scores= new List<int> {97, 92, 81, 60}}, new Student {First="Claire", Last="O’Donnell", ID=112, Scores= new List<int> {75, 84, 91, 39}}, new Student {First="Sven", Last="Mortensen", ID=113, Scores= new List<int> {88, 94, 65, 91}}, new Student {First="Cesar", Last="Garcia", ID=114, Scores= new List<int> {97, 89, 85, 82}}, new Student {First="Debra", Last="Garcia", ID=115, Scores= new List<int> {35, 72, 91, 70}}, new Student {First="Fadi", Last="Fakhouri", ID=116, Scores= new List<int> {99, 86, 90, 94}}, new Student {First="Hanying", Last="Feng", ID=117, Scores= new List<int> {93, 92, 80, 87}}, new Student {First="Hugo", Last="Garcia", ID=118, Scores= new List<int> {92, 90, 83, 78}}, new Student {First="Lance", Last="Tucker", ID=119, Scores= new List<int> {68, 79, 88, 92}}, new Student {First="Terry", Last="Adams", ID=120, Scores= new List<int> {99, 82, 81, 79}}, new Student {First="Eugene", Last="Zabokritski", ID=121, Scores= new List<int> {96, 85, 91, 60}}, new Student {First="Michael", Last="Tucker", ID=122, Scores= new List<int> {94, 92, 91, 91} } };

    14. LINQ Program (cont) static void Main(string[] args) { var studentQuery = from student in students where student.Scores[0] > 90 select student; // Execute the query. foreach (Student student in studentQuery) { Console.WriteLine("{0}, {1}", student.Last, student.First); } } } }

    15. LINQ Output Omelchenko, Svetlana Garcia, Cesar Fakhouri, Fadi Feng, Hanying Garcia, Hugo Adams, Terry Zabokritski, Eugene Tucker, Michael

    16. PINQ Program

    17. PINQ Output

    18. References http://research.microsoft.com/en-us/projects/pinq/tutorial.aspx http://research.microsoft.com/en-us/projects/dryadlinq/ http://research.microsoft.com/en-us/projects/databaseprivacy/ http://research.microsoft.com/pubs/138390/pinq-CACM.pdf http://research.microsoft.com/pubs/80218/sigmod115-mcsherry.pdf http://msdn.microsoft.com/en-us/library/bb397900.aspx

More Related