Sunday, November 18, 2007

DBMS Interview Questions and Answers

QUESTION 1:
What is database?
ANSWER:
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.
QUESTION 2:
What is DBMS?
ANSWER:
? Redundancy is controlled.
? Unauthorised access is restricted.
? Providing multiple user interfaces.
? Enforcing integrity constraints.
? Providing backup and recovery.
QUESTION 4:
What is a Database system?
ANSWER:
The database and DBMS software together is called as Database system.
QUESTION 5:
Disadvantage in File Processing System?
ANSWER:
? Data redundancy & inconsistency.
? Difficult in accessing data.
? Data isolation.
? Data integrity.
? Concurrent access is not possible.
? Security Problems. .
QUESTION 6:
Describe the three levels of data abstraction?
ANSWER:
The are three levels of abstraction:
? Physical level: The lowest level of abstraction describes how data are stored.
? Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
? View level: The highest level of abstraction describes only part of entire database.
QUESTION 7:
Define the "integrity rules"
ANSWER:
There are two Integrity rules.
? Entity Integrity: States that ?Primary key cannot have NULL value?
? Referential Integrity: States that ?Foreign Key can be either a NULL value or should be Primary Key value of other relation.
QUESTION 8:
What is extension and intension?
ANSWER:
Extension -It is the number of tuples present in a table at any instance. This is time dependent.
Intension - It is a constant value that gives the name, structure of table and the constraints laid on it.
QUESTION 9:
What is System R? What are its two major subsystems?
ANSWER:
System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center . It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system.
Its two subsystems are
? Research Storage
? System Relational Data System.
QUESTION 10:
How is the data structure of System R different from the relational structure?
ANSWER:
Unlike Relational systems in System R
? Domains are not supported
? Enforcement of candidate key uniqueness is optional
? Enforcement of entity integrity is optional
? Referential integrity is not enforced
QUESTION 11:
What is Data Independence?
ANSWER:
Data independence means that ?the application is independent of the storage structure and access strategy of data?. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.
Two types of Data Independence:
? Physical Data Independence : Modification in physical level should not affect the logical level.
? Logical Data Independence : Modification in logical level should affect the view level.
NOTE: Logical Data Independence is more difficult to achieve
QUESTION 12:
What is a view? How it is related to data independence?
ANSWER:
A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.
Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence. .
QUESTION 13:
What is Data Model?
ANSWER:
A collection of conceptual tools for describing data, data relationships data semantics and constraints.
QUESTION 14:
What is E-R model?
ANSWER:
This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.
QUESTION 15:
What is Object Oriented model?
ANSWER:
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.
QUESTION 16:
What is an Entity?
ANSWER:
It is a 'thing' in the real world with an independent existence.
QUESTION 17:
What is an Entity type?
ANSWER:
It is a collection (set) of entities that have same attributes.
QUESTION 18:
What is an Entity set?
ANSWER:
It is a collection of all entities of particular entity type in the database.
QUESTION 19:
What is an Extension of entity type?
ANSWER:
The collections of entities of a particular entity type are grouped together into an entity set.
QUESTION 20:
What is Weak Entity set?
ANSWER:
An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.
QUESTION 21:
What is an attribute?
ANSWER:
It is a particular property, which describes the entity.
QUESTION 22:
What is a Relation Schema and a Relation?
ANSWER:
A relation Schema denoted by R(A1, A2, ?, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).
QUESTION 23:
What is degree of a Relation?
ANSWER:
It is the number of attribute of its relation schema.
QUESTION 24:
What is Relationship?
ANSWER:
It is an association among two or more entities.
QUESTION 25:
What is Relationship set?
ANSWER:
The collection (or set) of similar relationships.
QUESTION 26:
What is Relationship type?
ANSWER:
Relationship type defines a set of associations or a relationship set among a given set of entity types.
QUESTION 27:
What is degree of Relationship type?
ANSWER:
It is the number of entity type participating.
QUESTION 28:
What is Data Storage - Definition Language?
ANSWER:
The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language.
QUESTION 29:
What is DML (Data Manipulation Language)?
ANSWER:
This language that enable user to access or manipulate data as organised by appropriate data model.
? Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data.
? Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.
QUESTION 30:
What is VDL (View Definition Language)?
ANSWER:
It specifies user views and their mappings to the conceptual schema.
QUESTION 31:
What is DML Compiler?
ANSWER:
It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand.
QUESTION 32:
What is Query evaluation engine?
ANSWER:
It executes low-level instruction generated by compiler.
QUESTION 33:
What is DDL Interpreter?
ANSWER:
It interprets DDL statements and record them in tables containing metadata.
QUESTION 34:
What is Record-at-a-time?
ANSWER:
The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time.
QUESTION 35:
What is Set-at-a-time or Set-oriented?
ANSWER:
The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented.
QUESTION 36:
What is Relational Algebra?
ANSWER:
It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.
QUESTION 37:
What is Relational Calculus?
ANSWER:
It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL.
QUESTION 38:
How does Tuple-oriented relational calculus differ from domain-oriented relational calculus
ANSWER:
The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL
The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE.
QUESTION 39:
What is normalization?
ANSWER:
It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
? Minimizing redundancy
? Minimizing insertion, deletion and update anomalies.

QUESTION 40:
What is Functional Dependency?
ANSWER:
A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.
QUESTION 41:
When is a functional dependency F said to be minimal?
ANSWER:
? Every dependency in F has a single attribute for its right hand side.
? We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F.
? We cannot remove any dependency from F and still have set of dependency that is equivalent to F.
QUESTION 42:
What is Multivalued dependency?
ANSWER:
Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties
? t3[x] = t4[X] = t1[X] = t2[X]
? t3[Y] = t1[Y] and t4[Y] = t2[Y]
? t3[Z] = t2[Z] and t4[Z] = t1[Z]
where [Z = (R-(X U Y)) ]
QUESTION 43:
What is Lossless join property?
ANSWER:
It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.
QUESTION 44:
What is 1 NF (Normal Form)?
ANSWER:
The domain of attribute must include only atomic (simple, indivisible) values.
QUESTION 45:
What is Fully Functional dependency?
ANSWER:
It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.
QUESTION 46:
What is 2NF?
ANSWER:
A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.
QUESTION 47:
What is 3NF?
ANSWER:
A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true
? X is a Super-key of R.
? A is a prime attribute of R.
In other words, if every non prime attribute is non-transitively dependent on primary key.
QUESTION 48:
What is BCNF (Boyce-Codd Normal Form)?
ANSWER:
A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key.
QUESTION 49:
What is 4NF?
ANSWER:
A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true
? X is subset or equal to (or) XY = R.
? X is a super key.
QUESTION 50:
What is 5NF?
ANSWER:
A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that holds R, one the following is true
? Ri = R for some i.
? The join dependency is implied by the set of FD, over R in which the left side is key of R.

Wednesday, November 14, 2007

Projects & Placement opportunity,

HORIZONe


 

Dear Students,

Horizone technologies a fast growing software company born in year 1999 and committed to serve more than 150 clients every year through Software Development, IT Training and HR Consulting. At Horizone we broadly understand the importance of academic projects which will ease the students in accomplishing the career goal. Our prime objective to expose the students to the cutting edge technology, which will create and increase the demand for themselves in competitive & challenging industry.

De Horizone Technologies offers students academic projects & placement assistance through 150 middle level IT companies and helps placing them by analyzing their efficiency and knowledge on latest technologies.

If you need the project topics, I will send you the project details for your reference.

I kindly request you students to refer your friends as well, for this wonderful

Projects & Placement opportunity

Let us all help the students community achieve their ongoing career desire.

Wishing you all a very bright future…

Kind Regards,

Senthil Kumar.C- CEO.,

De Horizone Technologies.Pvt.Ltd.

Mob:9840896788

Looking to join a Course / Job Guarantee Program ?

Off the late, I have been witnessing many instances where job seekers (especially Freshers) are getting cheated by FAKE Consultancies and Companies. I don't want that to happen to you. With minimum care, you can avoid getting cheated. Most of you might be aware of these things but still many of you fall in trap by their convincing false claims. These guidelines might help someone who is new to industry or fresh out of college. Please forward this to every one of your friends and try to help at least few of them from getting cheated. --> ChetanaS

Thumb Rule # 1:

DON'T BELIEVE IN ANYONE WHO ASKS YOU TO PAY MONEY FOR OFFERING A JOB.

Companies don't need to take any money from you. They might tell you hundreds of stories like they are taking money as a 'Security Deposit' or for 'Infrastructure' purpose. Don't trust them. If they don't have enough money for their infrastructure, they don't deserve to run the company

Instead, I advise you to trust a company who doesn't ask a penny from you even if it is a start-up company. You can work for FREE (or for a very less salary) if you want to get some work experience. That is Ok. But never pay money from your pocket for any reason. In worst-case scenario, if you are paying money, don't forget to take a signed paper (On their Company Notepad with the signature from an official) or a valid bank receipt from them in which it's clearly written that you have paid the money as a refundable security deposit and it should also have the Terms & Conditions.

Also, don't submit/handover your educational certificates (or any original documents) unless it is a very good company and its mandatory for all employees working there. If you are submitting the documents, make sure you get a written proof that they have taken them as per the policy of their organization. (F.Y.I., Good companies never insist their employees to handover originals to them. They generally ask you to bring them during joining period to cross check with the photocopies of the same.) If you blindly believe somebody's words without following the above guidelines then, you will be in serious trouble later when you want to leave the company. I know many freshers who suffered because of this. Hope you don't get into trouble.

Thumb Rule # 2:

DON'T BELIEVE IN ANY 'JOB GUARANTEE' PROGRAMS FROM TRAINING INSTITUTES. 99.0 % OF THEM DON'T KEEP UP THEIR PROMISES.

It has become a trend that many companies/institutes asking jobless people to pay 50,000 (or more) and they will pay you 2,000 per month. Just think logically how foolish it is. For 1 year, they will be paying you (2000X12=) 24,000. So, you are working FREE for them for more than 2 years. In other words, they will be giving you a part of the amount that you have paid to them initially. And they will be enjoying the interest on your money.

These institutes promise you a lot of things when you go for counseling. They will show their past record of placing people in MNC companies and they will tell you the list of companies that come there for the placement. Don't get deceived by them. All those promises will go in vain the moment you pay the money.

In the worst-case scenario, if you must join, then enquire with the students who are studying there and who already studied there. (You can know any regrets from those who are currently studying there and you will know the pros and cons from the people who already studied there. Try to get feedback from those who achieved the job and those who couldn't get the job after the completion of the course.)

Unveiling the Secret :- From my experience, I can say that, typically some good training institutes could place those candidates who meet with the company's eligibility criteria such as the engineering branch/stream you have done and the percentage criteria through out the candidate's career. These institutes will lure freshers showing the past records and allows everybody to join the course initially but they keep mum on this issue until you demand the reason why they couldn't place YOU. Remember, even the good institutes are running on a profit basis and NOT on a service basis!

It's always good to get trained in some latest technologies and it improves your chance of getting a job. But don't join any institute based on their promise of giving you a job. When you want to join an institute, remember to enquire with the student who has taken the course and observe the infrastructure, lab availability timings, and the faculty. Some institutes train you using their previous batch students as faculty. Be careful. Preferably, join a branded institute as they maintain quality of education to some level. But generally they are expensive to afford as they try to maintain the quality. Remember? No institute is at your service ! Everything is business. You cannot change that, but you need to be careful.

Thumb Rule # 3:

KNOW THE DIFFERENCE BETWEEN 'PLACEMENT ASSISTANCE' AND 'PLACEMENT GUARANTEE'.

There is a subtle difference between 'Placement Assistance' and 'Placement Guarantee'. The former one means that they will help you to get a job, but no guarantee. If you observe the advertisements carefully, most of them mention '100% Placement Assistance'. Later they can always escape saying that they never guaranteed a job. Even if they do, there will be a famous super star saying "* Conditions Apply !" :-). Ask them what those conditions are.

When some institute says 'Placement Guarantee', ask them to mention it in written and give it to you. (No body can dare to give you. They cleverly say that how can we assure you a job if you don't learn anything. Or they will ask you not to join the course if you don't have the trust on them and they can even say that, there are hundreds of candidates who are pursuing the course and they will slap a question back to you whether they are all fools to join that institute. What will be your reaction? ) See to it that it's clearly mentioned in that document WHAT IF they can't provide you a job. Also tell them that you will pay the money the next moment they provide you a job (Since they are anyway saying job is guaranteed, ask them what's the problem with this...:-)).

Some institutes say that they will recruit you based on your performance in training. This is even more fishy. They can always escape later saying your performance is not up to the mark (Despite of you performing very good) and walk away with your money. Be careful.

In the worst case, if you are paying money, see to it that you pay in installments. (At least, it will save you from losing your entire money). If their training is really good, you will anyway pay the remaining money. Otherwise, you can escape with the least damage. Hope you will keep in mind that I've asked you to join an institute mainly to learn the technology and not for their job guarantee scheme. So when you want to learn, join the best! It may even fetch you a job!

Thumb Rule # 4:

DON'T ATTEND THE WRITTEN TESTS/INTERVIEWS THAT ASK YOU TO PAY REGISTRATION FEE. 99.0 % OF THEM ARE FAKE.

An exception is the Government companies. They require some registration fee. That's OK. Remember that good/branded companies never ask you for registration fees. They don't need it. If they are taking money, there is something fishy. Don't pay registration fee unless you are totally convinced. Just walkout if you think something is fishy.

Thumb Rule # 5:

DON'T BELIEVE ANYONE WHO SAYS THEY CAN GET YOU THROUGH COMPANIES BY 'BACK-DOOR'.

People in the companies are not senseless to recruit candidates in illegal ways and put them and their own company in trouble. Don't believe if someone says he knows the HR or Project Manager of a company and can provide you job through back door. In the best case, one may get a job if the candidate directly knows high level people and he/she meets all the eligibility criteria of the company and the candidate is talented enough to get a job but he/she didn't get an opportunity to prove his/her ability. But remember, there is no bypass to the process of the company. Process is rigid and it is because of the process, a company grows or shrinks! It's better and happy to stay away from such back door offers instead of getting troubled by them. Think!

Thumb Rule # 6:

DON'T BELIEVE IN ANY OF THE 'ONLINE TYPING JOBS' OR 'SMART JOBS' THAT ASK YOU TO PAY SOME MONEY TO EARN MORE.

If they give it for free, then you may think about it. (But, I strictly discourage such jobs because you will lose your will to get into a good job that matches your profile.) Better, simply ignore. Don't pay even a single paisa. They lure you saying you have to pay 500 Rs (or more) initial payment to earn thousands of money every day ! All that is simply trash. You will be wasting your time and you won't earn even a single paisa after paying your/your parents' hard-earned money.

Thumb Rule # 7:

THINK TWICE BEFORE PAYING MONEY TO ANY OF THE JOB SITES.

Personally I don't believe in Premier Memberships, Online Tests that require you to pay money. I believe that's just eye wash stuff and will not fetch you any job if you don't have right talent. If you have talent, you will anyway get that job even without the help of those programs. Even if they send your resume to 1000 companies or 10,000 companies, the companies won't recruit you unless they have vacancies and you are suitable for those positions.

If someone says they succeeded through some job program, just think what is the percentage of people succeeded in getting jobs through that program. I don't think it will be more than 1 %. I am not saying all programs are fake ones. But my advice for you is to think twice before you spend your hard-earned money on some job programs. Remember that companies pay money for those job sites if you get selected through them. In such case, there is no need to collect money from you.

Disclaimer: Please note that the copyright of this information is owned by ChetanaS ( www.ChetanaS.com ) . However you can freely distribute/display this information at your will as long as you don't alter parts or full of this information and/or copy the contents of this information. This information can be distributed AS IT IS only (Along with this disclaimer). The contents of this information should not be copied/reproduced in any other form without the written permission from the authors. Any modification to this information will be considered as copy right violation and you may be subjected to legal action. If you need any clarifications egarding the same, you can mail me at : "Chetana @ ChetanaS.com".

ACCENTURE PATTERN & INTERVIEW - 19 AUG 2007

Hi
I got recently placed in Accenture through an campus recruitment drive at
Krishna Institute of Engg. And Technology and the campus recruitment was a massive event as around 8000
students as it was told to us, appeared at the campus on !9th Aug, and then let me tell u something about the selection procedure, which you all might be knowing by now through various other papers available so it comprises of all in all 4 rounds,
1. Written Test round (Aptitude + Logical reasoning + English(verbal) +
focus on the shorter ones to clear first and then the composition) that is plan n give the paper
As for us it was composed of 54 questions most of them were really easy and the remaining few were also easy but a bit time consuming focus on topics like (Venn Diagram, Coding and Decoding and English section)
Some questions which I remember are like:
a) $ represents 1 and * represents 0 in some code and using that if we want to write 3 we can write it as $$ and for 4 we can use $** and so all nearly five questions from the same pattern!!
b) Few questions from the Venn diagram (5 questions)
c) Sitting arrangement
http://www.ChetanaSinterview.com
d) Simple English and comprehension (comprehensions on
computer science topics like IBM OS and second one on process and multi processing (nt exactly remember the second one but it was related to multiprocessing).
Once the written exam was finished it was all panic situation although I was confident about clearing the round but finally the result was declared and I was shortlisted along with 1600 other students and it was a great no. of rejections keeping in mind the total no. of 8000 students) from our college their were 119 students shortlisted so it was a great number of students from a single college,
2) GROUP DISCUSSION
This is the main round (Rejection The Maximum) in which all students are short listed to the pick best ones. For the GD We were divided into groups of 15. In
my group, and all of them looked confident when I looked at them as we were there in the room. The moderator said he will select on the basis of communications skills, flow of the thought, and audibility of voice and the most important of all Grammar. Topics given to other students along with our groups were spontaneous like "Women Hockey", "Black And White", "Is China a Threat to India in IT". After our topic was told to us he told us to think for a minute as he told the topic I was really confident so I decided to become the moderator and so I started speaking for the topics but after speaking some key points it was like panic and every one latched on the topic and it became a horrible situation so then we were slowly and gradually asked to put our views individually,
After that the result came there were four students shortlisted from our group of students two of them were my
classmates and one student of my college engg branch I exactly don't remember which one,
So the key point u need to keep in mind when u are in the GD is that don't u look at the HR just look at urs subordinates while u speak, be attentive and try to be initiator or concluder if u think u can speak all relevant points and that's work done ,
After this round nearly 350 students(approx) were left from the first slot of 1000 students and then it was the turn of the Technical and the hr round!!
4) (i) HR INTERVIEW
This Interview was purely HR taken by a lady HR. and it Is better to take a chill pill and remain calm n it is really cool round so don't worry and it would be cleared if u spoke to her confidently
QUESTIONS WERE:
1.Introduce urself.
2.Top 3
IT companies in India
3.Why accenture?
4.Ur hobbie
5)About the Gap which I had in my academics
(II)
TECHNICAL INTERVIEW
This Interview is a bit of works just need to have a good knowledge of basics of programming, databases (SQL), OS(
unix) only few questions put and asked to make programs like (sorting a Tree, use of recursion, Data Structures, maintaining the bill of the departmental store, and string handling and few others) just brush up ur programming they would ask u to make a single program (for CS and MCA) and once u have written that its job done
Finally we were asked to gather in the conference room of the
college and the students gathered there and slowly they started calling the names of the placed students along with their date of birth, when I heard my name it was like the sweetest dream we can dream of in our student life coming true and I got the job.

Sunday, November 11, 2007

Database

Database
1. What is database?

A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

2. What is DBMS?
It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.

3. What is a Database system?
The database and DBMS software together is called as Database system.

4. Advantages of DBMS?
� Redundancy is controlled.
� Unauthorised access is restricted.
� Providing multiple user interfaces.
� Enforcing integrity constraints.
� Providing backup and recovery.

5. Disadvantage in File Processing System?
� Data redundancy & inconsistency.
� Difficult in accessing data.
� Data isolation.
� Data integrity.
� Concurrent access is not possible.
� Security Problems.

6. Describe the three levels of data abstraction?
The are three levels of abstraction:
� Physical level: The lowest level of abstraction describes how data are stored.
� Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
� View level: The highest level of abstraction describes only part of entire database.

7. Define the "integrity rules"
There are two Integrity rules.
� Entity Integrity: States that �Primary key cannot have NULL value�
� Referential Integrity: States that �Foreign Key can be either a NULL value or should be Primary Key value of other relation.

8. What is extension and intension?
Extension -
It is the number of tuples present in a table at any instance. This is time dependent.
Intension -
It is a constant value that gives the name, structure of table and the constraints laid on it.

9. What is System R? What are its two major subsystems?
System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center. It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system.
Its two subsystems are
� Research Storage
� System Relational Data System.

10. How is the data structure of System R different from the relational structure?
Unlike Relational systems in System R
� Domains are not supported
� Enforcement of candidate key uniqueness is optional
� Enforcement of entity integrity is optional
� Referential integrity is not enforced

11. What is Data Independence?
Data independence means that �the application is independent of the storage structure and access strategy of data�. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.
Two types of Data Independence:
� Physical Data Independence: Modification in physical level should not affect the logical level.
� Logical Data Independence: Modification in logical level should affect the view level.
NOTE: Logical Data Independence is more difficult to achieve

12. What is a view? How it is related to data independence?
A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.
Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence.

13. What is Data Model?
A collection of conceptual tools for describing data, data relationships data semantics and constraints.

14. What is E-R model?
This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.

15. What is Object Oriented model?
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.

16. What is an Entity?
It is a 'thing' in the real world with an independent existence.

17. What is an Entity type?
It is a collection (set) of entities that have same attributes.

18. What is an Entity set?
It is a collection of all entities of particular entity type in the database.

19. What is an Extension of entity type?
The collections of entities of a particular entity type are grouped together into an entity set.

20. What is Weak Entity set?
An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.

21. What is an attribute?
It is a particular property, which describes the entity.

22. What is a Relation Schema and a Relation?
A relation Schema denoted by R(A1, A2, �, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).

23. What is degree of a Relation?
It is the number of attribute of its relation schema.

24. What is Relationship?
It is an association among two or more entities.

25. What is Relationship set?
The collection (or set) of similar relationships.

26. What is Relationship type?
Relationship type defines a set of associations or a relationship set among a given set of entity types.

27. What is degree of Relationship type?
It is the number of entity type participating.

25. What is DDL (Data Definition Language)?
A data base schema is specifies by a set of definitions expressed by a special language called DDL.

26. What is VDL (View Definition Language)?
It specifies user views and their mappings to the conceptual schema.

27. What is SDL (Storage Definition Language)?
This language is to specify the internal schema. This language may specify the mapping between two schemas.

28. What is Data Storage - Definition Language?
The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language.

29. What is DML (Data Manipulation Language)?
This language that enable user to access or manipulate data as organised by appropriate data model.
� Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data.
� Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.

31. What is DML Compiler?
It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand.

32. What is Query evaluation engine?
It executes low-level instruction generated by compiler.

33. What is DDL Interpreter?
It interprets DDL statements and record them in tables containing metadata.

34. What is Record-at-a-time?
The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time.

35. What is Set-at-a-time or Set-oriented?
The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented.

36. What is Relational Algebra?
It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.

37. What is Relational Calculus?
It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL.

38. How does Tuple-oriented relational calculus differ from domain-oriented relational calculus
The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL
The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE.

39. What is normalization?
It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
� Minimizing redundancy
� Minimizing insertion, deletion and update anomalies.

40. What is Functional Dependency?
A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.

41. When is a functional dependency F said to be minimal?
� Every dependency in F has a single attribute for its right hand side.
� We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F.
� We cannot remove any dependency from F and still have set of dependency that is equivalent to F.

42. What is Multivalued dependency?
Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties
� t3[x] = t4[X] = t1[X] = t2[X]
� t3[Y] = t1[Y] and t4[Y] = t2[Y]
� t3[Z] = t2[Z] and t4[Z] = t1[Z]
where [Z = (R-(X U Y)) ]

43. What is Lossless join property?
It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.

44. What is 1 NF (Normal Form)?
The domain of attribute must include only atomic (simple, indivisible) values.

45. What is Fully Functional dependency?
It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.

46. What is 2NF?
A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.

47. What is 3NF?
A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true
� X is a Super-key of R.
� A is a prime attribute of R.
In other words, if every non prime attribute is non-transitively dependent on primary key.

48. What is BCNF (Boyce-Codd Normal Form)?
A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key.

49. What is 4NF?
A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true
� X is subset or equal to (or) XY = R.
� X is a super key.

50. What is 5NF?
A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that holds R, one the following is true
� Ri = R for some i.
� The join dependency is implied by the set of FD, over R in which the left side is key of R.

51. What is Domain-Key Normal Form?
A relation is said to be in DKNF if all constraints and dependencies that should hold on the the constraint can be enforced by simply enforcing the domain constraint and key constraint on the relation.

52. What are partial, alternate,, artificial, compound and natural key?
Partial Key:
It is a set of attributes that can uniquely identify weak entities and that are related to same owner entity. It is sometime called as Discriminator.
Alternate Key:
All Candidate Keys excluding the Primary Key are known as Alternate Keys.
Artificial Key:
If no obvious key, either stand alone or compound is available, then the last resort is to simply create a key, by assigning a unique number to each record or occurrence. Then this is known as developing an artificial key.
Compound Key:
If no single data element uniquely identifies occurrences within a construct, then combining multiple elements to create a unique identifier for the construct is known as creating a compound key.
Natural Key:
When one of the data elements stored within a construct is utilized as the primary key, then it is called the natural key.

53. What is indexing and what are the different kinds of indexing?
Indexing is a technique for determining how quickly specific data can be found.
Types:
� Binary search style indexing
� B-Tree indexing
� Inverted list indexing
� Memory resident table
� Table indexing

54. What is system catalog or catalog relation? How is better known as?
A RDBMS maintains a description of all the data that it contains, information about every relation and index that it contains. This information is stored in a collection of relations maintained by the system called metadata. It is also called data dictionary.


55. What is meant by query optimization?
The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is referred to as query optimization.

56. What is join dependency and inclusion dependency?
Join Dependency:
A Join dependency is generalization of Multivalued dependency.A JD {R1, R2, ..., Rn} is said to hold over a relation R if R1, R2, R3, ..., Rn is a lossless-join decomposition of R . There is no set of sound and complete inference rules for JD.
Inclusion Dependency:
An Inclusion Dependency is a statement of the form that some columns of a relation are contained in other columns. A foreign key constraint is an example of inclusion dependency.

57. What is durability in DBMS?
Once the DBMS informs the user that a transaction has successfully completed, its effects should persist even if the system crashes before all its changes are reflected on disk. This property is called durability.

58. What do you mean by atomicity and aggregation?
Atomicity:
Either all actions are carried out or none are. Users should not have to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions.
Aggregation:
A concept which is used to model a relationship between a collection of entities and relationships. It is used when we need to express a relationship among relationships.

59. What is a Phantom Deadlock?
In distributed deadlock detection, the delay in propagating local information might cause the deadlock detection algorithms to identify deadlocks that do not really exist. Such situations are called phantom deadlocks and they lead to unnecessary aborts.

60. What is a checkpoint and When does it occur?
A Checkpoint is like a snapshot of the DBMS state. By taking checkpoints, the DBMS can reduce the amount of work to be done during restart in the event of subsequent crashes.


61. What are the different phases of transaction?
Different phases are
� Analysis phase
� Redo Phase
� Undo phase

62. What do you mean by flat file database?
It is a database in which there are no programs or user access languages. It has no cross-file capabilities but is user-friendly and provides user-interface management.

63. What is "transparent DBMS"?
It is one, which keeps its Physical Structure hidden from user.

64. Brief theory of Network, Hierarchical schemas and their properties
Network schema uses a graph data structure to organize records example for such a database management system is CTCG while a hierarchical schema uses a tree data structure example for such a system is IMS.

65. What is a query?
A query with respect to DBMS relates to user commands that are used to interact with a data base. The query language can be classified into data definition language and data manipulation language.

66. What do you mean by Correlated subquery?
Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query or it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called a correlated subquery.
A correlated subquery can be easily identified if it contains any references to the parent subquery columns in its WHERE clause. Columns from the subquery cannot be referenced anywhere else in the parent query. The following example demonstrates a non-correlated subquery.
E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where CUST.CNUM = ORDER.CNUM)

67. What are the primitive operations common to all record management systems?
Addition, deletion and modification.

68. Name the buffer in which all the commands that are typed in are stored
�Edit� Buffer

69. What are the unary operations in Relational Algebra?
PROJECTION and SELECTION.

70. Are the resulting relations of PRODUCT and JOIN operation the same?
No.
PRODUCT: Concatenation of every row in one relation with every row in another.
JOIN: Concatenation of rows from one relation and related rows from another.

71. What is RDBMS KERNEL?
Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the kernel to manage the database
You might think of an RDBMS as an operating system (or set of subsystems), designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatches and schedules user requests; and manages space usage within its table-space structures
.
72. Name the sub-systems of a RDBMS
I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management

73. Which part of the RDBMS takes care of the data dictionary? How
Data dictionary is a set of tables and database objects that is stored in a special area of the database and maintained exclusively by the kernel.

74. What is the job of the information stored in data-dictionary?
The information in the data dictionary validates the existence of the objects, provides access to them, and maps the actual physical storage location.

75. Not only RDBMS takes care of locating data it also
determines an optimal access path to store or retrieve the data


76. How do you communicate with an RDBMS?
You communicate with an RDBMS using Structured Query Language (SQL)

77. Define SQL and state the differences between SQL and other conventional programming Languages
SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them.

78. Name the three major set of files on disk that compose a database in Oracle
There are three major sets of files on disk that compose a database. All the files are binary. These are
� Database files
� Control files
� Redo logs
The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself.
All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one.

79. What is an Oracle Instance?
The Oracle system processes, also known as Oracle background processes, provide functions for the user processes�functions that would otherwise be done by the user processes themselves
Oracle database-wide system memory is known as the SGA, the system global area or shared global area. The data and control structures in the SGA are shareable, and all the Oracle background processes and user processes can use them.
The combination of the SGA and the Oracle background processes is known as an Oracle instance

80. What are the four Oracle system processes that must always be up and running for the database to be useable
The four Oracle system processes that must always be up and running for the database to be useable include DBWR (Database Writer), LGWR (Log Writer), SMON (System Monitor), and PMON (Process Monitor).

81. What are database files, control files and log files. How many of these files should a database have at least? Why?
Database Files
The database files hold the actual data and are typically the largest in size. Depending on their sizes, the tables (and other objects) for all the user accounts can go in one database file�but that's not an ideal situation because it does not make the database structure very flexible for controlling access to storage for different users, putting the database on different disk drives, or backing up and restoring just part of the database.
You must have at least one database file but usually, more than one files are used. In terms of accessing and using the data in the tables and other objects, the number (or location) of the files is immaterial.
The database files are fixed in size and never grow bigger than the size at which they were created
Control Files
The control files and redo logs support the rest of the architecture. Any database must have at least one control file, although you typically have more than one to guard against loss. The control file records the name of the database, the date and time it was created, the location of the database and redo logs, and the synchronization information to ensure that all three sets of files are always in step. Every time you add a new database or redo log file to the database, the information is recorded in the control files.
Redo Logs
Any database must have at least two redo logs. These are the journals for the database; the redo logs record all changes to the user objects or system objects. If any type of failure occurs, the changes recorded in the redo logs can be used to bring the database to a consistent state without losing any committed transactions. In the case of non-data loss failure, Oracle can apply the information in the redo logs automatically without intervention from the DBA.
The redo log files are fixed in size and never grow dynamically from the size at which they were created.

82. What is ROWID?
The ROWID is a unique database-wide physical address for every row on every table. Once assigned (when the row is first inserted into the database), it never changes until the row is deleted or the table is dropped.
The ROWID consists of the following three components, the combination of which uniquely identifies the physical storage location of the row.
� Oracle database file number, which contains the block with the rows
� Oracle block address, which contains the row
� The row within the block (because each block can hold many rows)
The ROWID is used internally in indexes as a quick means of retrieving rows with a particular key value. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID


83. What is Oracle Block? Can two Oracle Blocks have the same address?
Oracle "formats" the database files into a number of Oracle blocks when they are first created�making it easier for the RDBMS software to manage the files and easier to read data into the memory areas.
The block size should be a multiple of the operating system block size. Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block. This block header has a minimum size, but it can grow.
These Oracle blocks are the smallest unit of storage. Increasing the Oracle block size can improve performance, but it should be done only when the database is first created.
Each Oracle block is numbered sequentially for each database file starting at 1. Two blocks can have the same block address if they are in different database files.

84. What is database Trigger?
A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written in PL/SQL.

85. Name two utilities that Oracle provides, which are use for backup and recovery.
Along with the RDBMS software, Oracle provides two utilities that you can use to back up and restore the database. These utilities are Export and Import.
The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file. The Import utility reads the file produced by an export, recreates the definitions of objects, and inserts the data
If Export and Import are used as a means of backing up and recovering the database, all the changes made to the database cannot be recovered since the export was performed. The best you can do is recover the database to the time when the export was last performed.

86. What are stored-procedures? And what are the advantages of using them.
Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.


87. How are exceptions handled in PL/SQL? Give some of the internal exceptions' name
PL/SQL exception handling is a mechanism for dealing with run-time errors encountered during procedure execution. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination.
The exception handler must be defined within a subprogram specification. Errors cause the program to raise an exception with a transfer of control to the exception-handler block. After the exception handler executes, control returns to the block in which the handler was defined. If there are no more executable statements in the block, control returns to the caller.
User-Defined Exceptions
PL/SQL enables the user to define exception handlers in the declarations area of subprogram specifications. User accomplishes this by naming an exception as in the following example:
ot_failure EXCEPTION;
In this case, the exception name is ot_failure. Code associated with this handler is written in the EXCEPTION specification area as follows:
EXCEPTION
when OT_FAILURE then
out_status_code := g_out_status_code;
out_msg := g_out_msg;
The following is an example of a subprogram exception:
EXCEPTION
when NO_DATA_FOUND then
g_out_status_code := 'FAIL';
RAISE ot_failure;
Within this exception is the RAISE statement that transfers control back to the ot_failure exception handler. This technique of raising the exception is used to invoke all user-defined exceptions.
System-Defined Exceptions
Exceptions internal to PL/SQL are raised automatically upon error. NO_DATA_FOUND is a system-defined exception. Table below gives a complete list of internal exceptions.

PL/SQL internal exceptions.
PL/SQL internal exceptions.
Exception Name Oracle Error
CURSOR_ALREADY_OPEN ORA-06511
DUP_VAL_ON_INDEX ORA-00001
INVALID_CURSOR ORA-01001
INVALID_NUMBER ORA-01722
LOGIN_DENIED ORA-01017
NO_DATA_FOUND ORA-01403
NOT_LOGGED_ON ORA-01012
PROGRAM_ERROR ORA-06501
STORAGE_ERROR ORA-06500
TIMEOUT_ON_RESOURCE ORA-00051
TOO_MANY_ROWS ORA-01422
TRANSACTION_BACKED_OUT ORA-00061
VALUE_ERROR ORA-06502
ZERO_DIVIDE ORA-01476
In addition to this list of exceptions, there is a catch-all exception named OTHERS that traps all errors for which specific error handling has not been established.
88. Does PL/SQL support "overloading"? Explain
The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered.
PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or internal functions. To further ensure calling the proper procedure, you can use the dot notation. Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference.
89. Tables derived from the ERD
a) Are totally unnormalised
b) Are always in 1NF
c) Can be further denormalised
d) May have multi-valued attributes
(b) Are always in 1NF
90. Spurious tuples may occur due to
i. Bad normalization
ii. Theta joins
iii. Updating tables from join
a) i & ii b) ii & iii
c) i & iii d)

Object oriented Concepts

Frequently Asked Questions - Object oriented Concepts

  • How do you write a program which produces its own source code as its output?
  • How can I find the day of the week given the date?
  • Why doesn't C have nested functions?
  • What is the most efficient way to count the number of bits which are set in a value?
  • How can I convert integers to binary or hexadecimal?
  • How can I call a function, given its name as a string?
  • How do I access command-line arguments?
  • How can I return multiple values from a function?
  • How can I invoke another program from within a C program?
  • How can I access memory located at a certain address?
  • How can I allocate arrays or structures bigger than 64K?
  • How can I find out how much memory is available?
  • How can I read a directory in a C program?
  • How can I increase the allowable number of simultaneously open files?
  • What's wrong with the call "fopen("c:\newdir\file.dat", "r")"?
  • What is the output of printf("%d")
  • What will happen if I say delete this
  • Difference between "C structure" and "C++ structure".
  • Diffrence between a "assignment operator" and a "copy constructor"
  • What is the difference between "overloading" and "overridding"?
  • Explain the need for "Virtual Destructor".
  • Can we have "Virtual Constructors"?
  • What are the different types of polymorphism?
  • What are Virtual Functions? How to implement virtual functions in "C"
  • What are the different types of Storage classes?
  • What is Namespace?
  • What are the types of STL containers?.
  • Difference between "vector" and "array"?
  • How to write a program such that it will delete itself after exectution?
  • Can we generate a C++ source code from the binary file?
  • What are inline functions?
  • Talk sometiming about profiling?
  • How many lines of code you have written for a single program?
  • What is "strstream" ?
  • How to write Multithreaded applications using C++?
  • Explain "passing by value", "passing by pointer" and "passing by reference"
  • Write any small program that will compile in "C" but not in "C++"
  • Have you heard of "mutable" keyword?
  • What is a "RTTI"?
  • Is there something that I can do in C and not in C++?
  • Why preincrement operator is faster than postincrement?
  • What is the difference between "calloc" and "malloc"?
  • What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
  • What is Memory Alignment?
  • Explain working of printf.
  • Difference between "printf" and "sprintf".
  • What is "map" in STL?
  • When shall I use Multiple Inheritance?
  • What are the techniques you use for debugging?
  • How to reduce a final size of executable?
  • Give 2 examples of a code optimization.
  • What is inheritance?
  • Difference between Composition and Aggregation.
  • Difference: Sequence Diagrams, Collaboration Diagrams.
  • Difference: 'uses', 'extends', 'includes'
  • What shall I go for Package Diagram?
  • What is Polymorphism?
  • Is class an Object? Is object a class?
  • Comment: C++ "includes" behavior and java "imports"
  • What do you mean by "Realization"?
  • What is a Presistent, Transient Object?
  • What is the use of Operator Overloading?
  • Does UML guarantee project success?
  • Difference: Activity Diagram and Sequence Diagram.
  • What is association?
  • How to resolve many to many relationship?
  • How do you represent static members and abstract classes in Class Diagram?
  • What does static variable mean?
  • What is a pointer?
  • What is a structure?
  • What are the differences between structures and arrays?
  • In header files whether functions are declared or defined? 
  • What are the differences between malloc() and calloc()?
  • What are macros? what are its advantages and disadvantages?
  • Difference between pass by reference and pass by value?
  • What is static identifier?
  • Where are the auto variables stored?
  • Where does global, static, local, register variables, free memory and C Program instructions get stored?
  • Difference between arrays and linked list?
  • What are enumerations?
  • Describe about storage allocation and scope of global, extern, static, local and register variables?
  • What are register variables? What are the advantage of using register variables?
  • What is the use of typedef?
  • Can we specify variable field width in a scanf() format string? If possible how?
  • Out of fgets() and gets() which function is safe to use and why?
  • Difference between strdup and strcpy?
  • What is recursion?
  • Differentiate between a for loop and a while loop? What are it uses?
  • What are the different storage classes in C?
  • Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
  • What is difference between Structure and Unions?
  • What the advantages of using Unions?
  • What are the advantages of using pointers in a program?
  • What is the difference between Strings and Arrays?
  • In a header file whether functions are declared or defined?
  • What is a far pointer? where we use it?
  • How will you declare an array of three function pointers where each function receives two ints and returns a float?
  • what is a NULL Pointer? Whether it is same as an uninitialized pointer?
  • What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
  • What does the error 'Null Pointer Assignment' mean and what causes this error?
  • What is near, far and huge pointers? How many bytes are occupied by them?
  • How would you obtain segment and offset addresses from a far address of a memory location?
  • Are the expressions arr and &arr same for an array of integers?
  • Does mentioning the array name gives the base address in all the contexts?
  • Explain one method to process an entire string as one unit?
  • What is the similarity between a Structure, Union and enumeration?
  • Can a Structure contain a Pointer to itself?
  • How can we check whether the contents of two structure variables are same or not?
  • How are Structure passing and returning implemented by the complier?
  • How can we read/write Structures from/to data files?
  • What is the difference between an enumeration and a set of pre-processor # defines?
  • what do the 'c' and 'v' in argc and argv stand for?
  • Are the variables argc and argv are local to main?
  • What is the maximum combined length of command line arguments including the space between adjacent arguments?
  • If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
  • Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
  • What are bit fields? What is the use of bit fields in a Structure declaration?
  • To which numbering system can the binary number 1101100100111100 be easily converted to?
  • Which bit wise operator is suitable for checking whether a particular bit is on or off?
  • Which bit wise operator is suitable for turning off a particular bit in a number?
  • Which bit wise operator is suitable for putting on a particular bit in a number?
  • Which bit wise operator is suitable for checking whether a particular bit is on or off?
  • which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
  • Write a program to compare two strings without using the strcmp() function.
  • Write a program to concatenate two strings.
  • Write a program to interchange 2 variables without using the third one.
  • Write programs for String Reversal & Palindrome check
  • Write a program to find the Factorial of a number
  • Write a program to generate the Fibinocci Series
  • Write a program which employs Recursion
  • Write a program which uses Command Line Arguments
  • Write a program which uses functions like strcmp(), strcpy()? etc
  • What are the advantages of using typedef in a program?
  • How would you dynamically allocate a one-dimensional and two-dimensional array of integers?
  • How can you increase the size of a dynamically allocated array?
  • How can you increase the size of a statically allocated array?
  • When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
  • Which function should be used to free the memory allocated by calloc()?
  • How much maximum can you allocate in a single call to malloc()?
  • Can you dynamically allocate arrays in expanded memory?
  • What is object file? How can you access object file?
  • Which header file should you include if you are to develop a function which can accept variable number of arguments?
  • Can you write a function similar to printf()?
  • How can a called function determine the number of arguments that have been passed to it?
  • Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
  • How do you declare the following:
  • An array of three pointers to chars
  • An array of three char pointers
  • A pointer to array of three chars
  • A pointer to function which receives an int pointer and returns a float pointer
  • A pointer to a function which receives nothing and returns nothing
  • What do the functions atoi(), itoa() and gcvt() do?
  • Does there exist any other function which can be used to convert an integer or a float to a string?
  • How would you use qsort() function to sort an array of structures?
  • How would you use qsort() function to sort the name stored in an array of pointers to string?
  • How would you use bsearch() function to search a name stored in array of pointers to string?
  • How would you use the functions sin(), pow(), sqrt()?
  • How would you use the functions memcpy(), memset(), memmove()?
  • How would you use the functions fseek(), freed(), fwrite() and ftell()?
  • How would you obtain the current time and difference between two times?
  • How would you use the functions randomize() and random()?
  • How would you implement a substr() function that extracts a sub string from a given string?
  • What is the difference between the functions rand(), random(), srand() and randomize()?
  • What is the difference between the functions memmove() and memcpy()?
  • How do you print a string on the printer?
  • Can you use the function fprintf() to display the output on the screen?
  • What is an object?
  • What is the difference between an object and a class?
  • What is the difference between class and structure?
  • What is public, protected, private?
  • What are virtual functions?
  • What is friend function?
  • What is a scope resolution operator?
  • What do you mean by inheritance?
  • What is abstraction?
  • What is polymorphism? Explain with an example.
  • What is encapsulation?
  • What do you mean by binding of data and functions?
  • What is function overloading and operator overloading?
  • What is virtual class and friend class?
  • What do you mean by inline function?
  • What do you mean by public, private, protected and friendly?
  • When is an object created and what is its lifetime?
  • What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
  • Difference between realloc() and free?
  • What is a template?
  • What are the main differences between procedure oriented languages and object oriented languages?
  • What is R T T I ?
  • What are generic functions and generic classes?
  • What is namespace?
  • What is the difference between pass by reference and pass by value?
  • Why do we use virtual functions?
  • What do you mean by pure virtual functions?
  • What are virtual classes?
  • Does c++ support multilevel and multiple inheritance?
  • What are the advantages of inheritance?
  • When is a memory allocated to a class?
  • What is the difference between declaration and definition?
  • What is virtual constructors/destructors?
  • In c++ there is only virtual destructors, no constructors. Why?
  • What is late bound function call and early bound function call? Differentiate.
  • How is exception handling carried out in c++?
  • When will a constructor executed?
  • What is Dynamic Polymorphism?
  • Write a macro for swapping integers.

Questions - Java & Advanced Java

Frequently Asked Questions - Java & Advanced Java

  1. Can a main() method of class be invoked in another class?
  2. What is the difference between java command line arguments and C command  line arguments?
  3. What is the difference between == & .equals
  4. What is the difference between abstract class & Interface.
  5. What is singleton class & it's implementation.
  6. Use of static,final variable
  7. Examples of final class
  8. Difference between Event propagation & Event delegation
  9. Difference between Unicast & Multicast model
  10. What is a java bean
  11. What is synchronized keyword used for.
  12. What are the restrictions of an applet & how to make the applet access the local machines resources.
  13. What is reflect package used for & the methods of it.
  14. What is serialization used for
  15. Can methods be overloaded based on the return types ?
  16. Why do we need a finalze() method when Garbage Collection is there ?
  17. Difference between AWT and Swing compenents ?
  18. Is there any heavy weight component in Swings ?
  19. Can the Swing application if you upload in net, be compatible with your browser?
  20. What should you do get your browser compatible with swing  components?
  21. What are the methods in Applet ?
  22. When is init(),start() called ?
  23. When you navigate from one applet to another what are the methods called?
  24. What is the difference between Trusted and Untrusted Applet ?
  25. What is Exception ?
  26. What are the ways you can handle exception ?
  27. When is try,catch block used ?
  28. What is finally method in Exceptions ?
  29. What are the types of access modifiers ?
  30. What is protected and friendly ?
  31. What are the other modifiers ?
  32. Is synchronised modifier ?
  33. What is meant by polymorphism ?
  34. What is inheritance ?
  35. What is method Overloading ? What is this in OOPS ?
  36. What is method Overriding ? What is it in OOPS ?
  37. Does java support multi dimensional arrays ?
  38. Is multiple inheritance used in Java ?
  39. How do you send a message to the browser in JavaScript ?
  40. Does javascript support multidimensional arrays ?
  41. Is there any tool in java that can create reports ?
  42. What is meant by Java ?
  43. What is meant by a class ?
  44. What is meant by a method ?
  45. What are the OOPS concepts in Java ?
  46. What is meant by encapsulation ? Explain with an example
  47. What is meant by inheritance ? Explain with an example
  48. What is meant by polymorphism ? Explain with an example
  49. Is multiple inheritance allowed in Java ? Why ?
  50. What is meant by Java interpreter ?
  51. What is meant by JVM ?
  52. What is a compilation unit ?
  53. What is meant by identifiers ?
  54. What are the different types of modifiers ?
  55. What are the access modifiers in Java ?
  56. What are the primitive data types in Java ?
  57. What is meant by a wrapper class ?
  58. What is meant by static variable and static method ?
  59. What is meant by Garbage collection ?
  60. What is meant by abstract class
  61. What is meant by final class, methods and variables ?
  62. What is meant by interface ?
  63. What is meant by a resource leak ?
  64. What is the difference between interface and abstract class ?
  65. What is the difference between public private, protected and static
  66. What is meant by method overloading ?
  67. What is meant by method overriding ?
  68. What is singleton class ?
  69. What is the difference between an array and a vector ?
  70. What is meant by constructor ?
  71. What is meant by casting ?
  72. What is the difference between final, finally and finalize ?
  73. What is meant by packages ?
  74. What are all the packages ?
  75. Name 2 calsses you have used ?
  76. Name 2 classes that can store arbitrary number of objects ?
  77. What is the difference between java.applet.* and java.applet.Applet ?
  78. What is a default package ?
  79. What is meant by a super class and how can you call a super class ?
  80. What is anonymous class ?
  81. Name interfaces without a method ?
  82. What is the use of an interface ?
  83. What is a serializable interface ?
  84. How to prevent field from serialization ?
  85. What is meant by exception ?
  86. How can you avoid the runtime exception ?
  87. What is the difference between throw and throws ?
  88. What is the use of finally ?
  89. Can multiple catch statements be used in exceptions ?
  90. Is it possible to write a try within a try statement ?
  91. What is the method to find if the object exited or not ?
  92. What is meant by a Thread ?
  93. What is meant by multi-threading ?
  94. What is the 2 way of creating a thread ? Which is the best way and why?
  95. What is the method to find if a thread is active or not ?
  96. What are the thread-to-thread communcation ?
  97. What is the difference between sleep and suspend ?
  98. Can thread become a member of another thread ?
  99. What is meant by deadlock ?
  100. How can you avoid a deadlock ?
  101. What are the three typs of priority ?
  102. What is the use of synchronizations ?
  103. Garbage collector thread belongs to which priority ?
  104. What is meant by time-slicing ?
  105. What is the use of 'this' ?
  106. How can you find the length and capacity of a string buffer ?
  107. How to compare two strings ?
  108. What are the interfaces defined by Java.lang ?
  109. What is the purpose of run-time class and system class
  110. What is meant by Stream and Types ?
  111. What is the method used to clear the buffer ?
  112. What is meant by Stream Tokenizer ?
  113. What is serialization and de-serialisation ?
  114. What is meant by Applet ?
  115. How to find the host from which the Applet has originated ?
  116. What is the life cycle of an Applet ?
  117. How do you load an HTML page from an Applet ?
  118. What is meant by Applet Stub Interface ?
  119. What is meant by getCodeBase and getDocumentBase method ?
  120. How can you call an applet from a HTML file
  121. What is meant by Applet Flickering ?
  122. What is the use of parameter tag ?
  123. What is audio clip Interface and what are all the methods in it ?
  124. What is the difference between getAppletInfo and getParameterInfo ?
  125. How to communicate between applet and an applet ?
  126. What is meant by event handling ?
  127. What are all the listeners in java and explain ?
  128. What is meant by an adapter class ?
  129. What are the types of mouse event listeners ?
  130. What are the types of methods in mouse listeners ?
  131. What is the difference between panel and frame ?
  132. What is the default layout of the panel and frame ?
  133. What is meant by controls and types ?
  134. What is the difference between a scroll bar and a scroll panel.
  135. What is the difference between list and choice ?
  136. How to place a component on Windows ?
  137. What are the different types of Layouts ?
  138. What is meant by CardLayout ?
  139. What is the difference between GridLayout and GridBagLayout
  140. What is the difference between menuitem and checkboxmenu item.
    1. What is meant by vector class, dictionary class , hash table class,and property class ?
  141. Which class has no duplicate elements ?
  142. What is resource bundle ?
  143. What is an enumeration class ?
  144. What is meant by Swing ?
  145. What is the difference between AWT and Swing ?
  146. What is the difference between an applet and a Japplet
  147. What are all the components used in Swing ?
  148. What is meant by tab pans ?
  149. What is the use of JTree ?
  150. How can you add and remove nodes in Jtree.
  151. What is the method to expand and collapse nodes in a Jtree
  152. What is the use of JTable ?
  153. What is meant by JFC ?
  154. What is the class in Swing to change the appearance of the Frame in Runtime.
  155. How to reduce flicking in animation ?
  156. What is meant by Javabeans ?
  157. What is JAR file ?
  158. What is meant by manifest files ?
  159. What is Introspection ?
  160. What are the steps involved to create a bean ?
  161. Say any two properties in Beans ?
  162. What is persistence ?
  163. What is the use of beaninfo ?
  164. What are the interfaces you used in Beans ?
  165. What are the classes you used in Beans ?
  166. What is the diffrence between an Abstract class and Interface
  167. What is user defined exception ?
  168. What do you know about the garbate collector ?
  169. What is the difference between C++ & Java ?
  170. How do you communicate in between Applets & Servlets ?
  171. What is the use of Servlets ?
  172. In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?
  173. What is the difference between Process and Threads ?
  174. How will you initialize an Applet ?
  175. What is the order of method invocation in an Applet ?
  176. When is update method called ?
  177. How will you communicate between two Applets ?
  178. Have you ever used HashTable and Dictionary ?
  179. What are statements in JAVA ?
  180. What is JAR file ?
  181. What is JNI ?
  182. What is the base class for all swing components ?
  183. What is JFC ?
  184. What is Difference between AWT and Swing ?
  185. Considering notepad/IE or any other thing as process, What will Happen if you start notepad or IE 3 times? Where 3 processes are started or 3 threads are started ?
  186. How does thread synchronization occurs inside a monitor ?
  187. How will you call an Applet using a Java Script function ?
  188. Is there any tag in HTML to upload and download files ?
  189. Why do you Canvas ?
  190. How can you push data from an Applet to Servlet ?
  191. What are the benefits of Swing over AWT ?
  192. Where the CardLayout is used ?
  193. What is the Layout for ToolBar ?
  194. What is the difference between Grid and GridbagLayout ?
  195. How will you add panel to a Frame ?
  196. What is the corresponding Layout for Card in Swing ?
  197. What is light weight component ?
  198. What is bean ? Where it can be used ?
  199. What is difference in between Java Class and Bean ?
  200. What is the mapping mechanism used by Java to identify IDL language ?
  201. Diff between Application and Applet ?
  202. What is serializable Interface ?
  203. What is the difference between CGI and Servlet ?
  204. What is the use of Interface ?
  205. Why Java is not fully objective oriented ?
  206. Why does not support multiple Inheritance ?
  207. What it the root class for all Java classes ?
  208. What is polymorphism ?
  209. Suppose If we have variable ' I ' in run method, If I can create one or  More thread each thread will occupy a separate copy or same variable will be shared ?
  210. What is Constructor and Virtual function? Can we call Virtual
  211. Funciton in a constructor ?
  212. Why we use OOPS concepts? What is its advantage ?
  213. What is the difference in between C++ and Java ? can u explain in detail?
  214. What is the exact difference in between Unicast and Multicast object ? Where we will use ?
  215. How do you sing an Applet ?
  216. In a Container there are 5 components. I want to display the all  the components names, how will you do that one ?
  217. Why there are some null interface in java ? What does it mean ?
  218. Give me some null interfaces in JAVA ?
  219. Tell me the latest versions in JAVA related areas ?
  220. What is meant by class loader ? How many types are there? When will we use them ?
  221. What is meant by flickering ?
  222. What is meant by cookies ? Explain ?
  223. Problem faced in your earlier project
  224. How OOPS concept is achieved in Java
  225. Features for using Java
  226. How does Java 2.0 differ from Java 1.0
  227. Public static void main - Explain
  228. What are command line arguments
  229. Explain about the three-tier model
  230. Difference between String & StringBuffer
  231. Wrapper class. Is String a Wrapper Class
  232. What are the restriction for static method Purpose of the file class
  233. Default modifier in Interface
  234. Difference between Interface & Abstract class
  235. Can abstract be declared as Final
  236. Can we declare variables inside a method as Final Variables
  237. What is the package concept and use of package
  238. How can a dead thread be started
  239. Difference between Applet & Application
  240. Life cycle of the Applet
  241. Can Applet have constructors
  242. Differeence between canvas class & graphics class
  243. Explain about Superclass & subclass
  244. What is AppletStub
  245. Explain Stream Tokenizer
  246. What is the difference between two types of threads
  247. Checked & Unchecked exception
  248. Use of throws exception
  249. What is finally in exception handling  Vector class
  250. What will happen to the Exception object after exception handling
  251. Two types of multi-tasking
  252. Two ways to create the thread
  253. Synchronization
  254. I/O Filter
  255. Can applet in different page communicate with each other
  256. Why Java is not 100 % pure OOPS ? ( EcomServer )
  257. When we will use an Interface and Abstract class ?
  258. How to communicate 2 threads each other ?
  259. What is the difference between an Abstract class and Interface?
  260. What is user defined exception?
  261. What do you know about the garbage collector?
  262. What is the difference between java and c++?
  263. In an htm form I have a button which makes us to open another page in 15 seconds. How will you do that?
  264. What is the difference between process and threads?
  265. What is update method called?
  266. Have you ever used HashTable and Directory?
  267. What are statements in Java?
  268. What is a JAR file?
  269. What is JNI?
  270. What is the base class for all swing components?
  271. What is JFC?
  272. What is the difference between AWT and Swing?
  273. Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times ? Where three processes are started or three threads are started?
  274. How does thread synchronization occur in a monitor?
  275. Is there any tag in htm to upload and download files?
  276. Why do you canvas?
  277. How can you know about drivers and database information ?
  278. What is serialization?
  279. Can you load the server object dynamically? If so what are the 3 major steps involved in it?
  280. What is the layout for toolbar?
  281. What is the difference between Grid and Gridbaglayout?
  282. How will you add panel to a frame?
  283. Where are the card layouts used?
  284. What is the corresponding layout for card in swing?
  285. What is light weight component?
  286. Can you run the product development on all operating systems?
  287. What are the benefits if Swing over AWT?
  288. How can two threads be made to communicate with each other?
  289. What are the files generated after using IDL to java compiler?
  290. What is the protocol used by server and client?
  291. What is the functionability stubs and skeletons?
  292. What is the mapping mechanism used by java to identify IDL language?
  293. What is serializable interface?
  294. What is the use of interface?
  295. Why is java not fully objective oriented?
  296. Why does java not support multiple inheritance?
  297. What is the root class for all java classes?
  298. What is polymorphism?
  299. Suppose if we have a variable 'I' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
  300. What are virtual functions?
  301. Write down how will you create a Binary tree?
  302. What are the traverses in binary tree?
  303. Write a program for recursive traverse?
  304. What are session variable in servlets?
  305. What is client server computing?
  306. What is constructor and virtual function? Can we call a virtual function in a constructor?
  307. Why do we use oops concepts? What is its advantage?
  308. What is middleware? What is the functionality of web server?
  309. Why is java not 100% pure oops?
  310. When will you use an interface and abstract class?
  311. What is the exact difference in between Unicast and Multicast object? Where will it be used?
  312. What is the main functionality of the remote reference layer?
  313. How do you download stubs from Remote place?
  314. I want to store more than 10 objects in a remote server? Which methodology will follow?
  315. What is the main functionality of Prepared Statement?
  316. What is meant by Static query and Dynamic query?
  317. What are Normalization Rules? Define Normalization?
  318. What is meant by Servelet? What are the parameters of service method?
  319. What is meant by Session? Explain something about HTTP Session Class?
  320. In a container there are 5 components. I want to display all the component names, how will you do that?
  321. Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
  322. Tell some latest versions in JAVA related areas?
  323. What is meant by class loader? How many types are there? When will we use them?
  324. What is meant by flickering?
  325. What is meant by distributed application? Why are we using that in our application?
  326. What is the functionality of the stub?
  327. Explain about version control?
  328. Explain 2-tier and 3-tier architecture?
  329. What is the role of Web Server?
  330. How can we do validation of the fields in a project?
  331. What is meant by cookies? Explain the main features?
  332. Why java is considered as platform independent?
  333. What are the advantages of java over C++?
  334. How java can be connected to a database?
  335. What is thread?
  336. What is difference between Process and Thread?
  337. Does java support multiple inheritance? if not, what is the solution?
  338. What are abstract classes?
  339. What is an interface?
  340. What is the difference abstract class and interface?
  341. What are adapter classes?
  342. what is meant wrapper classes?
  343. What are JVM.JRE, J2EE, JNI?
  344. What are swing components?
  345. What do you mean by light weight and heavy weight components?
  346. What is meant by function overloading and function overriding?
  347. Does java support function overloading, pointers, structures, unions or linked lists?
  348. What do you mean by multithreading?
  349. What are byte codes?
  350. What are streams?
  351. What is user defined exception?
  352. In an htm page form I have one button which makes us to open a new page in 15 seconds. How will you do that?        

Advanced Java

  1. What is RMI?
  2. Explain about RMI Architecture?
  3. What are Servelets?
  4. What is the use of servlets?
  5. Explain RMI Architecture?
  6. How will you pass values from htm page to the servlet?
  7. How do you load an image in a Servelet?
  8. What is purpose of applet programming?
  9. How will you communicate between two applets?
  10. What IS the difference between Servelets and Applets?
  11. How do you communicate in between Applets and Servlets?
  12. What is the difference between applet and application?
  13. What is the difference between CGI and Servlet?
  14. In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify the same information whether it will connect to the database or it will be used previous information?
  15. What are the difference between RMI and Servelets?
  16. How will you call an Applet using Java Script Function?
  17. How can you push data from an Applet to a Servlet?
  18. What are 4 drivers available in JDBC? At what situation are four of the drivers used?
  19. If you are truncated using JDBC , how can you that how much data is truncated?
  20. How will you perform truncation using JDBC?
  21. What is the latest version of JDBC? What are the new features added in that?
  22. What is the difference between RMI registry and OS Agent?
  23. To a server method, the client wants to send a value 20, with this value exceeds to 20 a message should be sent to the client . What will you do for achieving this?
  24. How do you invoke a Servelet? What is the difference between doPost method and doGet method?
  25. What is difference between the HTTP Servelet and Generic Servelet? Explain about their methods and parameters?
  26. Can we use threads in Servelets?
  27. Write a program on RMI and JDBC using Stored Procedure?
  28. How do you swing an applet?
  29. How will you pass parameters in RMI? Why do you serialize?
  30. In RMI ,server object is first loaded into memory and then the stub reference is sent to the client. true or false?
  31. Suppose server object not loaded into the memory and the client request for it. What will happen?
  32. What is the web server used for running the servelets?
  33. What is Servlet API used for connecting database?
  34. What is bean? Where can it be used?
  35. What is the difference between java class and bean?
  36. Can we sent objects using Sockets?
  37. What is the RMI and Socket?
  38. What is CORBA?
  39. Can you modify an object in corba?
  40. What is RMI and what are the services in RMI?
  41. What are the difference between RMI and CORBA?
  42. How will you initialize an Applet?
  43. What is the order of method invocation in an Applet?
  44. What is ODBC and JDBC? How do you connect the Database?
  45. What do you mean by Socket Programming?
  46. What is difference between Generic Servlet and HTTP Servelet?
  47. What you mean by COM and DCOM?
  48. what is e-commerce?