Thursday, February 17, 2011

Oracle file extension

-Oracle ın disk block boyutları sisteminki ile aynı veya kolay bölünebilir olmalı asla sistem bloklarının boyutundan küçük olmamalı

-Oracle data dosyalarının uzantısı .dbf data base file

-Archive log files has extension .log .arc .arch

Oracle Buffer cache state

Free blocks

Pinned bloklar şu anda erişilen bloklar

Dirty bloklar değiştirilmiş olanlar

Dirty bloklar database kapatma komutu ile her 3 saniyede bir checkpoint oluşturulduğunda diske yazılır

Parsing Oracle Queries

Oracle a bir query gittiği zaman sırayla

-Query nin imlasının (syntax) doğru olup olmadığı kontrol edilir

-Kullandığımız objeler kontrol edilir

-Yetkileriniz kontrol edilir

-Query database diline çevrilir(byte code p-code

-Oracle en optimum işletme planını yolunu çıkarır

BI

DSS decision support system.

OLAP Online Analytical Procesing 

OLTP Online Transactional Processing

System  Global Area  Bir oracle instanceının ramde kullandığı ortak alan

Shared Pool  bu alandaki objeler sık kullanıldıkları için diske yazılmazlar

-Library Cache

-Dictionary Cache

-Quickest result Cache

-Sql result Cache

bunlar daha önceden hesaplanmış değerleri içerir birdaha birdaha hesaplanmaz.

Grid computing vs cluster computing

Grid computing farklı domainlerdeki bilgisayarların ki çoğunlukla homojen bir dağılım söz konusu değildir ortak bir hedef için birleşik çalışmaları cluster computing ise tek süper güçlü bir bilgisayar yerine birçok bilgisayarın tek bir bilgisayar gibi çalışması.Oracle

Oracle 11 g- G deki G nedir

Oracle 1990 larda internetin popülerleşmesi ile oracle 8i yi çıkardı I nin buradaki anlamı internetti.Şu sıralar popüler olan grid computing in g side oracle 11g ye ismini vermiştir

Saturday, December 18, 2010

Chain of responsibility

 
http://nchain.sourceforge.net/
class CheckAuthority {
 
    public static void main(String[] args) {
        ManagerPPower manager = new ManagerPPower();
        DirectorPPower director = new DirectorPPower();
        VicePresidentPPower vp = new VicePresidentPPower();
        PresidentPPower president = new PresidentPPower();
        manager.setSuccessor(director);
        director.setSuccessor(vp);
        vp.setSuccessor(president);
 
        //enter ctrl+c to kill.
        try{
            while (true) {
                System.out.println("Enter the amount to check who should approve your expenditure.");
                System.out.print(">");
                double d = Double.parseDouble(new BufferedReader(new InputStreamReader(System.in)).readLine());
                manager.processRequest(new PurchaseRequest(0, d, "General"));
           }
        }
        catch(Exception e){
            System.exit(1);
        }  
    }
 
}

Generator

In short, a generator <I>looks like</I> a function but <I>behaves like</I> an iterator.
 
public static IEnumerable<int> GetEven(IEnumerable<int> numbers)
{
    foreach (int i in numbers)
    {
        if ((i % 2) == 0)
        {
            yield return i;
        }
    }
}

Lazy evaluation

The benefits of lazy evaluation include: performance increases due to avoiding unnecessary calculations, avoiding error conditions in the evaluation of compound expressions, the capability of constructing potentially infinite data structures, and the capability of defining control structures as abstractions instead of as primitives.

In computer windowing systems, the painting of information to the screen is driven by "expose events" which drive the display code at the last possible moment. By doing this, they avoid the computation of unnecessary display content

The opposite of lazy actions is eager evaluation, sometimes known as <I>strict evaluation</I>. Eager evaluation is the evaluation behavior used in most programming languages.

Lazy evaluation refers to how expressions are evaluated when they are passed as arguments to functions and entails the following three points:

Private class data pattern

 public class Circle
 {
   private double radius;
   private Color color;
   private Point origin;
   public Circle(double radius, Color color, Point origin)
   {
     this.radius = radius;
     this.color = color;
     this.origin = origin;
   }
   public double Circumference
   {
     get { return 2 * Math.PI * this.radius; }
   }
   public double Diameter
   {
     get { return 2 * this.radius; }
   }
   public void Draw(Graphics graphics)
   {
     //...
   }
 }