<div class=”entry-content” style=”height: auto !important;”><h2><span style=”color: #00ccff;”>NCERT Solutions for Class 12 Computer Science (C++) – Database Concepts</span></h2>
<p style=”text-align: center;”><span style=”color: #0000ff;”><strong>Short Answer Type Questions-I</strong></span></p>
<p><span style=”color: #eb4924;”><strong>Question 1:</strong></span><br>
What is relation? Define the relational data model.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
A relation is a table having atomic values, unique row and unordered rows and columns. The relational mode represent data and relationship among data by a collection of tables known as relation, each of which has a number of columns with unique names.</p><div class=”code-block code-block-1″ style=”margin: 8px 0; clear: both;”>
<script async=”” src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js” type=”text/javascript”></script>
<ins class=”adsbygoogle” style=”display: block; height: 280px;” data-ad-client=”ca-pub-7398766921532682″ data-ad-slot=”8094000682″ data-ad-format=”auto” data-adsbygoogle-status=”done” data-ad-status=”filled”><div id=”aswift_1_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;” tabindex=”0″ title=”Advertisement” aria-label=”Advertisement”><iframe id=”aswift_1″ name=”aswift_1″ style=”left:0;position:absolute;top:0;border:0;width:750px;height:280px;” sandbox=”allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation” width=”750″ height=”280″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″ allowtransparency=”true” scrolling=”no” src=”https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-7398766921532682&output=html&h=280&slotname=8094000682&adk=2916952469&adf=4186660919&pi=t.ma~as.8094000682&w=750&fwrn=4&fwrnh=100&lmt=1670607913&rafmt=1&format=750×280&url=https%3A%2F%2Fwww.cbsetuts.com%2Fncert-solutions-class-12-computer-science-c-database-concepts%2F&fwr=0&rpe=1&resp_fmts=3&wgl=1&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTA4LjAuNTM1OS4xMjUiLFtdLGZhbHNlLG51bGwsIjY0IixbWyJOb3Q_QV9CcmFuZCIsIjguMC4wLjAiXSxbIkNocm9taXVtIiwiMTA4LjAuNTM1OS4xMjUiXSxbIkdvb2dsZSBDaHJvbWUiLCIxMDguMC41MzU5LjEyNSJdXSxmYWxzZV0.&dt=1672585722018&bpp=2&bdt=719&idt=497&shv=r20221207&mjsv=m202212050101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D70877dca39d7cee1-22c4db3411d900f8%3AT%3D1672348851%3ART%3D1672348851%3AS%3DALNI_MYJDyG_bu32YHEUMIGJIo2bVt3_WQ&gpic=UID%3D00000b9a5c88ec58%3AT%3D1672348851%3ART%3D1672575613%3AS%3DALNI_Mb87E1-6Z_pG79EP2w2fRKpjdy0KA&prev_fmts=0x0&nras=1&correlator=5377455255891&frm=20&pv=1&ga_vid=540223204.1672348852&ga_sid=1672585722&ga_hid=1567542694&ga_fc=1&u_tz=330&u_his=12&u_h=768&u_w=1366&u_ah=728&u_aw=1366&u_cd=24&u_sd=1&dmc=4&adx=105&ady=654&biw=1349&bih=657&scr_x=0&scr_y=0&eid=44759875%2C44759926%2C44759837%2C42531847%2C31071168%2C44780792&oid=2&pvsid=3791229334384862&tmod=1209859931&uas=0&nvt=1&ref=https%3A%2F%2Fwww.learncbse.in%2F&eae=0&fc=1920&brdim=0%2C0%2C0%2C0%2C1366%2C0%2C1366%2C728%2C1366%2C657&vis=1&rsz=%7C%7CeE%7C&abl=CS&pfx=0&fu=128&bc=31&ifi=2&uci=a!2&fsb=1&xpc=lEhTvl6Wkp&p=https%3A//www.cbsetuts.com&dtd=517″ data-google-container-id=”a!2″ data-google-query-id=”CIf84a7TpvwCFXtVDwId99QN0Q” data-load-complete=”true”></iframe></div></ins>
<script type=”text/javascript”>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
<p><span style=”color: #eb4924;”><strong>Question 2:</strong></span><br>
What are all the domain names possible in gender ?<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Male and Female.</p>
<p><span style=”color: #eb4924;”><strong>Question 3:</strong></span><br>
Give a suitable example of a table with sample data and illustrate Primary and Candidate Keys in it.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
A table may have more than one such attribute/ group of attribute that identifies a row/tuple uniquely, all such attribute(s) are known as Candidate Keys. Out of the Candidate keys, one is selected as Primary Key,</p>
<p><span style=”color: #eb4924;”><strong>Question 4:</strong></span><br>
Differentiate between cardinality and degree of a table with the help of an example.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Cardinality is defined as the number of rows in table.<br>
Degree is the number of columns in a table,<br>
eg: Consider the following tables<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59948″ src=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4.png?resize=359%2C173&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4″ width=”359″ height=”173″ srcset=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4.png?w=359&ssl=1 359w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4.png?resize=300%2C145&ssl=1 300w” sizes=”(max-width: 359px) 100vw, 359px”><br>
<img loading=”lazy” class=”alignnone size-full wp-image-59949″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-1.png?resize=430%2C304&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-1″ width=”430″ height=”304″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-1.png?w=430&ssl=1 430w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-1.png?resize=300%2C212&ssl=1 300w” sizes=”(max-width: 430px) 100vw, 430px”><br>
<strong>(1 Mark for writing suitable example/correct definition of a table)</strong><br>
<strong>(½ Mark for correct illustration/definition of Candidate Keys)</strong><br>
<strong>(½ Mark for correct illustration/definition of Primary Key)</strong><br>
Cardinality of Account table is : 3<br>
Degree of Account table is : 2<br>
<strong>[½ mark each for definition of cardinality and degree]</strong><br>
<strong>[1 mark for correct demonstration using example]</strong></p><div class=”google-auto-placed ap_container” style=”width: 100%; height: auto; clear: both; text-align: center;”><ins data-ad-format=”auto” class=”adsbygoogle adsbygoogle-noablate” data-ad-client=”ca-pub-7398766921532682″ data-adsbygoogle-status=”done” style=”display: block; margin: auto; background-color: transparent; height: 280px;” data-ad-status=”filled”><div id=”aswift_4_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;” tabindex=”0″ title=”Advertisement” aria-label=”Advertisement”><iframe id=”aswift_4″ name=”aswift_4″ style=”left:0;position:absolute;top:0;border:0;width:750px;height:280px;” sandbox=”allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation” width=”750″ height=”280″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″ allowtransparency=”true” scrolling=”no” src=”https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-7398766921532682&output=html&h=280&adk=2523109437&adf=1164200656&pi=t.aa~a.3071249423~i.11~rp.4&w=750&fwrn=4&fwrnh=100&lmt=1670607913&num_ads=1&rafmt=1&armr=3&sem=mc&pwprc=6908628465&ad_type=text_image&format=750×280&url=https%3A%2F%2Fwww.cbsetuts.com%2Fncert-solutions-class-12-computer-science-c-database-concepts%2F&fwr=0&pra=3&rh=188&rw=750&rpe=1&resp_fmts=3&wgl=1&fa=27&adsid=ChEIgPvEnQYQ7oKUkIGo7bvHARI9AMmKl4n0GdZYk0XDFqDEz9QKuXb0yJYYYJI0xt7_bIVBKmXuf-FbofS3EeRxWkLcbxWUsr6A96oQFioSYA&uach=WyJXaW5kb3dzIiwiMTAuMC4wIiwieDg2IiwiIiwiMTA4LjAuNTM1OS4xMjUiLFtdLGZhbHNlLG51bGwsIjY0IixbWyJOb3Q_QV9CcmFuZCIsIjguMC4wLjAiXSxbIkNocm9taXVtIiwiMTA4LjAuNTM1OS4xMjUiXSxbIkdvb2dsZSBDaHJvbWUiLCIxMDguMC41MzU5LjEyNSJdXSxmYWxzZV0.&dt=1672585723710&bpp=4&bdt=2410&idt=5&shv=r20221207&mjsv=m202212050101&ptt=9&saldr=aa&abxe=1&cookie=ID%3D70877dca39d7cee1-22c4db3411d900f8%3AT%3D1672348851%3ART%3D1672348851%3AS%3DALNI_MYJDyG_bu32YHEUMIGJIo2bVt3_WQ&gpic=UID%3D00000b9a5c88ec58%3AT%3D1672348851%3ART%3D1672575613%3AS%3DALNI_Mb87E1-6Z_pG79EP2w2fRKpjdy0KA&prev_fmts=0x0%2C750x280%2C300x600&nras=2&correlator=5377455255891&frm=20&pv=1&ga_vid=540223204.1672348852&ga_sid=1672585722&ga_hid=1567542694&ga_fc=1&u_tz=330&u_his=12&u_h=768&u_w=1366&u_ah=728&u_aw=1366&u_cd=24&u_sd=1&dmc=4&adx=105&ady=2109&biw=1349&bih=657&scr_x=0&scr_y=0&eid=44759875%2C44759926%2C44759837%2C42531847%2C31071168%2C44780792&oid=2&pvsid=3791229334384862&tmod=1209859931&uas=3&nvt=1&ref=https%3A%2F%2Fwww.learncbse.in%2F&eae=0&fc=1408&brdim=0%2C0%2C0%2C0%2C1366%2C0%2C1366%2C728%2C1366%2C657&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=128&bc=31&ifi=5&uci=a!5&btvi=2&fsb=1&xpc=w0roB82lTZ&p=https%3A//www.cbsetuts.com&dtd=93″ data-google-container-id=”a!5″ data-google-query-id=”CNiKp6_TpvwCFVlKDwIdtQwFXA” data-load-complete=”true”></iframe></div></ins></div>
<p><span style=”color: #eb4924;”><strong>Question 5:</strong></span><br>
Observe the following table carefully and write the names of the most appropriate columns, which can be considered as (i) candidate keys and (ii) primary key.<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59950″ src=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-5.png?resize=788%2C204&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-5″ width=”750″ height=”194″ srcset=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-5.png?w=788&ssl=1 788w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-5.png?resize=300%2C78&ssl=1 300w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-5.png?resize=768%2C199&ssl=1 768w” sizes=”(max-width: 788px) 100vw, 788px”><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Candidate keys : Id, Product<br>
Primary keys: Id<br>
<strong>(1 Mark for writing correct Candidate keys)</strong><br>
<strong>(1 Mark for writing correct Primary key)</strong></p><div class=”google-auto-placed ap_container” style=”width: 100%; height: auto; clear: both; text-align: center;”><ins data-ad-format=”auto” class=”adsbygoogle adsbygoogle-noablate” data-ad-client=”ca-pub-7398766921532682″ data-adsbygoogle-status=”done” style=”display: block; margin: auto; background-color: transparent; height: 280px;”><div id=”aswift_5_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;”></div></ins></div>
<p style=”text-align: left;”><strong>Note : No marks to be deducted for mentioning Price and/or Transaction Date as additional candidate keys. </strong></p>
<p><span style=”color: #eb4924;”><strong>Question 6:</strong></span><br>
Observe the following table carefully and write the names of the most appropriate columns, which can be considered as (i) candidate keys and (ii) primary key :<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59951″ src=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-6.png?resize=721%2C204&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-6″ width=”721″ height=”204″ srcset=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-6.png?w=721&ssl=1 721w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-6.png?resize=300%2C85&ssl=1 300w” sizes=”(max-width: 721px) 100vw, 721px”><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Candidate keys : Code, Item Primary keys : Code<br>
<strong>(1 Mark for writing correct Candidate keys)</strong><br>
<strong>(1 Mark for writing correct Primary key)</strong><br>
<strong>Note : No marks to be deducted for mentioning Price and/or Transaction Date as additional candidate keys.</strong></p><div class=”google-auto-placed ap_container” style=”width: 100%; height: auto; clear: both; text-align: center;”><ins data-ad-format=”auto” class=”adsbygoogle adsbygoogle-noablate” data-ad-client=”ca-pub-7398766921532682″ data-adsbygoogle-status=”done” style=”display: block; margin: auto; background-color: transparent; height: 280px;”><div id=”aswift_6_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;”></div></ins></div>
<p><span style=”color: #eb4924;”><strong>Question 7:</strong></span><br>
Define degree and cardinality. Based upon given table write degree and cardinality.<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59952″ src=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-7.png?resize=444%2C256&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-7″ width=”444″ height=”256″ srcset=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-7.png?w=444&ssl=1 444w, https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-7.png?resize=300%2C173&ssl=1 300w” sizes=”(max-width: 444px) 100vw, 444px”><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Degree is the number of attributes or columns present in a table.<br>
Cardinality is the number of tuples or rows present in a table.<br>
Patients Degree = 4<br>
<strong>[½ mark for each correct definition]</strong><br>
Cardinality = 5<br>
<strong>[ ½ mark for each correct answer]</strong></p><div class=”google-auto-placed ap_container” style=”width: 100%; height: auto; clear: both; text-align: center;”><ins data-ad-format=”auto” class=”adsbygoogle adsbygoogle-noablate” data-ad-client=”ca-pub-7398766921532682″ data-adsbygoogle-status=”done” style=”display: block; margin: auto; background-color: transparent; height: 280px;”><div id=”aswift_7_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;”></div></ins></div>
<p><span style=”color: #eb4924;”><strong>Question 8:</strong></span><br>
Differentiate between the Primary key and Alternate key of a table with the help of an example.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Primary Key – A primary key is a value that can be used to identify a unique row in a table .<br>
Alternate Key – An alternate key is any candidate key which is not selected to be the primary key.<br>
Example:<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59953″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-8.png?resize=450%2C184&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-8″ width=”450″ height=”184″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-8.png?w=450&ssl=1 450w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-8.png?resize=300%2C123&ssl=1 300w” sizes=”(max-width: 450px) 100vw, 450px” data-recalc-dims=”1″><br>
So, (Bank Account Number, Aadhaar Number) is a candidate key for the table.<br>
Aadhaar Number ” Primary key<br>
Bank Account Number ” Alternate Key</p><div class=”google-auto-placed ap_container” style=”width: 100%; height: auto; clear: both; text-align: center;”><ins data-ad-format=”auto” class=”adsbygoogle adsbygoogle-noablate” data-ad-client=”ca-pub-7398766921532682″ data-adsbygoogle-status=”done” style=”display: block; margin: auto; background-color: transparent; height: 280px;”><div id=”aswift_8_host” style=”border: none; height: 280px; width: 750px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;”></div></ins></div>
<p><span style=”color: #eb4924;”><strong>Question 9:</strong></span><br>
Explain the concept of candidate keys with the help of an appropriate example.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Candidate key is a column or set of columns that can help in identifying records uniquely.<br>
Example,consider a Table STUDENT<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59954″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-9.png?resize=513%2C158&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-9″ width=”513″ height=”158″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-9.png?w=513&ssl=1 513w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-9.png?resize=300%2C92&ssl=1 300w” sizes=”(max-width: 513px) 100vw, 513px” data-recalc-dims=”1″><br>
Here, AdminN0 <strong> </strong>& Roll N0 define Table uniquely.<br>
Hence, they are candidate keys.</p>
<p><span style=”color: #eb4924;”><strong>Questi</strong></span><span style=”color: #eb4924;”><strong>on 10:</strong></span><br>
A table ‘customer’ has 10 columns but no row. Later, 10 new rows are inserted and 3 rows are deleted in the table. What is the degree and cardinality of the table customer<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Degree = 10[no.of cols]<br>
Cardinality = 10-3=7[no.of rows]</p>
<p><span style=”color: #eb4924;”><strong>Question 11:</strong></span><br>
A table ‘student’ has 3 columns and 10 rows and another table ‘student 2’ has the same number of columns and 15 rows. 5 rows are common in both the tables. If we take union, what is the degree and cardinality of the resultant table ?<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Degree-3<br>
Cardinality – 30 = (20 + 15-5)</p>
<p><span style=”color: #eb4924;”><strong>Question 12:</strong></span><br>
A table ‘studentl’ has 4 columns and 10 rows and table ‘student 2’ has 5 columns and 5 rows.If we take cartesian product of these two tables,what is the degree and cardinally of the resultant table?<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Degree-4 ×5=20[no.of columns]<br>
Cardinally – 10×5 = 50 [no.of rows]</p>
<p><span style=”color: #eb4924;”><strong>Question 13:</strong></span><br>
Observe the following table and answer the parts (i) and (ii) :<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59955″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-13.png?resize=448%2C231&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-13″ width=”448″ height=”231″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-13.png?w=448&ssl=1 448w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-13.png?resize=300%2C155&ssl=1 300w” sizes=”(max-width: 448px) 100vw, 448px” data-recalc-dims=”1″></p>
<ol>
<li>In the above table, can we have Qty as primary key.[Answer as yes/no]. Justify your answer.</li>
<li> What is the cardinality and degree of the above table ?</li>
</ol>
<p style=”text-align: left;”><strong><span style=”color: #008000;”>Аnswer:</span></strong></p>
<ol>
<li style=”text-align: left;”>We cannot use Qty as primary key because there is dulication of values and primary key value cannot be duplicate.</li>
<li style=”text-align: left;”>Degree = 4</li>
</ol>
<p><strong>[1/2 mark for each correct definition]</strong><br>
Cardinity = 5<br>
<strong>[1/2 mark for each correct definition]</strong></p>
<p><span style=”color: #eb4924;”><strong>Question 14:</strong></span><br>
What do you understand by Union & Cartesian product in the relational algebra ?<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong></p>
<p>Union of R and S : The Union of two relations is a relation that includes all the tuples that are either in R or in S or in both R and S. Duplicate tuples are eliminated.<br>
<strong>Cartesian Product:</strong> The Cartesian Product is an operator which works on two sets. It combines the tuples of one relation with all the tuples of the other relation.<br>
Example: Cartesian Product<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59956″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14.png?resize=978%2C245&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14″ width=”978″ height=”245″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14.png?w=978&ssl=1 978w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14.png?resize=300%2C75&ssl=1 300w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14.png?resize=768%2C192&ssl=1 768w” sizes=”(max-width: 978px) 100vw, 978px” data-recalc-dims=”1″><br>
The Union is an operator which works on two sets. It combines the tuples of one relation with all the tuples of the other relation such that there is no duplication.<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59959″ src=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-1.png?resize=433%2C339&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-1″ width=”433″ height=”339″ srcset=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-1.png?w=433&ssl=1 433w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-1.png?resize=300%2C235&ssl=1 300w” sizes=”(max-width: 433px) 100vw, 433px” data-recalc-dims=”1″></p>
<p><span style=”color: #eb4924;”><strong>Question 15:</strong></span><br>
Explain the concept of union between two tables, with the help of appropriate example.<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
The union operation denoted by ‘U’ combines two or more relations. The resultant of union operation contain tuples that are in either of the table or in both tables.<br>
For example :</p>
<p><img loading=”lazy” class=”alignnone size-full wp-image-59961″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-2.png?resize=405%2C479&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-2″ width=”405″ height=”479″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-2.png?w=405&ssl=1 405w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-14-2.png?resize=254%2C300&ssl=1 254w” sizes=”(max-width: 405px) 100vw, 405px” data-recalc-dims=”1″></p>
<p><span style=”color: #eb4924;”><strong>Question 16:</strong></span><br>
In the following 2 tables, find the union value of Student 1 and Student 2.<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59964″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16.png?resize=446%2C202&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16″ width=”446″ height=”202″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16.png?w=446&ssl=1 446w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16.png?resize=300%2C136&ssl=1 300w” sizes=”(max-width: 446px) 100vw, 446px” data-recalc-dims=”1″><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
The resultant table is<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59966″ src=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16-1.png?resize=330%2C185&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16-1″ width=”330″ height=”185″ srcset=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16-1.png?w=330&ssl=1 330w, https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-16-1.png?resize=300%2C168&ssl=1 300w” sizes=”(max-width: 330px) 100vw, 330px” data-recalc-dims=”1″></p>
<p><span style=”color: #eb4924;”><strong>Question 17:</strong></span><br>
Observe the table ‘Club’ given below :<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59968″ src=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-17.png?resize=441%2C189&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-17″ width=”441″ height=”189″ srcset=”https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-17.png?w=441&ssl=1 441w, https://i1.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-17.png?resize=300%2C129&ssl=1 300w” sizes=”(max-width: 441px) 100vw, 441px” data-recalc-dims=”1″></p>
<ol>
<li>What is the cardinality and degree of the above given table ?</li>
<li>If a new column contact_no has been added and three more members have joined the club then how these chages will affect the degree and cardinality of the above given table.</li>
</ol>
<p><strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Cadinality: 4<br>
Degree: 5<br>
<strong>(1/2 Mark for each correct answer)</strong><br>
2. Cadinality: 7<br>
Degree: 6<br>
<strong>(1/2 Mark for each correct answer)</strong></p>
<p><span style=”color: #eb4924;”><strong>Question 18:</strong></span><br>
In which situation can we apply union operation of two table ?<br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Each table in the UNION</p>
<ol>
<li>should have the same number of columns</li>
<li>similar data types</li>
<li>columns must be in the same order [2]</li>
</ol>
<p> </p>
<p style=”text-align: center;”><span style=”color: #0000ff;”><strong>Short Answer Type Questions – II</strong></span></p>
<p><span style=”color: #eb4924;”><strong>Question 1:</strong></span><br>
Observe the following STUDENTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in LIST. Also, find the Degree and Cardinality of the LIST.<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59971″ src=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-18.png?resize=899%2C442&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-18″ width=”899″ height=”442″ srcset=”https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-18.png?w=899&ssl=1 899w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-18.png?resize=300%2C147&ssl=1 300w, https://i0.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-18.png?resize=768%2C378&ssl=1 768w” sizes=”(max-width: 899px) 100vw, 899px” data-recalc-dims=”1″><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Cartesian Product<br>
Degree = 4<br>
Cardinality = 6</p>
<p><span style=”color: #eb4924;”><strong>Question 2:</strong></span><br>
Observe the following PARTICIPANTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in RESULT. Also, find the Degree and Cardinality of the<br>
<img loading=”lazy” class=”alignnone size-full wp-image-59972″ src=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-2.png?resize=899%2C374&ssl=1″ alt=”ncert-solutions-for-class-12-computer-science-c-database-concepts-4-2″ width=”899″ height=”374″ srcset=”https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-2.png?w=899&ssl=1 899w, https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-2.png?resize=300%2C125&ssl=1 300w, https://i2.wp.com/www.cbsetuts.com/wp-content/uploads/2017/12/ncert-solutions-for-class-12-computer-science-c-database-concepts-4-2.png?resize=768%2C320&ssl=1 768w” sizes=”(max-width: 899px) 100vw, 899px” data-recalc-dims=”1″><br>
<strong><span style=”color: #008000;”>Аnswer:</span></strong><br>
Degree = no of columns = 4<br>
Cartesian Product<br>
Cardinality = no. of rows = 6</p>
<p><a class=”button-red” title=”NCERT Solutions Home Page” href=”http://www.learncbse.in/ncert-solutions-2/”>NCERT Solutions</a><a class=”button-blue” title=”NCERT Solutions for Class 12 Computer Science (C++)” href=”http://www.learncbse.in/ncert-solutions-class-12-computer-science-c/”>Computer science</a><a class=”button-blue” title=”NCERT Solutions for Class 12 English” href=”http://www.learncbse.in/ncert-solutions-for-class-12-english/”>English</a><a class=”button-blue” title=”NCERT Solutions for Class 12 Hindi” href=”http://www.learncbse.in/ncert-solutions-class-12-hindi-core/”>Hindi</a><a class=”button-blue” title=”NCERT Solutions for Class 12 Humanities” href=”http://www.learncbse.in/cbse-class-12-humanities/”>Humanities</a><a class=”button-blue” title=”NCERT Solutions for Class 12 Commerce” href=”http://www.learncbse.in/cbse-class-12-commerce/”>Commerce</a><a class=”button-red” title=”CBSE Class 12 Science” href=”http://www.learncbse.in/cbse-class-12-science/”>Science</a></p>
</div>