Answered Questions

  • Default Constraint

    What is default constraint? How we you apply it?

    gdurga

    • Jun 15th, 2009

    A coulumn can be given a default value by using DEFAULT option. This option prevents null values from entering the column if a row is inserted with out a value in to the table.Ex: .......Hire_date DATE DEFAULT SYSDATE,.......

  • Data Structure for one million named objects

    If you have one million named objects and you want to store them in a data structure that lets you insert new objects quickly and search for an object by name quickly, what data structure should you use?

    Star Read Best Answer

    Editorial / Best Answer

    hrshksh  

    • Member Since May-2010 | May 9th, 2010


    It depends on the amount of primary memory one has for the process. If we can store 1 million records in primary memory, then we can very well take a hash table with a consistent hashing scheme for avoiding collisions. It will take O(1). 


    In most cases however this is not possible. In circumtances like this, there are two ways:
    B Trees or Extensible Hashing both of them have interesting time complexities.


    ptmich

    • May 28th, 2012

    You can use a hash table or an array of objects You can use an array of objects because you already know that you need to store a specified number of objects, also you can store and access objects qu...

    hrshksh

    • May 9th, 2010

    It depends on the amount of primary memory one has for the process. If we can store 1 million records in primary memory, then we can very well take a hash table with a consistent hashing scheme for av...

  • Modular Structered and OOPS

    Compare Modular Structered Programming and Object Oriented Programming

    mucdull

    • Nov 15th, 2008

    Modular programming promotes the separation of a program into components called modules. Interfaces act as the logical boundaries between modules which express elements that are provided and...

    veerun14

    • Sep 25th, 2008

    In Modular programming everything is broken down into modules performing a constituent task. Object Oriented programming revolves around a real world object. A Car Object is different from a driver Ob...