Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
General Awareness
→
IIT JEE in General Awareness
→
Differentiate between Alternate key and Candidate...
1.
Differentiate between Alternate key and Candidate key.
Answer»
Alternate Key
Candidate Key
A key that can act as a primary key but is not selected as primary key
A key that can be set as Primary key is called a candidate key.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Consider the table given below :SalespersonSalespersonNameAgeSalary1Ajay611400002Sunil34440003Chris34400004Amaaya4152000OrdersOrdersSalespersonIDAmount1025400020718000(i) The column in the "Salesperson"table is the ................. KEY. The SalespersonId column in the "Orders" table is a .................. KEY.(ii) Can the 'Salespersonld' be set as the primary key in table 'Orders'. Give reason.
Write one similarity and one difference between CHAR and VARCHAR data types.
Mrs. Sharma is the class teacher of Class 'XII A'. She wants to create a table 'Student' to store details of her class. (i) Which of the following can be the attributes of Student table?(a) RollNo(b) "Amit"(c) Name(d) 25(ii) Name the Primary key of the table'Student'. State reason for choosing it.
An attribute A of datatype varchar(20) has the value "Amit" The attribute B of datatype char(20) has value "Karanita". How many characters are occupied in attribute A? How many characters are occupied in attribute B?
Srishti has created the following table with the name'Veterinary'. Column NameConstraint Animalld Primary Key VaccinationDateAnimalNameNot NullOwnerNameOne of the rows inserted is as follows :AnimalldVaccinationDateAnimalNameStoreldA1012015-02-12SheruAmit Sharma(i) What are the data type of columns Animalld and Vaccination Date in the table Veterinary ?(ii) Srishti is now trying to insert the following row :AnimalldVaccinationDateAnimalNameOwnerNameA1022015-08-09NULLAbhimanyu ShahWill she be able to successfully insert it ? Give reason.
Write commands in SQL for (i) and (ii) and output for (iii) given below :(i) To displays client names of clients, their phone numbers, partyId, and party decription who will have number of guests more than 50 for their parties.(ii) To displays Client Ids, their addresses, number of guests of those client who have 'Adarsh' anywhere in their addresses.ClientIdClientIdNameAddressPhoneNo of GuestsPartyIdSELECT Clientld, ClientName, NoofGuests, Description, Costperperson, From Client, Party WHERE Client.ParyId =Party.Partyld AND NoofGuests BETWEEN 50 AND 100;
What is "SQL"?
Consider the tables given below which are linked with each other and maintains referential integrity : Table: SAPSAPIDItemCodeItemNameItemStoragelocationS10011001ReceiverW12-B3-R24S10021002TransponderW13-B7-R87S10031003Battery BankW21-B1-R87S10041004InverterW21-B11-R2S10051005GensetW22-B15-R16 Table: StoreStoreIDItemCodeStorelocationReceivedDate12011001Hauz Khas2016/05/2012021002Rajouri Garden2016/06/1412041003Rohini2016/05/0612051004Hauz Khaas2016/07/1512061005Rajendra Place2016/05/27With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below:(0 To display the ItemCode, ItemName and ReceivedDate of all the items.(ii) To display SAPID, ItemName, ItemStoragelocation of all the items whose Receiveddate is after 2nd May 2016.(iii) SELECT sa.SAPID,ItemName, STOREID FROM SAP sa, Store st WHERE sa.ItemCode=st.ItemCode AND Storelocation = "Hauz Khas".
Consider the tables given below.SalespersonIdNameAgeSalary1Aiay611400002Sunil34440005Chris34400007Amaaya4152000 OrdersOrderIDSalespersonlDAmount10254000207180003014600040524000With reference to the above given tables, (is 86b) Write commands in SQL for (i) and (ii) and output for (iii) below :(i) To display SalespersonlD, names, orderids and order Amount of all salespersons.(ii) To display Names, salespersonslD and Order ID of those sales persons whose names start with A and sales amount is between 15000 and 20000.(iii) SELECT SalespersonlD, Name, Age, Amount FROM Salesperson, Orders WHERE Salesperson. SalespersonlD= Orders. SalespersonlD and Age between 30 and 45;
Consider the tables'Flights' & 'Fares' given below: Table: FLIGHTSFLCODESOURCEDESTINATIONNO_STOPSNO_FLIGHTSIC3O1MumbaiBangalore32IC799BangaloreKolkata83MC101DelhiVaranasi60IC3O2MumbaiKochi14AM812LucknowDelhi40MU499DelhiChennai33 Table: FARESFNOAIRLINESFARETAXIC301Indian Airlines942551C799Spice Jet884610MC101Deccan Airlines42107IC302Jet Airways138945AM1812Indian Airlines45006MU499Sahara120004With reference to these tables, write commands in SQL for (i) and (ii) and output for (iii) below:(i) To display flight number source, airlines of those flights where fare is less than Rs. 10000.(ii) To count total no of Indian Airlines flights starting from various cities.(iii) SELECT FLIGFITS.FNO, NO_OF_FL, AIRLINES FROM FLIGHTS,FARES WHERE FLIGHTS. FNO = FARES.FNO AND SOURCE='DELHI';
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies