Thursday, January 30, 2020

Bollywood Film Essay Example for Free

Bollywood Film Essay The development of technology has caused various changes in the different aspects of the society. One of the most observable modifications is in terms of the source of entertainment for most people. Nowadays, majority of the people are interested in watching movies. They tend to get the satisfaction out of looking at actors and actresses play various roles. Motion pictures also portray different themes that could be focused on romance, actions, horror, science fiction, and others. The clamor for movies also paved the way for the success and popularity of numerous thespians such as those in Bollywood. Bollywood usually make movies that feature the concept of Scopophilia, which literally means the â€Å"love of watching. † This term is also synonymous with voyeurism that pertains to the experience of sexual gratification by means of observing other people in secret. Most of the time, the object of such kind of desire is someone who is undressed or engaged in a sexual activity. The main idea in the concept of scopophilia is that the one who is looking or peeping does not interact with the person being observed. In the same manner that movie-viewing also adheres to such practice because the audience watches the activities of the people on the screen, who are unaware that they are being observed. Most of the time, filmmakers would use erotic scenes in order to satisfy the sense of scopophilia within a person. However, they could get around it by featuring a chaste woman in the plot of the story. In this sense, the filmmakers are actually creating a balance between a woman who easily engages in sexual activity and another female who represents the conservative value of being chaste. This is greatly observable in Shri 420, wherein it shows two women that were linked with the main character Raj, Vidya the virtuous woman and Maya the sultry temptress. The film shows erotic scenes especially those involving Maya. Nevertheless, they were able to get away with it because of the argument that these scenes are important in order to show the difference of Maya from Vidya. As such, erotic scenes were perceived to have an important purpose in the plot of the story to be able to distinguish the kinds of women that exist. This also symbolizes the difference of the good and the bad that is shown in the movie, wherein Raj was with Vidya when he was still living a morally upright life but later on tempted by Maya when he was already engaged in illegal activities. The discussions above show that scopophilia is actually the main idea behind the very nature of movie-watching. Filmmakers usually use erotic scenes in order to satisfy this kind of desire within a person. Nevertheless, erotic scenes also have an important part in the movie as it tends to distinguish the upright life from the unethical one by using women as examples.

Monday, January 27, 2020

Chemical Tests for Biomolecules

Chemical Tests for Biomolecules Kaneshanathan Kumaraguru Contents (jump to) Introduction Objective Materials Methodology Results Discussion Conclusion References Introduction A macromolecule is â€Å"a molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetitions of units derived, actually or conceptually, from molecules of low relative molecular mass† (Jenkins et al., 1996, p.2289). Carbohydrates are made of monosaccharides, which typically consist 5 or 6 carbon straight saturated chain (Bochkov, Zaikov and Afanasiev, 1991, p.2). Proteins are made up of one or more polypeptides which consist of chains of amino acids connected by peptide bonds (Walsh, 2004, p.2). Objective To identify the macromolecules (carbohydrates and proteins) by using various chemical assays. Materials Samples – Glucose, lactose, fructose, starch, sucrose, tyrosin, tryptophan and egg albumin. Reagents – Molish’s reagent, iodine solution, benedict’s solution, barfoed’s reagent, seliwanoff’s reagent, ninhydrin solution and millon’s reagent. Other chemicals – Concentrated H ­2SO4, AgNO3, dilute NaOH, dilute NH4OH, concentrated HNO3, NaNO2/dilute HCl and sulpanilic acid. Equipments – Bunsen burner, pipett, beakers and test tubes. Methodology Tests for carbohydrates (glucose, fructose, lactose, sucrose and starch). Molisch’s test Using a transfer pipette, 1ml of each carbohydrate solution was poured into five test tubes. Then few drops of Molisch’s reagent was added into each test tube using a transfer pipette and mixed well. Then 2ml of concentrated H2SO4 was added down the sides of the test tubes. Iodine test Using a transfer pipette, 1ml of each carbohydrate solution was poured into five test tubes. Then 3 drops of diluted I2 was added into each test tube using a transfer pipette. Benadict’s test Using a transfer pipette, 5ml of Benadict’s solution was poured into five test tubes. Then 1ml of each carbohydrate solution was added into each test tube using a transfer pipette and was mixed well. Test tubes were then heated in a water bath for 3 minutes. Barfoerd’s test Using a transfer pipette, 1ml of each carbohydrate solution was poured into five test tubes. Then 5ml of Barfoerd’s solution was added into each test tube using a transfer pipette and was mixed well. Test tubes were then heated in a water bath for 3-4 minutes. Seliwanoff’s test Using a transfer pipette, 5ml of Seliwanoff’s reagent was poured into five test tubes. Then 5-6 drops of each carbohydrate solution was added into each test tube using a transfer pipette and was mixed. Test tubes were then heated in a water bath for exactly 30 seconds. Tollen’s test Using a transfer pipette, 1ml of AgNO3 was poured into five test tubes. Then using a transfer pipette, dilute NaOH was added until a slight precipitate was formed. Then dilute NH4OH was added until the precipitate just dissolved. 1ml of each carbohydrate solution was then added into each test tube using a transfer pipette. Test tubes were then heated in a water bath for 5 minutes. Tests for amino acids (tyrosine and tryptophan) and protein (egg albumin). Ninhydrin test Using a transfer pipette, 0.5ml of 0.02% amino acid solutions and protein was poured into three test tubes. Then 1ml of Ninhydrin solution was added into each test tube using a transfer pipette and was heated in a water bath for 3-4 minutes. Xanthoproteic test Using a transfer pipette, 2ml of 0.02% amino acid solutions and protein was poured into three test tubes. Then 2ml of concentrated HNO3 was added into each test tube using a transfer pipette and was heated in a water bath for 1-2 minutes. Millon’s test Using a transfer pipette, 2ml of 0.02% amino acid solutions and protein was poured into three test tubes. Then 3-4 drops of millon’s reagent was added into each test tube using a transfer pipette and was heated in a water bath for 3-4 minutes. Pauly’s test Using a transfer pipette, 1ml of 0.02% amino acid solutions and protein was poured into three test tubes. Then 1ml of sulphanilic acid was added into each test tube using a transfer pipette. 1ml of dilute HCl was then added into three separate test tubes. All six test tubes were kept in ice bath for 3 minutes. Then the amino acids / protein solutions were mixed with 1ml of dilute HCl in the test tubes and were kept in the ice bath again. Few drops of NaOH were then added to the test tubes in the ice bath. Results For carbohydrates Test Compounds Observation Inference Molisch’s test Starch Presence of purple colour ring The compound is a carbohydrate Glucose Presence of purple colour ring The compound is a carbohydrate Fructose Presence of purple colour ring The compound is a carbohydrate Lactose Presence of purple colour ring The compound is a carbohydrate Sucrose Presence of purple colour ring The compound is a carbohydrate Iodine test Starch Presence of blue-black complex The compound is a polysaccharide Glucose Absence of blue-black complex The compound is not a polysaccharide Fructose Absence of blue-black complex The compound is not a polysaccharide Lactose Absence of blue-black complex The compound is not a polysaccharide Sucrose Absence of blue-black complex The compound is not a polysaccharide Benadict’s test Starch Absence of brick-red colour precipitate The compound is a non- reducing sugar Glucose Presence of brick-red colour precipitate The compound is a reducing sugar Fructose Presence of brick-red colour precipitate The compound is a reducing sugar Lactose Presence of brick-red colour precipitate The compound is a reducing sugar Sucrose Absence of brick-red colour precipitate The compound is a non- reducing sugar Barfoerd’s test Starch Absence of red colour precipitate The compound is not a monosaccharide Glucose Presence of red colour precipitate The compound is a monosaccharide Fructose Presence of red colour precipitate The compound is a monosaccharide Lactose Absence of red colour precipitate The compound is not a monosaccharide Sucrose Absence of red colour precipitate The compound is not a monosaccharide Seliwanoff’s test Starch Absence of red colour complex The compound contains an aldehyde group Glucose Absence of red colour complex The compound contains an aldehyde group Fructose Presence of red colour complex The compound contains a ketone group Lactose Absence of red colour complex The compound contains an aldehyde group Sucrose Presence of red colour complex The compound contains a ketone group Tollen’s test Starch Absence of silver mirror The compound is a non- reducing sugar Glucose Presence of silver mirror The compound is a reducing sugar Fructose Presence of silver mirror The compound is a non- reducing sugar Lactose Presence of silver mirror The compound is a reducing sugar Sucrose Absence of silver mirror The compound is a non- reducing sugar For amino acids and protein Test Compounds Observation Inference Ninhydrin test Egg albumin Absence of purple colour complex The compound is not an amino acid Tryptophan Presence of purple colour complex The compound is an amino acid Tyrosin Presence of purple colour complex The compound is an amino acid Xanthoproteic test Egg albumin Absence of yellow colour complex The compound is a protein Tryptophan Presence of bright yellow colour complex The compound is an amino acid Tyrosin Presence of pale yellow colour complex The compound is an amino acid Millon’s test Egg albumin Absence of pink colour precipitate Tryptophan Absence of pink colour precipitate Presence of tyrosin Tyrosin Presence of pink colour precipitate Pauly’s test Egg albumin Absence of red azo dye Tryptophan Presence of red azo dye Presence of tryptophan/ tyrosin/ histodine Tyrosin Presence of red azo dye Figure 1: Molisch’s test: Figure 2: Iodine test: Figure 3: Iodine test: Presence of purple colour ring Presence of blue-black complex Absence of blue-black complex Figure 4: Benedict’s test: Figure 5: Benedict’s test: Figure 6: Barfoerd’s test: Absence of brick red ppt. Presence of brick red ppt. Absence of red ppt. Figure 7: Barfoerd’s test: Figure 8: Seliwanoff’s test: Figure 9: Tollen’s test   Presence of red ppt. Presence of red colour complex Presence of silver mirror Figure 10: Ninhydrin test: Figure 11: Xanthoproteic test: Figure 12: Millon’s test: Presence of purple colour complex Presence of yellow colour complex Presence of pink colour ppt. Figure 13: Pauly’s test: Presence of red azo dye Discussion The principles of each test: In molisch’s test, concentrated sulfuric acid is used to dehydrate the carbohydrates to form 5-hydroxymethylfurfural, which reacts with the ÃŽ ±Ã¢â‚¬â€œnaphthol to give a purple result (Pavia, 2005, p.446). In iodine test, a blue colour is formed when the iodine is absorbed into the open spaces of amylose molecules in starch (Pavia, 2005. p.451). In benedict’s test, the sugar (reducing sugar) gets oxidized and reduces Cu2+ present in the reagent (Raymond, 2010, p.344). Barfoerd’s test is a test unique for monosaccharide, where cupric hydroxide is reduced in acidic medium to give red colour cuprous oxide (Nigam and Ayyagari, 2008, p.25). In seliwanoff’s test, the ketoses are dehydrated to form furfural derivatives which then condense with resorcinol to give a red colour complex (Nigam and Ayyagari, 2008, p.27). In tollen’s test, silver ammonium salt oxidizes the aldehyde to give glucuronide ammonium salt and metallic silver, which gives the silver mirror effect (Brito-Arias, 2007, p.5). In Ninhydrin test, free ÃŽ ±Ã¢â‚¬â€œamino acid radical reacts with ninhydrin to give a blue-violet complex (Malhotra, 2003, p.23). In xanthoproteic test, benzene ring is nitrated with nitric acid which produces a yellow compound (Sim et al., 2008, p.611). In Millon’s test, hydroxybenzene radical of phenolic amino acids (tyrosine) react with millon’s reagent to form a red colour complex (Nigam and Ayyagari, 2008, p.41). In pauly’s test, sulfanilic acid in the reagent gives a diazonium compound in the presence of nitrous acid and hydrochloric acid, which combines with amines and phenols to form coloured azo-compounds (Nigam and Ayyagari, 2008, p.41). Conclusion Macro molecules presence in the given samples was successfully identified by using the given chemical assays. References Bochkov, A.F., Zaikov, G.E. and Afanasiev, V.A (1991) Carbohydrates. Google Books [Online]. Available at: https://books.google.lk/books?id=BmPTDAnsUb0Cprintsec=frontcoverdq=carbohydrateshl=ensa=Xei=bXlKVavSGImTuAS7jYG4CQsqi=2ved=0CCMQuwUwAQ#v=onepageq=carbohydratesf=false (Accessed: 7 May 2015). Brito-Arias, M. (2007) Synthesis and Characterization of Glycosides. Google Books [Online]. Available at: https://books.google.lk/books?id=X9ZTg47alJkCpg=PA5dq=Tollens+testhl=ensa=Xei=2GhKVY3HOI2QuATD1YF4ved=0CDEQuwUwAw#v=onepageq=Tollens%20testf=false (Accessed: 7 May 2015). Jenkins, A.D, Kratochvil, P., Stepto, R.F.T. and Suter, U.W. (1996) `Glossary of basic terms in polymer science`, Pure and Applied Chemistry, 68(12), pp. 2287–2311, ISSN [Online]. Available at: http://www.degruyter.com/view/j/pac.1996.68.issue-12/pac199668122287/pac199668122287.xml (Accessed: 6 May 2015). Malhotra, V.K. (2003) Practical Biochemistry for Students. Google Books [Online]. Available at: https://books.google.lk/books?id=LHa1G131MuYCpg=PA23dq=Ninhydrin+testhl=ensa=Xei=GGxKVavVMMSSuATEsYDADwved=0CB4QuwUwAA#v=onepageq=Ninhydrin%20testf=false (Accessed: 7 May 2015). Nigam, A. and Ayyagari, A. (2008) Lab Manual in Biochemistry: Immunology and Biotechnology. Google Books [Online]. Available at: https://books.google.lk/books?id=Ws570Ql8krACpg=PA25dq=Barfoed%E2%80%99s+testhl=ensa=Xei=i19KVbD7EJWmuQT5joHADAved=0CCEQuwUwAA#v=onepageq=Barfoed%E2%80%99s%20testf=false (Accessed: 7 May 2015). Nigam and Ayyagari (2008) Lab Manual in Biochemistry: Immunology and Biotechnology. Google Books [Online]. Available at: https://books.google.lk/books?id=Ws570Ql8krACpg=PA27dq=Seliwanoff%E2%80%99s+testhl=ensa=Xei=pWhKVcjcDoyouwSMj4HYCAved=0CB4QuwUwAA#v=onepageq=Seliwanoff%E2%80%99s%20testf=false (Accessed: 7 May 2015). Nigam, A. and Ayyagari, A. (2008) Lab Manual in Biochemistry: Immunology and Biotechnology. Google Books [Online]. Available at: https://books.google.lk/books?id=Ws570Ql8krACpg=PA41dq=Millon%E2%80%99s+testhl=ensa=Xei=ymxKVeXJH9GKuATY6IGwDQved=0CCoQuwUwAg#v=onepageq=Millon%E2%80%99s%20testf=false (Accessed: 7 May 2015). Pavia, D.L. (2005) Introduction to organic laboratory techniques: A small scale approach. Google Books [Online]. Available at: https://books.google.lk/books?id=ega5c11VHvkCpg=PA446dq=Molisch%E2%80%99s+testhl=ensa=Xei=rF5KVa39HtHguQSrvIGwCQved=0CCUQuwUwAQ#v=onepageq=Molisch%E2%80%99s%20testf=false (Accessed: 7 May 2015). Pavia, D.L. (2005) Introduction to organic laboratory techniques: A small scale approach. Google Books [Online]. Available at: https://books.google.lk/books?id=ega5c11VHvkCpg=PA451dq=Iodine+testhl=ensa=Xei=Dl9KVfTcHMuxuAT-roCIDgved=0CB4QuwUwAA#v=onepageq=Iodine%20testf=false (Accessed: 7 May 2015). Raymond, K.W. (2010) General Organic and Biological Chemistry. Google Books [Online]. Available at: https://books.google.lk/books?id=iIltMoHUtJUCpg=RA1-PA344dq=Benedict%E2%80%99s+testhl=ensa=Xei=NF9KVcvTOMmxuASL9YH4Cwved=0CCcQuwUwAQ#v=onepageq=Benedict%E2%80%99s%20testf=false (Accessed: 7 May 2015). Sim, K.S., Chin, F.S., Tso, C.P. and Thong, L.W (2008) `Protein identification in latex gloves for bio-compatibility using maximum minimal variation test`, in Osman, N.A.A., Ibrahim, F., Abas, W.A.B.W., Rahman, H.S.A. and Ting, H.N. (ed.) 4th Kuala Lumpur International Conference on Biomedical Engineering 2008. Google Books [Online]. Available at: https://books.google.lk/books?id=sdG-1hN_4TYCpg=PA611dq=Xanthoproteic+testhl=ensa=Xei=gGxKVY3yA9CbuQSa74CwAwved=0CCMQuwUwAQ#v=onepageq=Xanthoproteic%20testf=false (Accessed: 7 May 2015). Walsh, G. (2004) Proteins: Biochemistry and Biotechnology. Google Books [Online]. Available at: https://books.google.lk/books?id=EXTEjL2wTnYCprintsec=frontcoverdq=proteinshl=ensa=Xei=M3pKVdGXJIfGuATTgoCQAQved=0CB4QuwUwAA#v=onepageq=proteinsf=false (Accessed: 7 May 2015). 1 | Page Chemical Tests for Biomolecules Chemical Tests for Biomolecules INTRODUCTION Biomolecules are complex organic molecules. Carbon, hydrogen, oxygen, nitrogen and phosphorus are the atoms that make up most of the biomolecules. These molecules form the basic structure of a living cell. The compounds such as amino acids, nucleotides and monosaccharide’s serve as the building blocks of complex biomolecules. The important biomolecules are proteins, carbohydrates, fats, hormones and nucleic acids (Kimball, 2012). Carbohydrates Carbohydrates are substances which containing the elements carbon hydrogen and oxygen and they have the general formula of Cx (H2O) y. Simple carbohydrates or the entire carbohydrate family may also be called saccharides .They are the most abundant biomolecules belonging to class of organic compounds found in living organisms. The major source of metabolic energy for both animals and plants are carbohydrates (Churms, 1982). Carbohydrates link to with proteins forming glycoproteins and with lipids forming glycolipids. Moreover they are present in DNA and RNA, which are essentially polymers. More than 75% of the dry weight of the plant world is carbohydrate in nature mainly cellulose, hemicelluloses and lignin (Reed, 2005). Carbohydrates are classified on the basis of their behavior on hydrolysis. They have been broadly divided into following three groups: Monosaccharide’s, Disaccharides, Oligosaccharides, and Polysaccharides. Monosaccharide A carbohydrate that cannot be hydrolyzed further to give simpler unit of polyhydroxy aldehyde or ketone is called a monosaccharide. Monosaccharides are single sugars units and there general formula is (CH20) n. Moreover they are colorless, crystalline solids that are freely soluble in water but insoluble in nonpolar solvents. The backbone of monosaccharide is an unbranched carbon chain in which all the carbon atoms are linked by single bonds (GyoÃÅ'ˆrgydeaÃÅ' k and PelyvaÃÅ' s, 1998). One of the carbon atoms is double-bonded to an oxygen atom to form a carbonyl group each of the other carbon atoms has a hydroxyl group. If the carbonyl group is at an end of the carbon chain, the monosaccharide is an aldehyde and is called an aldose, furthermore if the carbonyl group is at any other position the monosaccharide is a ketone and is called ketoses. Glucose, fructose, galactose, and ribose are some examples of monosaccharide. The building blocks of disaccharides like sucrose an d polysaccharides such as cellulose and starch and hemicelluloses are monosaccharide (Ferrier, 1999). Figure 1.1.1 ring structure of monosaccharide molecules. https://www.google.lk/search Figure 1.1.2 monosaccharide molecule showing the aldehyde and ketone group http://academic.brooklyn.cuny.edu/biology/bio4fv/page/monosacchrides.html Disaccharides A Disaccharide is two monosaccharide units linked by an oxide linkage formed by the loss of a water molecule. Such a linkage between two monosaccharide units through oxygen atom is called glycoside linkage. Three most abundant disaccharides are sucrose, lactose, and maltose. In Maltose ÃŽ ± (1→4) glycosidic linkage joins two glucose units, this occurs mainly as a breakdown product during digestion of starch by enzymes called amylases (Owusu-Apenten, 2005). Sucrose is the most abundant disaccharide in nature and it’s mostly found in plants which acts a good transport sugar since it is very soluble and can move in very high concentration. In Sucrose the anomeric carbon atoms of a glucose unit and fructose unit are joined. Moreover lactose the disaccharide of milk consists of galactose joined to glucose by ÃŽ ² (1→4) glycosidic linkage (Denniston, Topping and Caret, 2004). In additionally Sucrose and lactose are heterosaccharides and maltose is homosaccharides as we ll as maltose and lactose are reducing sugars. Sucrose is the only common non reducing sugar. Figure 1.3.1 disaccharides are formed by condensation of two monosaccharide. https://www.google.lk/search?q=disaccharideses_sm=122source Polysaccharides Polysaccharides are complex carbohydrates made up of many monosaccharide joined together by glycosidic bond. They are large, often branched, macromolecules. Their large sizes make them more or less insoluble in water and have no sweet taste (Aspinall, 1982). When all the monosaccharide in a polysaccharide is of the same type, the polysaccharide is called a homopolysaccharide and when more than one type of monosaccharide is present, they are called heteropolysaccharides. Polysaccharides have a general formula Cn (H2O) n-1 where n can be any number between 200 and 2500. Starch glycogen and cellulose are the examples of polysaccharides (Tombs and Harding, 1998). Figure 1.4.1 ring structure of polysaccharides molecules. https://www.google.lk/search?q=polysaccahrideses_sm=122source=lnmstbm=ischsa Proteins Cells are made of protein. Proteins are the most versatile class of molecules in living organisms. All proteins contain C, H, N, O some S, P, Fe, Zn, Cu. Proteins contains 20 different amino acids which are encoded by the genetic code and which constitute the building blocks of the proteins in all living organisms (Walsh, 2002). Each protein species contains one or several polypeptide chains of defined amino acid sequence. Their functions are catalysis, transport, hormones and structure. Amino acids are molecules containing an amine group carboxylic acid group and a side chain. Simple proteins contain only polypeptide chains Proteins can be soluble (globular proteins) and insoluble (myosin, fibrinogen) (Whitford, 2005). Figure 1.5.1 classification of proteins and there structures. https://www.google.lk/search?q=protein structurerevid=120848340tbm OBJECTIVES To distinguish between monosaccharide’s and disaccharides. To differentiate between different types of amino acids. To identify an unknown sample of carbohydrate and amino acid. MATERIALS Albumin solution Arginine solution Barfoed reagent Beakers Benedict’s solution Bunsen burner Burner stand Concentrated sulphuric acid Concentrated nitric acid Copper sulphate Fructose solution Glucose solution Glysin solution Iodine solution Lactose solution Molisch’s reagent Ninhydrin solution Pipettes Seliwanoff’s reagent Sodium hydroxide Starch Sucrose solution Test tubes Tyrosine solution Unknown solutions Water bath TEST FOR CARBOHYDRATES METHODOLOGY Molisch’s Test Five test tubes were taken with 1ml of carbohydrate solutions. Few drops of Molisch’s reagent were added to the testubes following with concen.sulphuric acid down the slide of the test tube. The colour change was observed. Iodine test Three drops of Iodine solution was added to each test tube with 1ml of each of the carbohydrate solutions. The colour change was observed. Benedict’s test 1ml of each carbohydrate solutions was taken in five test tubes.5ml of Benedict’s reagent was added to all three test tubes. All five test tubes were placed in a water bath and heated for two minutes. The colour change was observed. Barfoed test 5ml of Barfoed reagent was added with 1 ml of carbohydrate solutions. Test tubes were placed in water bath and heated for five minutes. The colour change was observed. Seliwanoff test 1ml of each carbohydrate solution was added to the test tubes following with 4ml of Seliwanoff reagent. The test tubes were placed in the water bath and heated to two to three minutes. The colour change was observed. Two unknown samples were taken in a test tubes and labeled A and B. Sample A was added to two test tubes. To the sample A the Iodine reagent was added and the colour change was observed. The Benedict’s reagent was added to the sample A of another test tube and was heated in general flame for two minutes and the colour change was observed. The sample B was added to four test tubes. One drop of Iodine reagent was added to the sample B test tube and colour change was observed following with Benedict’s reagent, Barfoed reagent and the Seliwanoff reagent were added to the remaining test tubes with sample B and was heated in the water bath for three minutes and the colour change was observed. TEST FOR AMINO ACID METHODOLOGY Ninhydrin test 1ml of Ninhydrin solution was added into 0.5 ml of 0.02 % amino acid solution in four test tubes. The test tubes were placed in water bath and heated for three to four minutes. The colour change was observed. Xanthoproteic Test 2ml of conc. Nitric acid was added to 2ml of 0.02% amino acid solution in four test tubes. The test tubes were placed in water bath for two minutes and the colour change was observed. Millon’s Test Four drops of Millon’s reagent was added into 2ml of 0.02% of amino acid solution in four test tubes. The test tubes were placed in water bath for four minutes and the colour change was observed. Biurete Test 3ml of 10% of sodium hydroxide was added drop wise to 1% of copper sulphate. The colour change was observed. Two unknown samples were taken in test tubes and labeled C and D. Sample C was added into two test tubes. To the sample C the Biurete reagent was added and the colour change was observed. The Millon’s reagent was added to the sample C of another test tube and was heated in general flame for two minutes and the colour change was observed. The sample D was also added into two test tubes. Biurete reagent was added to the sample B test tube and colour change was observed. Besides Millon’s reagent were added to the remaining test tube with sample B and was heated in the water bath for three minutes and the colour change was observed. RESULTS Test for carbohydrates Test for amino acids DISCUSSION In Molisch’s test all the carbohydrate solution gave a positive result, so as it’s a general test to confirm the molecule is carbohydrate. Iodine test is performed to separate the polysaccharide from monosaccharide and disaccharide as a result in this test only starch gave a positive result since its unbranched molecule. Glucose has a free aldehyde group and fructose has a free ketone group. Thus they react with Benedicts reagent and reduce it to form a reddish orange colour, which is a positive indication of Benedicts reaction .The copper (II) ions in the Benedicts solution are reduced to Copper (I) ions, which causes the colour change. Complex carbohydrates such as starches do not react positive with the Benedicts test. Buiret solution is a blue liquid that changes to purple when proteins are present and to pink in the presence of short chains of polypeptides. The cause of this colour change is because of the copper atom of the Biuret solution reacts with the peptide bonds. Avoid spilling Ninhydrin solutions on your skin, as the resulting stains are difficult to remove. When handling with Concentrated Sulphuric acid wear safety garments to avoid Sulphuric acid getting on self. Do not over heat the amino solutions in water bath since all the proteins may denature moreover colour change cannot be observed. CONCLUSION The unknown solution A is sucrose and it’s a non reducing sugar since in Iodine and Benedict’s test it showed a negative result where there was no colour change in addition to unknown solution B is glucose which is a reducing sugar because in Iodine and Seliwanoff test it gave a negative result remaining colourless and in Benedict’s and Barfoed test it gave a positive result changing its colour from green precipitate to reddish colour solution concluding solution B is glucose. The unknown solution C is protein since positive result was obtained and the solution turned pink in Biurete and Millon’s reagent along with the solution D is an amino acid because it remained colourless in Millon’s test and turned light blue in Biurete test resulting both in negative. References Aspinall, G. (1982). The Polysaccharides. 1st ed. New York: Academic Press. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Churms, S. (1982). Carbohydrates. 1st ed. Boca Raton, Fla.: CRC Press. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Denniston, K., Topping, J. and Caret, R. (2004). General, organic, and biochemistry. 1st ed. Boston: McGraw-Hill Higher Education. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Ferrier, R. (1999). Carbohydrate chemistry. 1st ed. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). GyoÃÅ'ˆrgydeaÃÅ' k, Z. and PelyvaÃÅ' s, I. (1998). Monosaccharide sugars. 1st ed. San Diego: Academic Press. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Kimball, L. (2012). Biomolecules. 1st ed. Delhi: Research World. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Owusu-Apenten, R. (2005). Introduction to food chemistry. 1st ed. Boca Raton, Fla.: CRC Press. Google books [Online books] Available at: http://books.google.lk (Accessed: 4th July 2014). Reed, D. (2005). Biomolecular archaeology. 1st ed. Carbondale: Center for Archaeological Investigations, Southern Illinois University, Carbondale. Google books [Online books] Available at: http://books.google.lk (Accessed: 3rd July 2014). Tombs, M. and Harding, S. (1998). An introduction to polysaccharide biotechnology. 1st ed. London: Taylor Francis. Google books [Online books] Available at: http://books.google.lk (Accessed: 4th july2014). Walsh, G. (2002). Proteins. 1st ed. Chichester: J. Wiley. Google books [Online books] Available at: http://books.google.lk (Accessed: 6th July 2014). Whitford, D. (2005). Proteins. 1st ed. Hoboken, NJ: J. Wiley Sons. Google books [Online books] Available at: http://books.google.lk (Accessed: 6th July 2014).

Wednesday, January 22, 2020

Albert Einstein :: biographies bio

Albert was born in 1879 on March 14 to Hermann and Pauline Einstein. Hermann ran an electrical technology business which was often on the verge of bankruptcy. Hermann's parents were Abraham and Hindel. Albert's parents moved around Europe several times while Albert was still living at home. He was born in Ulm, Germany. Two years Albert became a big brother when his sister Maja (Maria) was born, at this time his family was living at Munich. At the age of nine Albert entered a school in Munich called Luitpold. In school Albert got fairly good grades in his subject while he excelled in mathematics. However, he hated the school because success was based on memorization and obedience rather than how much a child knew. Then when Albert went home he studied mathematics, physics, and philosophy all on his own. Then later his teacher asked him to leave because Albert was causing the other students to loose respect for the teacher. At fifteen Albert took the teacher's advice and left mid term to be with his parents and sister in Italy. He renounced his German citizenship after enrolling in a cantonal school in Aarau, Switzerland. After he graduated from Aarau he entered the Federal Institute of Technology in Zurich, received his diploma and became a Swiss citizen. However, Albert had a difficult time holding down a full time job; he held many different part time jobs and it wasn't until he was offered a job with the Swiss Patent Office in Bern did he finally receive a regular salary. During one of his part time teaching positions his eye was caught by a young Serbian woman, Meleva Maric. She was the only woman in his physics class; yet Albert would not talk of marriage, even after she bore his daughter and gave it up for adoption. Once Albert was hired full time with the Swiss Patent Office in Bern he had enough money to begin thinking about marriage and he and Meleva were married in 1903. With this new job Albert had the time to write his thoughts down and to. Meleva gave birth to two sons Hans Albert in 1904 and Eduard in 1910. Hans would grow up and become a successful hydraulic engineer, while Eduard grew up being sick most of his life. In 1914 the German government offered Albert a position at the University of Berlin as well as a membership to the Prussian Academy of Sciences.

Sunday, January 19, 2020

MBA Admissions Essays - The Island :: MBA College Admissions Essays

There were no tropical bands, smiling islanders, or readily available sun tan lotions. There were, however, three gentlemen dressed in army fatigue sporting rifles and an unhappy disposition. Margarita Island looked more like the stage for a military coup than a vacation paradise. What awaited us on the small plot of land 20 miles north of the Venezuelan coast was a run-down hotel, Porto Fino Mare. Arriving with seven classmates from school and a plane full of American tourists, it felt as if the island's population had doubled with our arrival. We tried to make the best of a bad situation, after all, there was still an abundance of blue sky and crystal clear ocean. Although all seven of us attended the same school, we were still just acquaintances. By the third night on the island we made a rotting bamboo table our source of entertainment. Sitting around that table, we were forced to occupy ourselves with something novel, conversation. At first, dialogue sounded like group therapy. Where are you from? What brings you to this island tonight? Over time, however, our discussion shifted to deeper waters. Some of my classmates knew that I had been running an internet company, but nobody knew exactly what or how I was doing it. I explained about the two books I had written and went into detail about how I was using the internet as a marketing tool. I talked about the weird looks I received from peers, while printing out thousands of pages in the school library. Â   My friends seemed genuinely interested in how I could manage a successful company, but what happened next surprised me. My normally reserved school acquaintances became enthralled. They started offering new ideas and directions for my business.

Tuesday, January 14, 2020

Informatic Practile Grade 11 Cbse .

A Text Book on INFORMATICS PRACTICES CLASS XI Shiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110 092 India A text book on Informatics Practices, Class XI. PRICE : Rs. FIRST EDITION 2010 CBSE, India COPIES: â€Å"This book or part thereof may not be reproduced by any person or agency in any manner. † PUBLISHED BY : The Secretary, Central Board of Secondary Education, Shiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110092 DESIGN, LAYOUT : Multi Graphics, 5745/81, Reghar Pura, Karol Bagh, New Delhi-110005, Phone : 25783846 PRINTED BY : ii Foreword Information and Communication Technology has permeated in every walk of life affecting the technology fields such as launching satellites, managing businesses across the globe and also enabling social networking. The convergence of computer, communication and content technologies, being known as ICT, have attracted attention of academia, business, government and communities to use it for innovative profitable propositions. Year by year it is becoming simpler to use devices such as desktop, palm top, iPod, etc. 21st century is characterized with the emergence of knowledge based society wherein ICT plays a pivotal role. In its vision, the National Policy on ICT in School Education by MHRD, Govt. of India, states â€Å"The ICT policy in School Education aims at preparing youth to participate creatively in the establishment, sustenance and growth of a knowledge society leading to all around socio economic development of the nation and global competitiveness†. The policy envisages three stages of ICT implementations at school level – ICT literacy and Competency Enhancement, ICT enabled teachinglearning, and introduction of ICT related elective subjects at Senior Secondary level. With this backdrop a major paradigm shift is imperative in imparting ICT-enabled instructions, collaborative learning, multidisciplinary problem-solving and promoting critical thinking skills as envisaged in the National curriculum framework 2005. Foundation of these skills is laid at school level. Armed with such skills it is expected that a student will transform knowledge into easy to use systems to the ultimate benefit of the society at large. Syllabus of Informatics Practices has been revisited accordingly with a focus on generic concepts with domain specific practical experiments and projects to ensure conceptual knowledge with practical skills. The societal impact of ICT have been discussed. A new Unit on IT Applications has been added to enhance understanding of the above tools and techniques to solve real life problems by designing both front end and back end with proper data connectivity. Introduction of Open Standards and Open Source to promote Vendor Neutrality of tools. Creativity and Collaborative Learning/Programming is also an added feature. Specifically, a Unit on Networking and Open Standards is introduced in place of Business Computing. For IDE based programming, Java is introduced in place of VB. Relational Database Management System is dealt with using My SQL in place of SQL & PL/SQL using Oracle. The CBSE had been recommending different books in the past. With a total overhauling of the course on Informatics Practices it has ventured to bring out a comprehensive text book for all units for the first time. I am happy to release Part-1 of Informatics Practices for Class – XI. I would like to express my deep appreciation to the text book development team for their contribution and to the convener of the team, Prof. Om Vikas who aptly steered this activity. Appreciation is also due to Mrs. C Gurumurthy, Director (Academic) and Dr. (Smt) Srijata Das, Education Officer, for planning, coordinating and executing this initiative and bringing out this publication. It is hoped that all students and teachers will benefit by making best use of this publication. Their feedback will be highly appreciated for further improvement. VINEET JOSHI CHAIRMAN H l d d H d d x , H d H l lt l h d T d x l x d d l L d l td d d t p D l H l d h L l d h l d , d, l D d d h x d h , d l p d h 100 || ASkills>100 || GK>100) JOptionPane. showMessageDialog(this,†Re-Enter Marks (Out of 100)†); v if the marks input by the user for any of the subjects are greater than 100 Check or not an if they are then display the message â€Å"Re-Enter Marks (Out of 100). Since we have to display the error message if the marks of even one subject are out of limit so we have used the || operator which means OR. So in simple english it means if marks of English are >100 or marks of ASkills >100 or marks of GK > 100, then display the error message. So the message will be displayed even if only one condition evaluates to true. if (ASkills>=90 && GK>=90 ) { JOptionPane. showMessageDialog(this,†** Selected for Achiever's Award **†); jTextField6. setText(â€Å"*†); } 158 INFORMATICS PRACTICES Chapter-6 Control Structures v if the marks of ASkills and GK are both >= 90 or not. If they are then Check display the message â€Å"** Selected for Achiever's Award **† and also display a â€Å"*† in the text field. Since we have to check that both the marks should be greater than 90 so we have use the && operator which in simple English means AND. So the condition will evaluate to true only if both the conditions are satisfied. Let us now write the code for the Grade calculator application as shown in Figure 6. 38 private void jButton1ActionPerformed(java. awt. event. ActionEvent evt) { // Variable Declaration and assignment operations int Total,English,ASkills,GK; English=Integer. parseInt(jTextField1. getText()); ASkills=Integer. parseInt(jTextField2. getText()); GK=Integer. arseInt(jTextField3. getText()); //Validation of Entered Marks if (English>100 || ASkills>100 || GK>100) JOptionPane. showMessageDialog (this,†Re-Enter Marks (Out of 100)†); else { Total=English+ASkills+GK; jTextField4. setText(Integer. toString(Total)); jButton2. setEnabled(true); } } private void jButton2ActionPerformed(java. awt. event. ActionEvent evt) { // Variable Declaration and assignment operations ch ar Grade; int ASkills,GK,Total; ASkills=Integer. parseInt(jTextField2. getText()); GK=Integer. parseInt(jTextField3. getText()); Total=Integer. arseInt(jTextField1. getText()); INFORMATICS PRACTICES 159 Chapter-6 Control Structures //Decision for Achiever's Award if (ASkills;=90 && GK;=90 ) { JOptionPane. showMessageDialog (this,†** Selected for Achiever's Award **†); jTextField6. setText(â€Å"*†); } //Finding Grade if (Total;=80) jTextField5. setText(â€Å"A†); else if (Total;=70) jTextField5. setText(â€Å"B†); else if (Total;=60) jTextField5. setText(â€Å"C†); else if (Total;=50) jTextField5. setText(â€Å"D†); else jTextField5. setText(â€Å"E†); } private void jButton3ActionPerformed(java. awt. event. ActionEvent evt) { // To Exit from application System. exit(0); } Figure 6. 38 Code for the Grade Calculator Application Since in this application we had to test for multiple conditions in a if statement, so we had to join the conditions using some operators. Such conditions that are formed by joining simple conditions are called complex conditions and they are usually joined using the logical operators. Logical Operator A logical operator denotes a logical operation. Logical operators and relational operators are used together to form a complex condition. Logical operators are: 160 INFORMATICS PRACTICES Chapter-6 Control Structures Operator && || ! Use a;10 && b10 || bMySQL Command Line Client OR Goto the folder C:Program FilesMySQLMySQL Server 5. 1in as the drive having MySQL] And Click on the file MySQL. EXE MySQL will prompt a message to provide password (it requires the same password which was entered during the installation) Enter Password:**** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 4 Server version: (GPL) 5. 0. 51a-community-nt MySQL Community Edition [Assuming C: drive Type ‘help;' or ‘h' for help. Type ‘c' to clear the buffer. Mysql; To exit from MySQL, type QUIT or EXIT Mysql;QUIT The above steps ensure successful installation and configuration of MySQL database server. Next time in the MySQL prompt, one can create and use databases, create tables and execute SQL queries. Downloading MySQL [Linux Environment]: Installation of the binary version of MySQL, release 4. 0. 20, to run on Linux is as follows: Installation file for MySQL may be downloaded from the link: INFORMATICS PRACTICES 203 Chapter-8 Introduction to MySQL http://dev. mysql. com/downloads/mysql/5. 1. tml#downloads (Choose appropriate download link as per the desired operating system) Create MySQL User Account: # cd /usr/local # groupadd mysql # useradd -c â€Å"MySQL Software Owner† -g mysql mysql # passwd mysql Changing password for user mysql. password: all authentication tokens updated successfully. Installing Binary Version: Unzip the files and change the directory to mysql # cd mysql # scripts/m ysql_install_db –user=mysql Preparing db table Preparing host table Preparing user table Preparing func table †¦ †¦ †¦ The latest information about MySQL is available on the web at http://www. ysql. com Support MySQL by buying support/licenses at https://order. mysql. com 204 INFORMATICS PRACTICES Chapter-8 Introduction to MySQL Start and Stop The Database Software: Starting the MySQL Database # su # cd /usr/local/mysql # bin/mysqld_safe –user=mysql & Starting mysqld daemon with databases from /usr/local/mysql/data Stopping the MySQL Database # su # cd /usr/local/mysql # bin/mysqladmin -u root shutdown 040803 23:36:27 mysqld ended [1]+ Done Know more Visit the following website to find a vast list of free and open source softwares available: http://en. wikipedia. rg/wiki/List_of_free_and_open_source_software_packages bin/mysqld_safe –user=mysql Summary A database is an organised collection of data. v Data vis stored in a relational database in one or more tables. A group v of rows and columns forms a Table. The horizontal subset of a Table is known as a Row/Tuple. v The vertical subset of a Table is known as a Column/Attribute. v A Candidate key is an attribute (or a set of attributes) that uniquely identifies a v row. A Primary Key is one of the candidate keys. Only v one of the Candidate keys is selected as the primary key of a table. All other candidate keys are called Alternate keys. INFORMATICS PRACTICES 205 Chapter-8 Introduction to MySQL Multiple Choice Questions 1. A relation can have only one ________ key and may have more than one _______ keys. a) b) c) d) 2. Primary, Candidate Candidate, Alternate Candidate, Primary Alternate, Candidate The vertical subset of a table is known as: a) b) c) d) Tuple Row Attribute Relation 3. If software is released under open source, it means: a) b) c) d) It is expensive. Its source code is available to the user. It belongs to a company. It is a DBMS. 4. Which of the following columns in a Student table can be used as the primary key? ) b) c) d) Class Section First Name Admission No 5. A tuple is also known as a ___________________________ . a) b) c) d) table relation row field INFORMATICS PRACTICES 206 Chapter-8 Introduction to MySQL 6. An attribute is also known as a_________________________. a) b) c) d) table relation row column 7. A field or a combination of fields in a table that has a unique value for each row is calle d: a) b) c) d) Candidate key. Foreign key. Main key. Alternate key. Exercises 1. Answer the following questions: a) Define the following terms: i) ii) Database Table iii) Primary key iv) v) b) c) d) e) f) 2. Candidate key Alternate key What is the relationship between a Database and a Table? What is DBMS? Write names of any two DBMSs. How is data organized in a table? What is a Primary key? What is its purpose in a table? What is MySQL? Distinguish between the following pairs a) b) Row and Column Primary key and Candidate key. INFORMATICS PRACTICES 207 9 Learning Objectives After studying this lesson the students will be able to: State vcategories of SQL statements. Create v a database Create v a table. Add rows to a table. v MySQL Retrieve v data in various ways from table using SELECT statement. Display v data in a sorted way using ORDER BY clause. Modify v data stored in a table. View v structure of a table Modify v structure of table Delete v rows from a table In the previous lesson, you have learnt that Relational Databases use tables to store data. A table simply refers to a two dimensional representation of data using columns and rows. MySQL lets us manipulate and manage these tables in an efficient way. We have learnt that MySQL is a Relational Database Management System. In this lesson we will learn about SQL (Structured Query Language). It is a Standard language used for accessing and manipulating relational databases. Ms. Sujata is a Class teacher of Class XI. She wants to store data of her students i. e. Names and marks secured, in a database. A database is used to house data in the form of tables. She uses a CREATE DATABASE statement to create a new database named School. 208 INFORMATICS PRACTICES Chapter-9 MySQL mysql; CREATE DATABASE School; Once the above mentioned statement gets executed, a database with the name School is created on her system. Now she has to open the database to work on it. For this USE statement is required. She opens the School database: Statement entered by user mysql; USE School; Database Changed Display by system Now, MySQL prompt can accept any query related to the database School. ! Semicolon is standard way to end SQL statement. Creating a table After creating a database, the next step is creation of tables in the database. For this CREATE TABLE statement is used. Syntax: CREATE TABLE ( , ,†¦ , ); Since Ms. Sujata is just learning, she initially creates a simple table named Learner with only two columns RollNo and Name in the School database. To do this, she enters the following statement: mysql; CREATE TABLE Learner ( RollNo INTEGER, Name VARCHAR(25) ); INFORMATICS PRACTICES 209 Chapter-9 MySQL v Give meaningful name to a table. If a table will store information about students, name it STUDENTS, not Abc or Person. vnames and column names are not case sensitive. For example, Table STUDENTS is treated the same as STuDents or students. We will study about the CREATE TABLE statement in detail later in this lesson. What if Ms. Sujata wants to see the names of all the tab les in the database? At any point of time, she can view names of all the tables contained in the current database by using SHOW TABLES statement as shown below: mysql; SHOW TABLES; +——————+ | Tables_in_school | +——————+ | Learner | ——————+ 1 row in set (0. 00 sec) Once the table named Learner is created, Ms. Sujata would like to add data of students in the table, which is also known as populating table with rows. To add row(s) in the table she uses the INSERT INTO statement: Syntax: INSERT INTO VALUES (,,†¦ ,); 210 INFORMATICS PRACTICES Chapter-9 MySQL She inserts 4 rows : mysql> INSERT INTO Learner VALUES (14,'Aruna Asaf Ali'); mysql> INSERT INTO Learner VALUES (12,'Tarun Sinha'); mysql> INSERT INTO Learner VALUES (16,'John Fedrick'); mysql> INSERT INTO Learner VALUES (10,'Yogi Raj Desai'); ! In INSERT statement: Character, date and Time data should be enclosed in Quotes. Numeric values should not be enclosed in quotes. Now that she has added 4 rows in the table, she wants to view the contents of the table. How can she do that? To view the contents of the table, she uses the following SELECT statement. In the simplest way, SELECT statement is used like this: Syntax: SELECT * FROM ; So, she types the statement: mysql; SELECT * FROM Learner; +—————————+ |RollNo | Name | +—————————+ | 14 | 12 | 16 | 10 | Aruna Asaf Ali | Tarun Sinha | John Fedrick | Yogi Raj Desai | | | | —————————+ In the above statement, FROM clause states which table to look in for data. Any time to know the database currently in use, the SELECT DATABASE() statement can be used. INFORMATICS PRACTICES 211 Chapter-9 MySQL mysql> SELECT DATABASE(); DATABASE() school 1 row in set (0. 0 sec) ! Statements in MySQL are not case sensitive. It means select DATABASE(); or SELECT DATABASE(); or SELECT database(); would all work the same way. Some Terminologies Keyword: A keyword refers to a special word that has a special meaning to SQL. For example, SELECT and FROM are keywords. Clause : A clause is a portion of an SQL statement. Each clause is identified by a keyword. For example, consider the statement SELECT name FROM Learner; Here SELECT name is a clause. SELECT is a statement as well as a clause. SELECT clause is everything from keyword SELECT until keyword FROM. SELECT statement is the entire command. FROM Learner is a FROM clause, which specifies the table from which data has to be selected. Statement : A statement is a combination of two or more clauses. For example, SELECT name FROM Learner; is a statement. 212 INFORMATICS PRACTICES Chapter-9 MySQL MySQL Data Types Well, before we learn more about making a table, there is one thing we need to understand first: Data Types. They indicate the type of data that you are storing in a given table column. So, what are the different Data Types available in MySQL? Here is a list of some of the most common ones and what type of values they hold: Class Text Data Type CHAR(size) Description A fixed-length string from 1 to 255 characters in length right-padded with spaces to the specified length when stored. Values must be enclosed in single quotes or double quotes. Example ‘Maths' â€Å"TexT† VARCHAR(size) A variable-length string from 1 to 255 characters in length; for example VARCHAR(25). Values must be enclosed in single quotes or double quotes. ‘Computer' â€Å"Me and u† Numeric DECIMAL(size,d) It can represent number with or without the fractional part. The maximum number of digits may be specified in the size parameter. The maximum number of digits to the right of the decimal point is specified in the d parameter INT Or INTEGER It is used for storing integer values. You can specify a width upto 11 digits. 17. 32 345 76 INFORMATICS PRACTICES 213 Chapter-9 MySQL Date DATE It represents the date including day, month and year It represents time. Format: HH:MM:SS Note: The supported range is from ‘-838:59:59' to ‘838:59:59' ‘2009-0702' TIME() TIME Categories of SQL Commands SQL commands can be classified into the following categories: 1. Data Definition Language (DDL) Commands The DDL part of SQL permits database tables to be created or deleted. It also defines indices (keys), specifies links between tables, and imposes constraints on tables. Examples of DDL commands in SQL are: v CREATE DATABASE – creates a new database v CREATE TABLE – creates a new table v TABLE – modifies a table ALTER v TABLE – deletes a table DROP 2. The Data Manipulation Language (DML) Commands The query and update commands form the DML part of SQL: Examples of DDL commands are: v SELECT – extracts data from a table v UPDATE – updates data in a table v DELETE – deletes data from a table v INSERT INTO – inserts new data into a table CREATE TABLE Ms. Sujata feels good that she has successfully created a table named Learner with 2 columns using CREATE TABLE statement. She now creates a table named Student with 214 INFORMATICS PRACTICES Chapter-9 MySQL four columns. When tables are created its columns are named, data types and sizes are supplied for each column. While creating a table at least one column must be specified. Syntax: CREATE TABLE (; column name; [ ], (; column name; [ ], †¦); Example: mysql; USE school; Database changed mysql; CREATE TABLE Student( Rollno INTEGER, Name VARCHAR(25), Gender CHAR(1), Marks1 DECIMAL(4,1)); Query OK, 0 rows affected (0. 16 sec) ! If table Student already exists in database school, then the error message â€Å"Table Student already exists† is displayed. Each column in the table is given a unique name. In the example above the column names are Rollno, Name etc. This doesn't mean each column that is named has to be unique within the entire database. It only has to be unique within the table where it exists. Also notice that the names do not use any spaces. !When naming tables and columns be sure to keep it simple with letters and numbers. Spaces and symbols are invalid characters except for underscore(_). Column names like first_name,last_name,email are valid column names. Viewing Structure of Table The DESCRIBE statement can be used to see the structure of a table as indicated in the Create Statement. It displays the Column names, their data types, whether Column must contain data ,whether the Column is a Primary key etc. INFORMATICS PRACTICES 215 Chapter-9 MySQL Syntax: DESCRIBE ; OR DESC ; mysql> DESCRIBE Student; Statement entered by user +——–+————–+——+—–+———+——-+ | Field | Type | Null | Key | Default | Extra | +——–+————–+——+—–+———+——-+ | Rollno | int(11) | Name | varchar(25) | YES | YES | YES | | | | | NULL | NULL | NULL | NULL | | | | | | | | Output shown by system | Gender | char(1) | Marks1 | decimal(4,1) | YES +——–+————–+——+—–+———+——-+ 4 rows in set (0. 01 sec) Ms. Sujata adds some rows in the Student table using the INSERT INTO statement: INSERT INTO Student VALUES (1,'Siddharth Sehgal','M',93); INSERT INTO Student VALUES (2,'Gurpreet Kaur','F',91); INSERT INTO Student VALUES (3,'Monica Rana','F',93); INSERT INTO Student VALUES (4,'Jatinder Sen','M',78); INSERT INTO Student VALUES (5,'George Jacob','M',76); INSERT INTO Student VALUES (6,'Deepa Bhandari','F',77); INSERT INTO Student VALUES (7,'Akshay Nath','M',65); Changing Structure of table When we create a table we define its structure. We can also change its structure i. e. add, remove or change its column(s) using the ALTER TABLE statement. Syntax: ALTER TABLE ADD/DROP [datatype]; ALTER TABLE MODIFY ; 216 INFORMATICS PRACTICES Chapter-9 MySQL Example: Ms. Sujata adds a column named Games. mysql> ALTER TABLE Student ADD Games VARCHAR(20); Now she wants to check the structure of the table to see that the new column Games is added. mysql> DESCRIBE Student; +——–+————–+——+—–+———+——-+ | Field | Type | Null | Key | Default | Extra | +——–+————–+——+—–+———+——-+ | Rollno | int(11) | Name | varchar(25) | YES | YES | YES | | | | | | NULL | NULL | NULL | NULL | NULL | | | | | | | | | | Gender | char(1) | Marks1 | decimal(4,1) | YES | Games | varchar(20) | YES +——–+————–+——+—–+———+——- + 5 rows in set (0. 00 sec) After execution of the above ALTER TABLE statement, the Games column is added and a NULL value is assigned to all the rows in this column. mysql> SELECT * FROM Student; +——–+——————+——–+——–+——-+ | Rollno | Name | | | | | | | 1 | Siddharth Sehgal 2 | Gurpreet Kaur 3 | Monica Rana 4 | Jatinder Sen 5 | George Jacob 6 | Deepa Bhandari 7 | Akshay Nath | Gender | Marks1 |M |F |F |M |M |F |M | | | | | | | 93. 91. 0 93. 0 78. 0 76. 0 77. 0 65. 0 | Games | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | | | | | | | +——–+——————+——–+——–+——-+ +——–+——————+——–+——–+——-+ INFORMATICS PRACTICES 217 Chapter-9 MySQL Now, s uppose we want to change the newly added Games column to hold integers(in place of character data) using ALTER TABLE statement: mysql> ALTER TABLE Student MODIFY games INTEGER; To delete a column of a table the ALTER TABLE statement is used with Drop clause. Ms. Sujata deletes the Games column using the ALTER TABLE statement: mysql> ALTER TABLE Student DROP Games; mysql> DESC student; +——–+————–+——+—–+———+——-+ | Field | Type | Null | Key | Default | Extra | +——–+————–+——+—–+———+——-+ | Rollno | int(11) | Name | varchar(25) | YES | YES | YES | | | | | NULL | NULL | NULL | NULL | | | | | | | | | Gender | char(1) | Marks1 | decimal(4,1) | YES +——–+————–+——+—–+———+——-+ 4 rows in set (0. 00 sec) The above display shows that Games column is removed from the table. The word â€Å"DESC† can also be used in place of â€Å"DESCRIBE† Retrieving Information with SELECT Statement The SELECT statement is used to fetch data from one or more database tables. Retrieving Single Column Here is the syntax of SELECT statement to retrieve a single column from a table: Syntax: SELECT FROM ; 218 INFORMATICS PRACTICES Chapter-9 MySQL Example: Ms. Sujata wants to display Roll numbers of all her students. She uses the following statement: mysql> SELECT Rollno FROM Student; +———- + | Rollno | +———- + | | | | | | | 1 2 3 4 5 6 7 | | | | | | | ———- + 7 rows in set (0. 00 sec) Retrieving Multiple Columns We can display more than one column(s) from a table using SELECT statement: Syntax: SELECT , FROM ; Example: Now, Ms. Sujata displays two columns :Roll numbers and names of all the students. mysql> SELECT Rollno, Name FROM Student; +———- +——————+ | Rollno | Name | +———- +——————+ | | 1 2 | Siddharth Se hgal | Gurpreet Kaur | | 219 INFORMATICS PRACTICES Chapter-9 MySQL | | | | | 3 4 5 6 7 | Monica Rana | Jatinder Sen | George Jacob | Deepa Bhandari | Akshay Nath | | | | +———- +——————+ 7 rows in set (0. 00 sec) Changing the order of display of Columns We can display columns in any order by specifying the columns in that order in SELECT statement . The following statement displays Names first and then Roll numbers from the table Student. mysql> SELECT Name,Rollno FROM Student; +——————+——–+ | Name | Rollno | +——————+——–+ | Siddharth Sehgal | Gurpreet Kaur | Monica Rana | Jatinder Sen | George Jacob | Deepa Bhandari | Akshay Nath | | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ——————+——–+ 7 rows in set (0. 00 sec) In the Output, notice that the first column displaying names is left-justified and the second column displaying roll numbers is right justified. The format of output follows the pattern that character data is left justified and numeric data is right justified. 220 INFORMATICS PRACTICES Chapter-9 MySQL Retrieving all Columns To see all the columns of the table, we can write * in place of names of all the columns. The columns are displayed in the order in which they are stored in the table. Ms. Sujata uses the following statement to see all the columns of her table: mysql> SELECT * FROM Student; +——–+——————+——–+——–+ | Rollno | Name | Gender | Marks1 | +——–+——————+——–+——–+ | | | | | | | 1 2 3 4 5 6 7 | Siddharth Sehgal | Gurpreet Kaur | Monica Rana | Jatinder Sen | George Jacob | Deepa Bhandari | Akshay Nath |M |F |F |M |M |F |M | | | | | | | 93. 0 | 91. 0 | 93. 0 | 78. 0 | 76. 0 | 77. 0 | 65. 0 | +——–+——————+——–+——–+ 7 rows in set (0. 00 sec) ! The asterisk (*) means â€Å"All†. SELECT * means display all columns Eliminating duplicate values By default data is displayed from all the rows of the table, even if the data in the result is duplicated. Using the keyword DISTINCT, the duplicate values can be eliminated in the result. When DISTINCT keyword is specified, only one instance of the duplicated data is shown. The following query without the DISTINCT keyword shows 7 rows while the same query with DISTINCT keyword shows 6 rows as duplicate data 93 is displayed only once. INFORMATICS PRACTICES 221 Chapter-9 MySQL mysql> SELECT Marks1 FROM Student; +——–+ | Marks1 | +——–+ | | | | | | | 93. | 91. 0 | 93. 0 | 78. 0 | 76. 0 | 77. 0 | 65. 0 | 93 displayed twice +——–+ 7 rows in set (0. 00 sec) mysql> SELECT DISTINCT Marks1 FROM Student; +——–+ | Marks1 | +——–+ | | | | | | 93. 0 | 91. 0 | 78. 0 | 76. 0 | 77. 0 | 65. 0 | +——–+ 6 rows in set (0. 00 sec) 222 INFORMATICS PRACTICES Chapter-9 MySQL Retrieving Data From All Rows If we write the keyword ALL in place of DISTINCT, then the result of SELECT query displays all the values including duplicate values. The output is the same as what we get when we do not write DISTINCT keyword in the SELECT query. Using Arithmetic Operators with SELECT Arithmetic operators perform mathematical calculations. In SQL the following arithmetic operators are used: Operator + * / % What it does Addition Subtraction Multiplication Division Modulus (or remainder) Modulus operator (%) returns the remainder of a division. We can perform simple arithmetic computations on data using SELECT statement. Ms. Sujata thinks what if all my students had secured 5 marks more. She enters the following statement to display marks of all students increased by 5. mysql> SELECT Marks1+5 FROM Student; +———-+ | Marks1+5 | +———-+ | | | | | | | 98. 96. 0 98. 0 83. 0 81. 0 82. 0 70. 0 | | | | | | | +———-+ 7 rows in set (0. 02 sec) INFORMATICS PRACTICES 223 Chapter-9 MySQL Marks1 column is displayed increased by 5. The actual values are not increased in the table. Here are some more examples: mysql> SELECT Name,Marks1+0. 05*Marks1 FROM Student ; mysql> SELECT Name, Marks1-10 FROM Student ; mysql> SELECT Name,Marks1/2 FROM Student ; ! Using these operators on tables does not create new columns in the tables or change the actual data values. The results of the calculations appear only in the output. In the above examples, arithmetic calculations were based on Student table. Arithmetic calculations may not always be based on tables. For example when we want to compute 7*3+1, there is no table to be referenced. In such queries no FROM clause is used : mysql> SELECT 7*3+1; +——-+ | 7*3+1 | +——-+ | 22 | +——-+ 1 row in set (0. 09 sec) mysql> SELECT 71+34; +——-+ | 71+34 | +——-+ | 105 | +——-+ 1 row in set (0. 00 sec) 224 INFORMATICS PRACTICES Chapter-9 MySQL Using Column Alias Till now, we have seen that when the result of an SQL statement is displayed, the heading displayed at the top of column is same s the column name in the table or the arithmetic operation being done on the Column. While displaying marks from the table Student, Ms. Sujata wants the output to display a column heading (for Marks) that is easier to understand and is more meaningful and presentable like â€Å"Marks Secured† inste ad of Marks1. Column alias lets different name (heading) to appear for a column than the actual one in the output. She enters the statement like this: mysql> SELECT Marks1 AS â€Å"Marks Secured† FROM Student; +—————+ | Marks Secured | +—————+ | | | | | | | 93. | 91. 0 | 93. 0 | 78. 0 | 76. 0 | 77. 0 | 65. 0 | +—————+ 7 rows in set (0. 00 sec) Notice that the column Marks1 has been given the column heading â€Å"Marks Secured† . If a column alias consists of more than one word ,then it should be enclosed in quotes as in â€Å"Marks Secured†,otherwise error message is displayed. ! Using Column Alias does not rename a column. It simply displays a different column name in the output. The AS keyword between the column name and alias is optional. We can also write SELECT Marks1 â€Å"Marks Secured† FROM Student; INFORMATICS PRACTICES 225 Chapter-9 MySQL Putting text in Query output Can Ms. Sujata make the query output more presentable by inserting items such as symbols or text in the query output ? Yes. She can. She uses the following statement. mysql> SELECT Rollno,Name,'has secured marks',marks1 FROM student; +——–+——————+——————-+——–+ | Rollno | Name | has secured marks | marks1 | +——–+——————+——————-+——–+ | | | | | | | 1 | Siddharth Sehgal | has secured marks 2 | Gurpreet Kaur 3 | Monica Rana 4 | Jatinder Sen 5 | George Jacob 6 | Deepa Bhandari 7 | Akshay Nath | has secured marks | has secured marks | has secured marks | has secured marks | has secured marks | has secured marks | | | | | | | 93. 0 | 91. 0 | 93. 0 | 78. 0 | 76. 0 | 77. 0 | 65. 0 | +——–+——————+——————-+——–+ 7 rows in set (0. 00 sec) The text ‘has secured marks' is displayed with every row of the table. Retrieving specific rows – WHERE clause Tables usually contain many rows. Mostly, we do not want to display all the rows of a table. Certain rows can be displayed based on the criteria for selection of rows using the keyword WHERE. The WHERE clause is used to filter records. It is used to extract only those records that fulfill a specified criterion. Syntax: SELECT [, ,†¦. ] FROM WHERE ; Ms. Sujata wants to display the names and marks of all those students who have secured marks above 80, she enters: 226 INFORMATICS PRACTICES Chapter-9 MySQL mysql> SELECT Name,Marks1 FROM Student WHERE Marks1 > 80; +——————+———-+ | Name | Marks1 | +——————+———-+ | Siddharth Sehgal | Gurpreet Kaur | Monica Rana | | | 93. 91. 0 93. 0 | | | +——————+———-+ 3 rows in set (0. 00 sec) She thinks â€Å"What would be the marks of my students if they were increased by 5 for all those students who secured marks below 80? † She enters the statement : mysql> SELECT Name,Marks1+5 FROM Student WHERE marks1 < >= SELECT * FROM Student WHERE Marks1>=93; +——–+——————+——–+——–+ | Rollno | Name | Gender | Marks1 | +——–+——————+——–+——–+ | | 1 3 | Siddharth Sehgal | Monica Rana |M |F | | 93. 0 93. 0 | | +——–+——————+——–+——–+ 2 rows in set (0. 6 sec) ! When we use relational operators with character data type, < means earlier in the alphabet and > means later in the alphabet. ‘Aman' < ‘Ayan' as ‘m' comes before ‘y' in alphabet. Some more examples of queries involving relational expressions: mysql> SELECT Name,Marks1 FROM Student WHERE Marks1 SELECT * FROM Student WHERE Name = ‘Gurpreet Kaur'; mysql> SELE CT RollNo,Marks1 FROM Student WHERE Rollno SELECT RollNo,Marks1 FROM Student WHERE Rollno 3; mysql> SELECT RollNo,Marks1 FROM Student WHERE Name ‘Mani Kumar'; 228 INFORMATICS PRACTICES Chapter-9 MySQL Logical Operators OR, AND, NOT logical operators are used in SQL. Logical operators OR and AND are used to connect relational expressions in the WHERE clause. If any of the comparisons are true, OR returns TRUE. AND requires both conditions to be true in order to return TRUE. NOT negates a condition. If a condition returns a True value, adding NOT causes the condition to return a False value and vice versa. The symbol || can be used in place of OR, && can be used in place of AND, ! can be used in place of NOT operator. Ms. Sujata uses the following statement (with Logical operator AND) to display Roll numbers and names of students who have secured marks above 70 but below 80. mysql> SELECT Rollno, Name,Marks1 FROM Student WHERE Marks1 > 70 AND Marks1 < 80; +——–+—————-+——–+ | Rollno | Name | Marks1 | +——–+—————-+——–+ | | | 4 5 6 | Jatinder Sen | George Jacob | Deepa Bhandari | | | 78. 0 | 76. 0 | 77. 0 | +——–+—————-+——–+ 3 rows in set (0. 01 sec) Some example of SQL statements with Logical operators are shown below. ysql> SELECT Empnumber, EmpName FROM Employee WHERE Department = ‘Accoumts' OR Department = ‘Personnel'; mysql> SELECT Empnumber, EmpName FROM Employee WHERE Department = ‘Accoumts' AND Designation = ‘Manager'; mysql> SELECT Empnumber, EmpNa me FROM Employee WHERE NOT(Designation = ‘Manager'); mysql> SELECT Name,TotalMarks FROM Candidate WHERE writtenmarks>80 || Interviewmarks>10; SELECT Name,TotalMarks FROM Candidate WHERE writtenmarks>80 && Interviewmarks>10; INFORMATICS PRACTICES 229 Chapter-9 MySQL Using Parenthesis in WHERE clause Sometimes we have to write a criterion using a combination of AND and OR. The parentheses not only help us visually see how things are grouped together but they also let the DBMS know exactly what to do. SELECT * FROM Emp WHERE first_name='Amit' AND (last_name='Sharma' OR last_name='Verma'); So, how does that work? It simply states that we are looking for anyone with the first name as Amit and the last name as Sharma or Verma. They must have the first name as Amit but can have the last name as either Sharma or Verma. Condition based on Range The BETWEEN operator defines the range of values within which the column values must fall into to make the condition true. The range includes both the upper and lower values. Ms. Sujata uses the following statement to display roll numbers and marks of students who have secured marks in the range 70 to 80 (including 70 and 80). mysql> SELECT Rollno,Name,Marks1 FROM Student WHERE Marks1 BETWEEN 70 AND 80; +——–+—————-+——–+ | Rollno | Name | Marks1 | +——–+—————-+——–+ | | | 4 5 6 | Jatinder Sen | George Jacob | Deepa Bhandari | | | 78. 0 | 76. 0 | 77. 0 | +——–+—————-+——–+ 3 rows in set (0. 06 sec) The following statement displays roll numbers and marks of students who have secured marks other than the ones in the range 70 to 80(including 70 and 80). 30 INFORMATICS PRACTICES Chapter-9 MySQL mysql> SELECT Rollno,Name,Marks1 FROM Student WHERE Marks1 NOT BETWEEN 70 AND 80; ! BETWEEN displays all values between the lower and the upper va lues including the lower and the upper values. To display marks in the range 70 to 80, Ms. Sujata could have used the following statement to give the same output as the one using BETWEEN operator. mysql> SELECT Rollno,Name,Marks1 FROM Student WHERE Marks1>=70 AND Marks1 SELECT Rollno, Name, Marks1 FROM Student WHERE Marks1 IN (68,76,78); +————-+———————+————–+ | Rollno | Name | Marks1 | ————-+———————+————–+ | | 4 5 | Jatinder Sen | 78. 0 76. 0 | | | George Jacob | +————-+———————+————–+ 2 rows in set (0. 00 sec) In an Employee table, to display rows where State is ‘DELHI' or ‘MUMBAI' or ‘UP', we write the query like this: SELECT * FROM E mployee WHERE State IN (‘DELHI','MUMBAI','UP'); In an Employee table, to display all rows except those that have State as ‘DELHI' or ‘MUMBAI' or ‘UP', we write the query like this: INFORMATICS PRACTICES 231 Chapter-9 MySQL SELECT * FROM Employee WHERE State NOT IN (‘DELHI','MUMBAI','UP'); Till now Ms. Sujata's table Student has 7 rows. She wants to populate it with some more rows. She uses the following INSERT INTO statement. INSERT INTO Student VALUES (8,'Samdisha Sen','F',76); INSERT INTO Student VALUES (9,'Geeta Sen Sharma','F',91); INSERT INTO Student VALUES (10,'Geet Kadamb','M',66); INSERT INTO Student VALUES (11,'Aman Ali','M',92); INSERT INTO Student VALUES (12,'Ayan Ali','M',87); She checks that the table has the new rows inserted by using the following SELECT statement: SELECT * FROM Student; +——–+——————+——–+——–+ | Rollno | name | Gender | Marks1 | ——–+——————+——–+——–+ | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 | Siddharth Sehgal | | Gurpreet Kaur | Monica Rana | Jatinder Sen | George Jacob | Deepa Bhandari | Akshay Nath | Samdisha Sen | Geeta Sen Sharma | G eet Kadamb | Aman Ali | Ayan Ali | | | | | | | | | | | M F F M M F M F F M M M | | | | | | | | | | | | 93 91 93 78 76 77 65 76 91 66 92 87 | | | | | | | | | | | | +——–+——————+——–+——–+ 12 rows in set (0. 00 sec) 232 INFORMATICS PRACTICES Chapter-9 MySQL Condition based on pattern matches Sometimes while trying to remember somebody's name, you remember a part of his/her name but not the exact name. In such cases, MySQL has wildcards to help you out. % and _ are two wild card characters. The percent (%) symbol is used to represent any sequence of zero or more characters. The underscore (_) symbol is used to represent a single character. LIKE clause is used to fetch data which matches the specified pattern from a table. The LIKE clause tells the DBMS that we won't be doing a strict comparison like = or ; or ; but we will be using wildcards in our comparison. Syntax: SELECT , [†¦] WHERE LIKE Pattern [AND [OR]] ; For example, Ms. Sujata wants to display details of students who have their names ending with ‘Sen', she enters: mysql; SELECT * FROM Student WHERE Name LIKE ‘%Sen'; +——–+————–+——–+———-+ | Rollno | Name | Gender | Marks1 | +——–+————–+——–+———-+ | | 4 | Jatinder Sen | M 8 | Samdisha Sen | F | | 78. | 76. 0 | +——–+————–+——–+———-+ 2 rows in set (0. 00 sec) To display rows from the table Student with names starting with ‘G', she enters: mysql> SELECT * FROM Student WHERE Name LIKE †˜G%'; +——–+——————+——–+———-+ | Rollno | name | Gender | Marks1 | +——–+——————+——–+———-+ | 2 | Gurpreet Kaur |F | 91. 0 | 233 INFORMATICS PRACTICES Chapter-9 MySQL | | | 5 | George Jacob 9 | Geeta Sen Sharma 10 | Geet Kadamb |M |F |M | | | 76. 0 | 91. | 66. 0 | +——–+——————+——–+———-+ 4 rows in set (0. 02 sec) To display rows that have names starting with ‘G' and ending with ‘b', she enters: mysql> SELECT * FROM Student WHERE Name LIKE ‘G%b'; +———-+——————+————-+———–+ | Rollno | name | Gender | Marks1 | +———-+—â€⠀Ã¢â‚¬â€Ã¢â‚¬â€Ã¢â‚¬â€Ã¢â‚¬â€+————-+———–+ | | 5 10 | George Jacob | Geet Kadamb |M |M | | 76. 0 66. 0 | | +———-+——————+————-+———–+ 2 rows in set (0. 0 sec) To display rows from the table Student that have ‘Sen' anywhere in their names, she enters: mysql> SELECT * FROM Student WHERE Name LIKE ‘%Sen%'; +———-+——————+————-+———–+ | Rollno | name | Gender | Marks1 | +———-+——————+————-+———–+ | | | 4 8 9 | Jatinder Sen | Samdisha Sen | Geeta Sen Sharma |M |F |F | | | 78 76 91 | | | +———-+——————+—â₠¬â€Ã¢â‚¬â€Ã¢â‚¬â€-+———–+ 3 rows in set (0. 00 sec) 234 INFORMATICS PRACTICES Chapter-9 MySQL To display rows that have names starting with ‘A' and then having any 4 characters and ending with ‘Ali', she uses underscore wild card like this: mysql; SELECT * FROM Student WHERE Name LIKE ‘A_ _ _ _ Ali'; +———-+——————+————-+———–+ | Rollno | name | Gender | Marks1 | +———-+——————+————-+———–+ | | 11 12 | Aman Ali | Ayan Ali |M |M | | 92. 0 87. 0 | | +———-+——————+————-+———–+ 2 rows in set (0. 00 sec) Some more examples ‘Am%' matches any string starting with Am. %Singh%' matches any string containing ‘Singh' ‘%a' matches any string ending with ‘a' ‘_ _ _' matches any string that is exactl y 3 characters long. ‘_ _ %' matches any string that has at least 2 characters. ‘_ _ _ g' matches any string that is 4 characters long with any 3 characters in the beginning but ‘g' as the 4th character. The keyword NOT LIKE is used to select the rows that do not match the specified pattern. To display rows from the table Student that have names not starting with ‘G', she enters: mysql> SELECT * FROM Student WHERE Name NOT LIKE ‘G%'; Precedence of Operators All the operators have precedence. Precedence is the order in which different operators are evaluated in the same expression. When evaluating an expression containing INFORMATICS PRACTICES 235 Chapter-9 MySQL multiple operators, operators with higher precedence are evaluated before evaluating those with lower precedence. Operators with equal precedence are evaluated from left to right within the expression. Parenthesis can be used to change the preference of an operator. Various operators in descending order of precedence (top to bottom) are listed below: ! (unary minus) ^ *, /, DIV, %, MOD -, + =, , ;=, ;, INSERT INTO Student(Rollno,Marks1) VALUES (14,45); Query OK, 1 row affected (0. 05 sec) Since values are provided only for Roll number and marks, Ms. Sujata uses the SELECT statement and notices the word NULL displayed for Name and Gender for Roll number 14 : mysql; SELECT * FROM Student WHERE Rollno =14; +——–+——+——–+———-+ | Rollno | name | Gender | Marks1 | +——–+——+——–+———-+ | 14 | NULL | NULL | 45. 0 | +——–+——+——–+———-+ 1 row in set (0. 0 sec) Explicitly Inserting NULL Values We have learnt that if a column can hold NULL values, it can be omitted from the INSERT INTO statement. INSERT INTO statement will automatically insert a null value in that column. This is called Implicitly inserting a NULL value. mysql> INSERT INTO Student(Rollno,Name,Gender) Values(15,'Charvi Chanana','F'); Query OK, 1 row affected (0. 11 sec) In the above INSERT INTO statement Marks1 column is omitted, therefore NULL value will be inserted for it. We can also explicitly add NULL value by using the NULL keyword in the VALUES list for those columns that can hold null values. ysql> INSERT INTO Student Values(14,'Siddharth Sehgal','M',NULL); Query OK, 1 row affected (0. 11 sec) 242 INFORMATICS PRACTICES Chapter-9 MySQL ! A NULL value means no value has been entered for that column i. e. the value for that column is not known. Inserting Date Values The default way to store a date in MySQL is with the type DATE. Below is the format of a DATE. YYYY-MM-DD To insert the current date into a table, MySQL's built-in function CURDATE() can be used in the query. Following are some examples of inserting date values. ysql> INSERT INTO my_table (idate) VALUES (19970505); mysql> INSERT INTO my_table (idate) VALUES ('97-05-05†²); mysql> INSERT INTO my_table (idate) VALUES (‘1997. 05. 05'); mysql> INSERT INTO my_table (idate) VALUES (‘0000-00-00'); ! While Inserting data: v Text values must be enclosed in quotes. v Standard date format is â€Å"yyyy-mm-dd†. v Standard time format is â€Å"hh:mm:ss†. v are required around the standard date and time formats. Quotes UPDATE STATEMENT In the table student, Ms. Sujata entered a student's marks as 93. Suppose, that student found out that one of her answers was unchecked and got her marks increased by 1. How would Ms. Sujata change it in the table? She can use the UPDATE statement to modify existing data in the table. (a) Syntax: UPDATE SET = , [ = , †¦] [WHERE ]; INFORMATICS PRACTICES 243 Chapter-9 MySQL The statement can be used to update one or more columns together. WHERE clause helps in updation of particular rows in a table. The following statement sets the marks(Mark1) of all the rows to 94. UPDATE Student SET Marks1 = 94; The following statement sets the marks(Mark1) of the row with name as ‘Monica Rana' to 94. ysql; UPDATE Student SET Marks1 = 94 WHERE name = ‘Monica Rana'; Query OK, 1 row affected (0. 03 sec) Rows matched: 1 Changed: 1 Warnings: 0 The marks displayed from the table shows 94 marks now: mysql; SELECT Name,Marks1 FROM Student WHERE Name = ‘Monica Rana'; Output: +—————+——–+ | Name | Marks1 | +—————+——–+ | Monica Rana | 94 | +—————+——–+ 1 row in set (0. 00 sec) What if Ms. Sujata wants to change the name and marks both at the same time? Multiple columns can also be updated at one time. The following statement changes the name to â€Å"Chhavi Chanana† and Marks to 90 for the roll number 15. mysql; UPDATE Student SET name = ‘Chhavi Marks1= 90 WHERE Rollno = 15; Output: Query OK , 1 row affected (0. 8 sec) 244 INFORMATICS PRACTICES Chanana', Chapter-9 MySQL DELETE STATEMENT Sometimes students leave school or an employee leaves an organization. Their rows have to be deleted from the table. Deleting data from a table is very simple. DELETE statement is used to delete rows from a table. DELETE removes the entire row, not the individual column values. Care must be taken while using this statement as accidentally important data may get deleted. Syntax: mysql; DELETE FROM ; tablename; [ Where ; condn;]; One of the students with Roll number 14 has left the school and Ms. Sujata wants to delete his/her row. She uses the following statement to delete the row with roll number 14. mysql; DELETE FROM Student WHERE Rollno = 14; Query OK, 1 row affected (0. 03 sec) DELETE statement can be used to delete all rows of the table also . The following statement can be used to delete all the rows from Student table. ysql; DELETE from Student; mysql ; Select * FROM Student; +——–+———+——–+——-+ |Rollno | | Name | | Gender |Marks1 | | | | +——–+———+——–+——-+ +——–+———+——–+——-+ 0 row in set (0. 01 sec) Know more The MySQL databas e management system contains an enormous amount of functionality and power. Using a simple set of statements for inserting, retrieving, deleting and updating data, we can develop quite a useful set of databases and tables. To learn more about MySQL you may visit the website: http://www. mysqltutorial. org INFORMATICS PRACTICES 245 Chapter-9 MySQL Summary 1. 2. 3. 4. 5. 6. 7. 8. CREATE DATABASE statement is used to create a new database. CREATE TABLE statement is used to create a new table. INSERT INTO statement is used to insert a new row in a table. The SELECT statement is used to fetch data from one or more database tables. SELECT * means display all columns. The WHERE clause is used to select specific rows. The DESCRIBE statement is used to see the structure of a table. We can change the structure of a table ie. add, remove or change its column(s) using the ALTER TABLE statement. The keyword DISTINCT is used to eliminate redundant data from display. a) Logical operators OR and AND are used to connect relational expressions in the WHERE clause. Logical operator NOT is used to negate a condition. 9. 10. (b) 11. The BETWEEN operator defines the range of values that the column values must fall into to make the condition true. The IN operator selects values that match any value in the given list of values. % and _ are two wild card characters. The percent (%) symbol is used to represent any sequence of zero or more characters. The underscore (_) symbol is used to represent a single character. NULL represents a value that is unavailable, unassigned, unknown or inapplicable. The results of the SELECT statement can be displayed in the ascending or descending order of a single column or columns using ORDER BY clause. UPDATE statement is used to modify existing data in a table. DELETE statement is used to delete rows from a table. 12. 13. 14. 15. 16. 17. 246 INFORMATICS PRACTICES Chapter-9 MySQL Multiple Choice questions 1. Which statement is used to extract data from a table? A. B. C. D. 2. SELECT DISPLAY READ EXTRACT How do you select all the columns from a table named â€Å"Employee†? A. B. C. D. SELECT [all] FROM Employee; SELECT Employee; SELECT * BY Employee; SELECT * FROM Employee ; . How do you select a column named â€Å"IName† from a table named â€Å"Inventory†? A. B. C. D. SELECT Inventory FROM Iname; DISPLAY Iname SELECT Iname FROM Inventory; FROM Inventory; SELECT Iname, Inventory FROM Iname; 4. Which of the following are valid column names? A. B. C. D. Marks Eng 66_Marks Marks_Eng #Eng_Marks 5. SELECT statement can be use d to perform these functions. A. B. C. D. Insert rows into a table. Choose and display columns from a table. Modify data in a table. Select and display structure of a table INFORMATICS PRACTICES 247 Chapter-9 MySQL 6. Which statement is used to insert new data in a table? A. B. C. D. ADD RECORD INSERT RECORD INSERT INTO INSERT ROW 7. How would you display all those rows from a table named â€Å"Friends† where the value of the column â€Å"Hobbies† is â€Å"SWIMMING† A. B. C. D. SELECT ALL FROM Friends WHERE Hobbies IS ‘SWIMMING'; SELECT * FROM Friends WHERE Hobbies='SWIMMING'; SELECT * FROM Friends WHERE Hobbies = ‘Swimming† ; SELECT ALL FROM Friends WHERE Hobbies ‘SWIMMING' ; 8. Which statement is used to modify data in a table? A. B. C. D. CHANGE MODIFY UPDATE SAVE AS 9. Which SQL statement is used to delete data from a table? A. B. C. D. DELETE DROP TRUNCATE REMOVE 10. How do you select all the rows from a table named â€Å"Student† where the value of the column â€Å"FName† starts with â€Å"G†? A. B. C. D. SELECT * FROM Student WHERE FName LIKE ‘G_' ; SELECT * FROM Student WHERE FName='G'; SELECT * FROM Student WHERE FName LIKE ‘G%' ; SELECT * WHERE Student WHERE FName='%G%' ; INFORMATICS PRACTICES 248 Chapter-9 MySQL 11. The OR operator displays a record if ANY of the conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true A. B. False True 12. Which keyword is used to return only different values in a column? A. B. C. D. DIFFERENT EXCLUSIVE DISTINCT UNIQUE 3. Which SQL keyword(s) is/are used to sort the rows in the output: A. B. C. D. SORTED ORDER SORT SORT BY ORDER BY 14. How would you return all the rows from a table named â€Å"Item† sorted in descending order on the column â€Å"IName†? A. B. C. D. SELECT * FROM Item SORT ‘IName' DESC; SELECT * FROM Item ORDER BY IName DESC ; SELECT * FROM Item ORDER IName DESC ; SELECT * FROM Item SORT BY ‘IName' DESC ; 15. How can you insert a new row into the â€Å"Store† table? A. B. C. D. INSERT (1,'Abc Rice') INTO Store; INSERT VALUES (1,'Abc Rice') INTO Store ; INSERT INTO Store VALUES (1,'Abc Rice'); ADD ROW Store values(1,'Abc Rice'); INFORMATICS PRACTICES 249 Chapter-9 MySQL 16. Which statement is appropriate to change the first name â€Å"Madhur† to â€Å"Mridul† in the â€Å"FName† column in the ‘Student' table? A. B. C. D. UPDATE Student SET FName='Mridul' WHERE FName='Madhur' ; MODIFY Student SET FName='Madhur' INTO FName='Mridul ; UPDATE Student SET FName='Madhur' INTO FName='Mridul' ; UPDATE Student SET FName='Madhur' WHERE FName='Mridul' ; 17. How can you delete the rows with marks below 33 in the ‘Student' Table? A. B. C. D. DELETE FROM Student WHERE marks

Saturday, January 11, 2020

Cultural Anthropology Social Organization Essay

In the United States the practice of serial monogamy, where one goes through a series of marriages then divorce; and unwed parenthood seem to have replaced the cultural traditional marriage. (Nowak & Laird, 2010) Single parent families and the accompanying socioeconomic circumstances usually warrant social intervention from state agencies and that places a strain on public funds. The fact is, every single parent household is unbalanced. In the household where both parents are present the children usually benefit because each parent brings; not only a gender based perspective to the relationship and child rearing cultural traditional practices; but he/she also brings a level of stability that is not easily quantified. Stable marriages are usually founded upon the couple’s religious beliefs, kinship traditions of stable relationships, friendship, trust, similar backgrounds, traditional values as well as kindred cultural practices that include gender role expectations. Persons in stable marriages tend to understand each other’s moods and idiosyncrasies; so they are able to co-exist and live as friends. In the film, people adhere to the traditions of their kindred, they hold them sacred and they marry their own kind. It might seem bizarre to the outsider but it is normal behavior for their kinship. Arranged marriages are basically bilateral agreements between two families. The groom’s family gives the bride’s family a bride wealth of livestock, jewelry land and other valuables depending on the traditional culture of the tribe. The bride wealth forms a part of the wealth of the bride’s kinship. The groom basically has to pay the bride’s family for the loss of her labor. (Nowak & Laird, 2010). The women accept and submit themselves to the cultural traditions of their kinship. They have no choice in the arrangements. In the film, the women are hard workers. They take care of the men, children, fields, livestock wash the clothes, cook but the most bizarre was the Indian polyandrous family; the woman was married to three brothers. The children in this family do not know their biological father; and it is normal behavior so nobody really cares about a DNA match. It is also interesting to note that the wife in the feature film is illiterate and she knows no other way of life. The family is stable and the brothers look out for each other. This arrangement is economical as all the wealth is kept in the groom’s kinship. As strange as it may sound, this marriage seem to be more successful than the marriages of choice; in that the wives know there roles and stick to their list of duties. On the other hand, in marriages of choice, after a few years have passed, the wives tend to place pressure on the husbands to change into their likeness and to be what they, and their families want them to be. Arranged marriages are basically bilateral agreements between two families. The gang/crime family is a rather incredible one. I prefer to consider it as a social group with its own set of operational tenets but not a family. Rference Nowak, B., & Laird, P. (2010). Cultural Anthropolgy, San Diego, CA: Bridgepoint Education Inc.

Sunday, January 5, 2020

Pros And Cons Of The Death Penalty - 1435 Words

Introduction The Death Penalty (DP), being also known as capital punishment, capital offence and corporal punishment, is a sentence of death imposed on a convicted criminal (1); this essay will use all the terms interchangeably. The DP breaches two fundamental human rights, namely the right to life and the right to live free from torture; both rights are protected under the Universal Declaration of Human Rights (UDHR) adopted by the United Nations in 1948, which contains a list of each human rights that everyone is entitled to (UDHR 1948). Nevertheless, in 2016 alone at least 1,032 people were executed in 23 countries; most executions took place in China, Iran, Saudi Arabia, Iraq and Pakistan (Amnesty International 2017). The essay will†¦show more content†¦cutting down a tree. Today, 104 countries abolished the DP but the USA, Iran, Saudi Arabia, Turkey and Japan still use it as the most severe form of punishment (Amnesty International 2017); nevertheless, the execution methods, such as the lethal injection, have become less barbaric. Still, many activists and organisations contest the use of the DP, such as Amnesty International, which is a non-governmental organization with a focus â€Å"to prevent and end grave abuses of human rights and to demand justice for those whose rights have been violated† (Amnesty International 2016, 3). II. Arguments for and against the death penalty DP considerations involve religion, law and moral aspects to channel peoples’ behaviour. Religion brings an element of confusion with this regard. All religions believe having life is sacred; however, they considerably differ in understanding of death penalty justification. The Bible for example states that â€Å"The murderer shall surely be put to death† (Holy Bible, Numbers 35:16-18), meaning that DP can be warranted whatever the motive. Religious tradition certainly suggests no less. On the other hand, present Pope Francis declares that â€Å"no crime ever deserves the death penalty† (Pope Fransis 2015), following teachings of the New Testament where Jesus spoke to love one another: â€Å"A new command I give you: Love one another. As I have loved you, so you must love one another. 35 By this everyone will know that you are my disciples, if you love oneShow MoreRelatedPros And Cons Of The Death Penalty789 Words   |  4 Pages De ath Penalty The death penalty has been a debated topic for decades. Many people believe that it serves justice to the person being executed, while others think that it does no good for either party. However, I believe the three most outstanding topics surround the death penalty are the cost of death vs. life in prison, attorney quality, and irrevocable mistakes. The first topic surrounding the death penalty is the cost of death vs. life in prison. This is a bigRead MoreDeath Penalty Pros and Cons1636 Words   |  7 Pages Pros and Cons of the Death Penalty The death penalty is a legal process whereby a person is put to death as a punishment for a crime. The death penalties are usually carried out for retribution of a heinous murder committed, such as aggravated murder, felony killing or contract killing. Every state handles what method they want to use to put a person to death according to their state laws. The death penalty is given by lethal injection, electrocution; gas chamber firing squad and hanging areRead MoreDeath Penalty Pros Cons2512 Words   |  11 PagesTop 10 Pros and Cons Should the death penalty be allowed? The PRO and CON statements below give a five minute introduction to the death penalty debate. (Read more information about our one star to five star Theoretical Credibility System) 1. Morality 2. Constitutionality 3. Deterrence 4. Retribution 5. Irrevocable Mistakes 6. Cost of Death vs. Life in Prison 7. Race 8. Income Level 9. Attorney Quality 10. Physicians at Execution PRO Death Penalty CON Death Penalty 1. Morality PRO:Read MoreDeath Penalty Pros And Cons1501 Words   |  7 Pagesthe death penalty. What laws have the Supreme Court recognized that warrant the death penalty as being cruel and unusual punishment. What are the pros and cons of the death penalty, death penalty vs. life incarceration from a financial standpoint, the death penalty is it a deterrent where crime is concerned, states that have the death penalty, the state with the highest number of death row inmates the state with the lowest, mentally ill and mental retardation, juveniles, women and the death penaltyRead MoreThe Pros And Cons Of The Death Penalty915 Words   |  4 PagesThe Death Penalty is the punishment of execution to someone who legally by court of law convicted a capital crime. In the United States of America this is mainly used for aggravated murder. Additionally this means that the murder has circumstances that are severe. For instance it was planned murder, intentionally killed below the age of 13, killed som eone while serving term in prison, killed a law officer, and killed someone or illegally terminated a person’s pregnancy while in the process of committingRead MoreThe Pros And Cons Of The Death Penalty1331 Words   |  6 PagesThe death penalty has always been an issue or debate in the United States, typically being asked if it should be illegal or not. As of right now there are thirty-one states, including Ohio in which I live, that still use the death penalty as it is illegal in the rest. There are many supporters of it, there is also a huge amount of opposition. There are things included in both sides that can make the argument harder to be one-sided but I believe that the death penalty should be legal throughout theRead MorePros And Cons Of The Death Penalty1348 Words   |  6 Pagesmost shocking, the death penalty. The death penalty, also referred to as capital punishment, was first introduced in the form of hanging hundreds of years ago when America was first establi shed. Now, the most common way of execution proves to be death by lethal injection. For hundreds of years, people have argued over whether or not the general idea of capital punishment stands morally correct. Many have also debated if anyone holds the right to end another’s life. The death penalty, morally wrong andRead MoreThe Pros And Cons Of The Death Penalty844 Words   |  4 PagesThe death penalty takes the saying of â€Å"An eye for an eye† to a whole new level. From a very young age, everyone has been taught the undeniable truth that murder is wrong. So what makes capital punishment alright? Just because someone did something wrong, that doesn’t mean that person can legally be killed, as we are all human, and we all make mistakes. In the United States, 31 states allow this punishment (Sherman). Christopher Wilkins, Terry Darnell Edwards, and Rolando Ruiz are some of the manyRead MoreThe Pros And Cons Of The Death Penalty1939 Words   |  8 PagesThe de ath penalty is a serious problem that has the United States very divided. While there are many supporters of it, there is also a large amount of opposition. Currently, there are thirty three states where the death penalty is legal and seventeen states that have abolished it . I believe the death penalty should be legal throughout the nation. Crime is all around, Wherever we look we find criminals and crime. Criminals have become a part of peoples daily lives,Some criminals commit a crimeRead MoreThe Pros And Cons Of The Death Penalty948 Words   |  4 PagesDeath is something that a lot of people think about, but do people think about the Death Penalty? Having been given the death penalty means that someone is going to be put to death by a lethal injection or an electric chair; There are more ways, but the injection and the electric chair are the most used. There are many different opinions surrounding the idea of death penalties; which some people think the death penalty should be used more and some believe the complete opposite. There are two main