Tutor profile: Nitesh G.
Subject: PHP Programming
What is the difference between GET and POST?
GET displays the submitted data as part of the URL, during POST this information is not shown as it’s encoded in the request. GET can handle a maximum of 2048 characters, POST has no such restrictions. GET allows only ASCII data, POST has no restrictions, binary data are also allowed. Normally GET is used to retrieve data while POST to insert and update.
Subject: Java Programming
If one needs a Set, how do you choose between HashSet vs. TreeSet?
HashSet is superior in almost every way: O(1) add, remove and contains, vs. O(log(N)) for TreeSet. However, TreeSet is indispensable when you wish to maintain order over the inserted elements or query for a range of elements within the set. Consider a Set of timestamped Event objects. They could be stored in a HashSet, with equals and hashCode based on that timestamp. This is efficient storage and permits looking up events by a specific timestamp, but how would you get all events that happened on any given day? That would require an O(n) traversal of the HashSet, but it’s only an O(log(n)) operation with TreeSet using the tailSet method
What is NoSQL? How is it different from SQL?
NoSQL is nonrelational database management system which provides storage and retrieval of data that is modeled in ways other than tabular relations. As the definition suggests, NoSQL stores in document-based format but SQL stores and retrieve data in tabular format. SQL has predefined schema whereas NoSQL has a dynamic schema.
needs and Nitesh will reply soon.