.NET Enumerable Interfaces

IEnumerable
- support the use of foreach

IQueryable : IEnumerable
- support LINQ operations

IEnumerable<out T> : IEnumerable
- IEnumerable for generics

ICollection<T> : IEnumerable<T>, IEnumerable
- defines methods to manipulate generic collections

IQueryable<out T> : IEnumerable<T>, IQueryable, IEnumerable
- support LINQ operations for generics

IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable
- can be individually accessed by index

Note: ICollection belongs to System.Collections while ICollection<T> belongs to System.Collections.Generic

Posted in .Net | Tagged , | Leave a comment

Important Terms in Database

Clustered Index

  • A type of index where the table records are physically re-ordered to match the index
  • Each table can only have one clustered index
  • Can be a composite index

Non-clustered Index

  • A type of index that has list of pointers to the physical rows
  • Each table can have many non-clustered index
  • Slower than clustered index
Posted in Uncategorized | Tagged , | Leave a comment

Important Terms in Programming

Immutable

Objects are said to be immutable when their state cannot be modified after they are created. E.g. strings, numbers

Jagged Array

Array of arrays. Ex in C#:

int[][] jaggedArray = new int[3][];
Posted in Uncategorized | Tagged | Leave a comment

Understanding Joins in SQL

Complete Syntax Common Usage
FULL INNER JOIN INNER JOIN or simply JOIN
FULL OUTER JOIN FULL JOIN
LEFT OUTER JOIN LEFT JOIN
RIGHT OUTER JOIN RIGHT JOIN
CROSS JOIN CROSS JOIN

RIGHT INNER JOIN and LEFT INNER JOIN are non-existent syntax because results are the same as in INNER JOIN.

Posted in Uncategorized | Tagged , | Leave a comment