www.bigoo.wswww.bigoo.wswww.bigoo.wswww.bigoo.wswww.bigoo.wswww.bigoo.wswww.bigoo.ws

TECHO GALAXI INVITES YOU ALL

OBJECTIVES :
*INTERESTING TOPICS
*INFORMATIVE IDEAS
NOW LOOK THE CONTENTS AND CHOOSE
THE TOPIC BELOW


Professionals connect here

LABELS


Powered By:Blogger Widgets

Sunday, May 31, 2009

QUIZ-4

1. Give the synonym: ABYSMAL

Sol: deep

2. Find the least number which when divided by 35,leaves remainder 25,when divided by45,leaves remainder 35 and when divided by 55,leaves remainder 45?

Sol: 3455

Hint: l.c.m of(35,45,55) minus 10

l.c.m is 3465.Hence the answer is 3455.

3. What is the remainder left after dividing 1!+2!+3!+...+100! By 7?

Sol: 5

Hint: 7! Onwards all terms are divisible by 7 as 7 is one of the factor. So there is no remainder left for those terms. i.e. remainder left after dividing 7!+8!+9!+..+100! Is 0.The only part to be consider is=1!+..+6!=873;

The remainder left after dividing 873 by 7 is 5.Hence the remainder is 5.

4. Two identical pack of cards A and B are shuffled thoroughly.

One card is picked from A and shuffled with B. The top card from pack A is turned up. If this is the Queen of hearts, what are the chances that the top card in B will be the King of hearts?

Sol: 52/2703

Hint: There are two cases to be considered.

Case1: King of hearts is drawn from pack A and shuffled with pack B.

Probability of drawing king of hearts from pack A=1/51(as queen of hearts is not to be drawn. Probability of having King of hearts on the top of the pack B=2/53

So, total probability of case 1=(1/51)*(2/53)=2/(51*53)

Case 2: King of hearts is not drawn from pack A

Probability of not drawing king of hearts from pack A=50/51(as queen of hearts is not to be

drawn).Probability of having king of hearts on the top of the pack B=1/53

So total probability, the required probability is=2/(51*53)+50/(51*53)

=52/2703

5. When do you get a .PLL extension?

Sol: save the library file.

Saturday, May 30, 2009

QUIZ-3

1. What is Ann's relation with her husband's mother's only daughter-in-law's sister's husband?

Sol: brother-in-law

Hint: Let Ann be x. x->husband’s mother->mother-in-law if x

Her only daughter-in-law becomes x

X sister’s husband ->brother-in-law.

2. The ratio of Boys to Girls is6:4.60% of the boys and 40% of the girls take lunch in the canteen. What % of class takes lunch in canteen?

Sol: 52%

Hint: Assume there are 6x boys and 4x girls.

Total students taking lunch in canteen=6x(60/100)+4x(40/100)

=36(x/10) + 16(x/10)=52(x/10)

Total students are =6x+4x=10x

% of class taking lunch in canteen= ((52/10)*100)/10x=52%

3. Consider a number 235, where last digit is the sum of first

two digits. How many such 3-digit numbers are there?

Sol:45

Hint: The last digit cannot be 0.If the last digit is 1,there is only one number If the digit is 2,there are 2 numbers in this. 1+2+3+4+5+6+7+8+9=45.

4. Product of three consecutives numbers is 210.What is the sum of two least numbers?

Sol: 11

Hint: 5,6,7;5+6=11;

5. A student divided a number by 2/3 when he required to multiply by 3/2.Calculate the percentage of error in his result?

Sol: 0%

Hint: divided by 2/3 and multiply by 3/2 is same.Therefore percentage of error is 0%.

Friday, May 29, 2009

QUIZ-2

1. Find the next no. in the series 1, 2 ,4 ,13 ,31 ,62 ,124 ,__

Sol: 253

Hint: This is series of 1,2,4,8,16,32,64,128 with the base 5.

2. Expand RISC

Sol: Reduced Instruction Set Computing.

3. At what time after 4.00p.m. is the minutes hand of a clock

exactly aligned with the hour hand?

Sol: 4:21:49.5

Hint: Assume that x minutes after 4.00pm minute hand exactly aligns with and hour hand.

For every minute, minute hand travels 6 degrees.

Hence, for x minutes it will travel 6*x degrees. For every minute, hour hand travels ½ degrees. Hence for x minutes it will travel x/2 degrees. At 4.00pm the angle between minute hand and hour hand is 120 degrees. Also, after x minutes, minute hand and hour hand are exactly aligned. So the angle with respect to 12 i.e. Vertical plane will be same. Therefore,

6*x=120+(x/2), 12*x=240+x,11*x=240,x=21.8182,x=21 minutes 49.5 minutes.

4. main ()

{

main ();

}

Sol: runtime error

Hint: stack overflow. main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate the function call, the call stack overflows at runtime. So it terminates the program and results in an error.

5. A class of 100 students.24 of them are girls and 32 are not. Which base is used here?

Sol: 6

Hint: Let the base be x. Therefore (x*x + x*0+0)=(2*x+4)+(3*x+2)

x * x=5*x+6 x *x-5*x+6=0;

(x-6)(x+1)=0;

therefore base is 6.

Thursday, May 28, 2009

QUIZ 1

1. Give the excess-3 code of 9?

Sol:1100

2. Find the nth number in the series is 1,-3,5,-7,_

Sol: (-1)*(2n-1)

3. Find the next number in the series 31,29,31,30,31,_

Sol: 30

Hint: jan, feb, mar, apr, may, jun…

4. In how many ways can 5 prizes be given away to 3 boys when each boy is eligible for one or more prizes?

Sol:5^3

5. slur : speech ::smudge

Sol: writing

Wednesday, May 27, 2009

NORMALISATION

Database Normalization

A series of steps followed to obtain a database design that allows for efficient access and storage of data in a relational database .These steps reduce data redundancy and the chances of data becoming inconsistent.

A table in a relational database is said to be in normal form if it satisfies certain constraints. Codd’s original work defined three such forms but there are now five generally accepted steps of normalization. The output of the first step is called First Normal Form (1NF); the output of the second step is Second Normal Form (2NF), etc.

First Normal Form eliminates repeating groups by putting each into a separate table and connecting them with a one-to-many relationship

Second Normal Form eliminates functional dependencies on a partial key by putting the fields in a separate table from those that are dependent on the whole key

Third Normal Form eliminates functional dependencies on non-key fields by putting them in a separate table. At this stage, all non-key fields are dependent on the key, the whole key and nothing but the key.

Fourth Normal Form separates independent multi-valued facts stored in one table into separate tables.

Fifth Normal Form breaks out data redundancy that is not covered by any of the previous normal forms.

Monday, May 25, 2009

keys-Day10

Keys :

Surrogate key

A unique primary key generated by the RDBMS that is not derived from any data in the database and whose only significance is to act as the primary key.

A surrogate key is frequently a sequential number but doesn't have to be. Having the key independent of all other columns insulates the database relationships from changes in data values or database design and guarantees uniqueness.

Some database designers use surrogate keys religiously regardless of the suitability of other candidate keys However, if a good key already exists, the addition of a surrogate key will merely slow down access, particularly if it is indexed.

Intelligent key

A relational database which depends wholely on one or more other columns in the same table. An intelligent key might be identified for implementation convenience, where there is no good candidate key

For example, if the three-letter initials of a group of people are known to be unique but only their full names are recorded, a three letter acronym for their names (e.g. John Doe Smith -> JDS) would be an intelligent key.

Intelligent keys are a Bad Thing because it is hard to guarantee uniqueness, and if the value on which an intelligent key depends changes then the key must either stay the same, creating an inconsistency within the containing table, or change, requiring changes to all other tables in which it appears as a foreign key The correct solution is to use a surrogate

Partial key

A key which identifies a subset of a set of information items and which could narrow the subset to one item if other partial key(s) were combined with it.

Compound key

(Or "multi-part key", "concatenated key") A key which consists of more than one attribute of the body of information (e.g. database "record ") it identifies.

Alternate key

A candidate key which is not selected as a primary key

Unique key

A key which identifies only one body of information out of several.

Primary key

The candidate key selected as being most important for identifying a body of information (an entity, object or record).

Candidate key

One of several possible attributes or combinations of attributes which can be used to uniquely identify a body of information (a "record ").

Super Key

A Set of attributes that uniquely identify a tuple in a relation is called a super key.

Secondary Keys

Keys other than the candidate keys are called the secondary keys.

Foreign Key

A key column in a table that identifies records in a different tbale is called foreign key.


Sunday, May 24, 2009

DB ADMIN-DAY9

Database Administrator

The database administrator is the person(s) in control of the DBMS. One goal of DBMS's is to permit centralized control.

Typical responsibilities of the database administrator:

· Scheme definition

· Storage structure and access method definition

· Scheme and physical organization modification

· Granting authorization for data access

· Integrity constraint specification

Database Users

People who interact with the DBMS:

· Application programmers

· Application programmers write application programs in some programming language (called the host language) which permits the use of DML commands

· Typical host languages: C, Cobol with special syntax to separate DML commands from host language commands

· A DML precompiler handles embedded DML commands before the program is compiled

· Application programs are used to ease common or complicated interaction with the DBMS

· Examples: generating paychecks, doing account transfers,

· Sophisticated users: interact with the DBMS using the DML directly. The query processor translates DML commands into commands to the database manager.

· Specialized users: interact with the DBMS in specialized ways:

· CAD

· Expert systems

· Graphical or audio data

· Temporal data

· Naive users: interact with the database through application programs.

Saturday, May 23, 2009

DB MANAGER-DAY8

DBMS Components

· File manager

· Database manager

· Query processor

· DML precompiler

· DDL compiler

Database Manager :

The database manager is the program or program unit that provides the interface between the physical level and the conceptual level.

Functions of the database manager:

· Interaction with the file manager (file system)

· Minimizing file reads and writes, as disk access is slower than main memory acces

· Translating DML commands to file operations

· Integrity enforcement

· checking that consistency constraints are satisfied

· taking some action when they aren't

· Security enforcement

· Preventing unathorized access to data

· Example: through a password and security classification system

· Backup and recovery

· Detect when information in the database or data dictionary is lost or corrupted due to disk crash, power failure, software errors ...

· Restore the database to a previous consistent state

· Concurrency control - making sure that concurrent updates don't give surprising or inconsistent results.

The database manager for a small system typically does not implement all of these functions.

Friday, May 22, 2009

DATA LANGUAGES-DAY7

Data Definition Language(DDL)

The data definition language (DDL) is the language used to define and modify the conceptual scheme of the database.

· Often used to define/modify sub schemes

· The definition of the conceptual scheme (written in the DDL) is compiled into a file called the data dictionary

· The data dictionary is consulted for scheme information whenever data is read or modified

· A separate language called the data storage and definition language is used to access the physical scheme of the database

Data Manipulation Language (DML):

The language used at the conceptual and view levels to retrieve, insert, delete and modify information stored in the database

Query

A request for information retrieval. Example (in English): List all customers who have an account balance over $500

Query language

The part of the DML used for retrieving information

The terms query language and data manipulation language are often used interchangeably.

Example: SQL is a DML, but is usually called a query language.

DML's are classified by the kind of query language they include:

· Procedural DML's require the user to specify what data is needed and to provide an algorithm for getting the data. The algorithm is written in query language.
Examples: SQL, Quell

· Nonprocedural DML's require only that the user specify what data is needed
Examples: Data log, QBE

Notes:

· Like the distinction between procedural programming languages (C, C++, Ada) and nonprocedural languages (Prolog)

· DDL's manipulate schemes, while DML's manipulate instances

Thursday, May 21, 2009

DATA INDEPENDENCY-DAY6

Data Independence

The ability to modify a scheme definition at one level without affecting the scheme at the next higher level

Physical data independence

The ability to change the physical scheme without affecting the conceptual scheme

Logical data independence

The ability to change the conceptual scheme without affecting sub-schemes

· Easy if information is added to the conceptual scheme

· Often impossible if information used in some sub-scheme is deleted from the conceptual scheme

Notes:

· Physical data independence implies that programs that use the conceptual level are unaffected by changes to the physical scheme

· Logical data independence implies that programs that use some sub-scheme are unaffected by changes to the conceptual scheme

· Data independence is like data abstraction in software engineering

Wednesday, May 20, 2009

SCHEMA-DAY5

Instances and Schemes

The data stored in the database at any given time is an instance of the database.

The overall design of the database is the database scheme.

Example:

Name

account number

balance

TOM CRUISE

1024

8725.38

DANY WALT

4977

10.50

Is an instance of a database with scheme (name, account number, balance)

Database systems have schemes (designs) at each level of abstraction:

· The physical scheme is the design at the physical level, i.e. as a file of records of a particular type

· The conceptual scheme is the design at the conceptual level. Example: (name, account number, balance) is a conceptual scheme.

· A subscheme is a design at the view level

· A sub scheme is part of a scheme

· Example: (name, account number) is a sub scheme of (name, account number, balance)

· The sub scheme controls what information can be seen using the corresponding view

· Example: the previous sub scheme could be used by someone preparing ATM cards for the bank

As with levels of abstraction, there is:

· One physical scheme

· One conceptual scheme

As many sub schemes as needed