Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

mcqoptions.com

mcqoptions.com Logo mcqoptions.com Logo

mcqoptions.com Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 481664
Next
In Process
Hrishikesh Bhai Loke
Hrishikesh Bhai Loke
Asked: 3 years ago2022-11-09T21:28:38+05:30 2022-11-09T21:28:38+05:30In: General Awareness

In a database there are two tables’CD’ and ‘TYPE’ as shown below :

                    Table : CD

CodeTitleDurationSingerCategory
101Sufi Songs50 minZakir Faiz12
102Eureka45 minShyama Mukherjee12
103Nagmey23 minSonvi kumar77
104Dosti35 minBobby1

                        Table : Type

CategoryDescription
1Jazz
12Classical
40Country Side
78Pop

(i) Name the Primary key in “CD” table.

(ii) Name the foreign key in “CD” table.

(iii) Write the Cardinality and Degree of “TYPE” table.

(iv) Check every value in CATEGORY column of both the tables. Do you find any discrepancy ? State the discrepancy.

(v) Write SQL statement to change the name of Singer “Sonvi Kumar” to “Sonvi Mehra” in all the places wherever it occurs in CD table.

(vi) Write MySQL statement to add a column “Music_Director” which datetype Varchar and size as 30 in the table “CD”.

(vii) Write command in SQL to display code, Title and corresponding description of all the CDs.

In a database there are two tables’CD’ and ‘TYPE’ as shown below :

                    Table : CD

CodeTitleDurationSingerCategory
101Sufi Songs50 minZakir Faiz12
102Eureka45 minShyama Mukherjee12
103Nagmey23 minSonvi kumar77
104Dosti35 minBobby1

                        Table : Type

CategoryDescription
1Jazz
12Classical
40Country Side
78Pop

(i) Name the Primary key in “CD” table.

(ii) Name the foreign key in “CD” table.

(iii) Write the Cardinality and Degree of “TYPE” table.

(iv) Check every value in CATEGORY column of both the tables. Do you find any discrepancy ? State the discrepancy.

(v) Write SQL statement to change the name of Singer “Sonvi Kumar” to “Sonvi Mehra” in all the places wherever it occurs in CD table.

(vi) Write MySQL statement to add a column “Music_Director” which datetype Varchar and size as 30 in the table “CD”.

(vii) Write command in SQL to display code, Title and corresponding description of all the CDs.

Parabola
  • 0
  • 11
  • 0
  • 0
  • 0
    • Report
  • Share
    • Share on Facebook
    • Share on Twitter
    • Share on LinkedIn
    • Share on WhatsApp
Leave an answer

Leave an answer
Cancel reply

Browse

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 5f76e
    2022-11-02T06:19:34+05:30Added an answer about 3 years ago

    (i) Code

    (ii) Category

    (iii) Cardinality : 4 Degree : 2

    (iv) Category 77 is not present in Category table. R-eferential integrity doesn’t exist.

    (v) UPDATE CD SET Singer=’Sonvi Mehra’ where Singer like ‘Sonvi kumar’;

    (vi) ALTER TABLE CD ADD COLUMN Music _Director Varchar(30);

    (vii) SELECT CODE, TITLE, DESCRIPTION FROM CD, TYPE WHERE CD.CATEGORY = TYPE CATEGORY;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 393k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Aditi Dugal

    How to approach applying for a job at a company ...

    • 7 Answers
  • Raghavan Prasad Hayer

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Ankita Dinesh Biswas

    What is a programmer’s life like?

    • 5 Answers
  • 47e0c
    47e0c added an answer Correct Answer - Increasing the yield of animals and improving… November 12, 2022 at 9:56 am
  • b6699
    b6699 added an answer Sender\'s addressDateReceivers name and addressSubjectContentYours faithfullyName November 12, 2022 at 9:56 am
  • 10eb8
    10eb8 added an answer Any uncertinity in measurment is known as errorDifference in true… November 12, 2022 at 9:56 am

Related Questions

  • The units of length, velocity and force are doubled. Which ...

    • 1 Answer
  • The penetration of light into the region of geometrical shadow ...

    • 1 Answer
  • if ` veca , vecb ,vecc ` are three vectors ...

    • 1 Answer
  • What is the value of isothermal bulk modulus of elasticity ...

    • 1 Answer
  • निम्न में से किस अणु का सेवाधिक द्विध्रुव आघूर्ण है ...

    • 1 Answer

Top Members

Trending Tags

Class 11 Parabola Polity Polynomials Probability Projectile Protists Quadrilaterals Rario Reasoning Sampling Social Solutions Spectroscopy Switchgear Thermodynamic Tourism Transients Upsc Wbjee

Explore

  • Home
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Tags
  • Badges
  • Users

Footer

mcqoptions.com

About

MCQOptions.com

Here are the top interview questions, example answers, tips for giving the best response.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Follow

© 2022 MCQOptions. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.