Introduction to SQL
SQL stands for Structured Query language and is an ANSI (American Natoinal Standards Institue) standard for computer laguage for accessing and manipulating database systems. SQL is a special purpose language which is designed for managing data held in relational database management system.Originally based upon relational algebraand tuple relational calculus, SQL consists of a data definition language, data manipulation language and data control language.The scope of SQL includes data insert, query, update and delete, schemacreation and modification, and data access control. SQL works with database database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase etc. Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard. SQL is originally based on the relational tuple calculus. SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. The version was initially called SEQUEL which stands for Structured English query Language. Itwas designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, SYSTEM R and this was developed by a group at IBM San Jose Research Laboratory during 1970s. Later SEQUEL was changed to SQL because SEQUEL was a trademark of the UK-based Hawker Siddeley aircraft company. Several parts of SQL language are data definition language (DDL), data manipulation language (DML), data control language (DCL), view definition, transition control, embedded SQL and dynamic SQL. Domain types in SQL are char(n), varchar(n), int, smallint, numeric(p,d), real, double precision, float(n), date, time, timestamp, interval and operations on complex types.
Summary
SQL stands for Structured Query language and is an ANSI (American Natoinal Standards Institue) standard for computer laguage for accessing and manipulating database systems. SQL is a special purpose language which is designed for managing data held in relational database management system.Originally based upon relational algebraand tuple relational calculus, SQL consists of a data definition language, data manipulation language and data control language.The scope of SQL includes data insert, query, update and delete, schemacreation and modification, and data access control. SQL works with database database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase etc. Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard. SQL is originally based on the relational tuple calculus. SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. The version was initially called SEQUEL which stands for Structured English query Language. Itwas designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, SYSTEM R and this was developed by a group at IBM San Jose Research Laboratory during 1970s. Later SEQUEL was changed to SQL because SEQUEL was a trademark of the UK-based Hawker Siddeley aircraft company. Several parts of SQL language are data definition language (DDL), data manipulation language (DML), data control language (DCL), view definition, transition control, embedded SQL and dynamic SQL. Domain types in SQL are char(n), varchar(n), int, smallint, numeric(p,d), real, double precision, float(n), date, time, timestamp, interval and operations on complex types.
Things to Remember
- SQL stands for Structured Query language and is an ANSI (American Natoinal Standards Institue) standard for computer laguage for accessing and manipulating database systems.
- SQL is a special purpose language which is designed for managing data held in relational database management system.
- Originally based upon relational algebraand tuple relational calculus, SQL consists of a data definition language, data manipulation language and data control language.
- The scope of SQL includes data insert, query, update and delete, schemacreation and modification, and data access control. SQL works with database database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase etc. Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard.
- SQL is originally based on the relational tuple calculus. SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s.
- The version was initially called SEQUEL which stands for Structured English query Language. Itwas designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, SYSTEM R and this was developed by a group at IBM San Jose Research Laboratory during 1970s.
- Later SEQUEL was changed to SQL because SEQUEL was a trademark of the UK-based Hawker Siddeley aircraft company.
- Several parts of SQL language are Data definition language, data manipulation language, data control language, view definition, transition control and embedded SQL and dynamil SQL.
- Domain types in SQL are char(n), varchar(n), int, smallint, numeric(p,d), real, double precision, float(n), date, time, timestamp, interval and operations on complex types.
MCQs
No MCQs found.
Subjective Questions
Q1:
Write a short note on Indomethacin.
Type: Short Difficulty: Easy
<h4>Introduction:</h4>
<p>Indomethacin is a nonsteroidal anti-inflammatory drug (NSAID). Indomethacin works by reducing hormones that cause inflammation and pain in the body.</p>
<p>Indomethacin is used to treat moderate to severe osteoarthritis, rheumatoid arthritis, gouty arthritis, or ankylosing spondylitis. Indomethacin is also used to treat shoulder pain caused by bursitis or tendinitis.</p>
<p>Extended-release indomethacin (Indocin SR) should not be used to treat gouty arthritis.</p>
<h4>Mechanism of Action:</h4>
<p>Indomethacin is a prostaglandin G/H synthase (also known as cyclooxygenase or COX) inhibitor that acts on both prostaglandin G/H synthase 1 and 2 (COX-1 and -2). Prostaglandin G/H synthase catalyzes the conversion of arachidonic acid to a number of prostaglandins involved in fever, pain, swelling, inflammation, and platelet aggregation. Indomethacin antagonizes COX by binding to the upper portion of the active site, preventing its substrate, arachidonic acid, from entering the active site. Indomethacin, unlike other NSAIDs, also inhibits phospholipase A2, the enzyme responsible for releasing arachidonic acid from phospholipids. Indomethacin is more selective for COX-1 than COX-2, which accounts for its increased adverse gastric effects relative to other NSAIDs. COX-1 is required for maintaining the protective gastric mucosal layer. The analgesic, antipyretic and anti-inflammatory effects of indomethacin occur as a result of decreased prostaglandin synthesis. Its antipyretic effects may be due to action on the hypothalamus, resulting in an increased peripheral blood flow, vasodilation, and subsequent heat dissipation.</p>
<h4> Indication:</h4>
<ol>
<li>Moderate to severe rheumatoid arthritis including acute flares of chronic</li>
<li>Moderate to severe ankylosing spondylitis.</li>
<li>Moderate to severe osteoarthritis.</li>
<li>Acute painful shoulder(bursitis and/or tendinitis).</li>
<li>Acute gouty arthritis.</li>
</ol>
<h4> Preparation:</h4>
<ul>
<li>Capsules: 25 and 50 mg</li>
<li>Capsules, extended release: 75 mg</li>
<li>Suspension: 25 mg/ml</li>
<li>Suppositories: 50 mg.</li>
<li>Injection (powder): 1 mg</li>
</ul>
<h4> Dose:</h4>
<p><strong>Pediatric Use</strong></p>
<p>INDOCIN (indomethacin) ordinarily should not be prescribed for pediatric patients 14 years of age and under .</p>
<p><strong>Adult Use</strong></p>
<p>Dosage Recommendations for Active Stages of the Following:</p>
<ol>
<li>Moderate to severe rheumatoid arthritis including acute flares of chronic disease; moderate to severe ankylosing spondylitis; and moderate to severe osteoarthritis.<br />Suggested Dosage:<br />Capsules INDOCIN (indomethacin) 25 mg b.i.d. or t.i.d. If this is well tolerated, increase the daily dosage by 25 or by 50 mg, if required by continuing symptoms, at weekly intervals until a satisfactory response is obtained or until a total daily dose of 150-200 mg is reached.</li>
</ol>
<p>DOSES ABOVE THIS AMOUNT GENERALLY DO NOT INCREASE THE EFFECTIVENESS OF THE DRUG.</p>
<p>In patients who have persistent night pain and/or morning stiffness, the giving of a large portion, up to a maximum of 100 mg, of the total daily dose at bedtime, either orally or by rectal suppositories, may be helpful in affording relief. The total daily dose should not exceed 200 mg. In acute flares of chronic rheumatoid arthritis, it may be necessary to increase the dosage by 25 mg or, if required, by 50 mg daily.</p>
<p>If minor adverse effects develop as the dosage is increased, reduce the dosage rapidly to a tolerated dose and OBSERVE THE PATIENT CLOSELY.</p>
<p>If severe adverse reactions occur, STOP THE DRUG. After the acute phase of the disease is under control, an attempt to reduce the daily dose should be made repeatedly until the patient is receiving the smallest effective dose or the drug is discontinued.</p>
<p>Careful instructions to, and observations of, the individual patient are essential to the prevention of serious, irreversible, including fatal, adverse reactions.</p>
<p>As advancing years appear to increase the possibility of adverse reactions, INDOCIN (indomethacin) should be used with greater care in the elderly</p>
<ol start="2">
<li>Acute painful shoulder (bursitis and/or tendinitis).<br />Initial Dose:<br />75-150 mg daily in 3 or 4 divided doses.<br />The drug should be discontinued after the signs and symptoms of inflammation have been controlled for several days. The usual course of therapy is 7-14 days.</li>
<li>Acute gouty arthritis.<br />Suggested Dosage:<br />Capsules INDOCIN (indomethacin) 50 mg t.i.d. until the pain is tolerable. The dose should then be rapidly reduced to complete cessation of the drug. Definite relief of pain has been reported within 2 to 4 hours. Tenderness and heat usually subside in 24 to 36 hours, and swelling gradually disappears in 3 to 5 days.</li>
</ol>
<h4>Contraindication:</h4>
<p>INDOCIN (indomethacin) is contraindicated in patients with known hypersensitivity to indomethacin or the excipients .</p>
<p>INDOCIN (indomethacin) should not be given to patients who have experienced asthma, urticaria, or allergic-type reactions after taking aspirin or other NSAIDs. Severe, rarely fatal, anaphylactic/anaphylactoid reactions to NSAIDs have been reported in such patients.</p>
<p>INDOCIN (indomethacin) is contraindicated for the treatment of peri-operative pain in the setting of coronary artery bypass graft (CABG) surgery .</p>
<p>Suppositories INDOCIN (indomethacin) are contraindicated in patients with a history of proctitis or recent rectal bleeding.</p>
<h4>Drug interaction:</h4>
<p>Cholestyramine(Questran) and colestipol(Colestid) may decrease the absorption of indomethacin by binding to indomethacin in the intestine and preventing absorption into the body. Indomethacin and other NSAIDs may decrease the elimination of lithium(Eskalith,Lithobid) by the kidneys and, therefore, increase the blood level of lithium, which could lead to lithium toxicity.</p>
<p>Indomethacin may interfere with the blood pressure-lowering effects of drugs that are given to reduce blood pressure. This may occur because prostaglandins play a role in the regulation of blood pressure.</p>
<p>When indomethacin is used in combination with methotrexate(Rheumatrex,Trexall) or aminoglycosides (for example, gentamicin) the blood levels of the methotrexate or aminoglycoside may increase, presumably because their elimination from the body is reduced. This may lead to more methotrexate or aminoglycoside-related side effects.</p>
<p>Indomethacin should be avoided by patients with a history of asthma attacks,hives or other allergic reactions to aspirin or other NSAIDs.</p>
<p>If aspirin is taken with indomethacin there may be an increased risk of developing an ulcer.</p>
<p>Persons who have more than 3 alcoholic beverages per day may be at increased risk of developing stomach ulcers when taking indomethacin or other NSAIDs.</p>
<h4>Side effects:</h4>
<p>Possible side effects of indomethacin include:</p>
<ul>
<li>Nausea and vomiting</li>
<li>Indigestion and stomachache</li>
<li>Constipation</li>
<li>Headache</li>
<li>Dizziness</li>
<li>Fatigue</li>
<li>Sleepiness</li>
<li>Depression</li>
<li>Ringing in the ears</li>
</ul>
<p>Serious side effects can occur with indomethacin.</p>
<p>If you have any of these side effects, stop taking indomethacin and call your doctor right away. For severe side effects, get emergency help, or call 911:</p>
<ul>
<li>Chest pain</li>
<li>Wheezing or difficulty breathing</li>
<li>Weakness on one side of the body</li>
<li>Slurred speech</li>
<li>Stomach pain</li>
<li>Vomiting blood or something resembling coffee grounds</li>
<li>Bloody diarrhea or tarry stools</li>
<li>Unusual bleeding or bruising</li>
<li>Skin rash or blistering</li>
<li>Skin rash with fever</li>
<li>Fatigue, nausea, yellowing of skin or eyes, dark-colored urine, and flu-like symptoms</li>
<li>Swelling of the face, throat, tongue, or body</li>
<li>Difficulty swallowing or talking</li>
<li>Blurred vision</li>
</ul>
<h4>Nursing implications:</h4>
<p><strong>Assessment & Drug Effects</strong></p>
<ul>
<li>Monitor for therapeutic effectiveness: In acute gouty attack, relief of joint tenderness and pain is usually apparent in 24–36 h; swelling generally disappears in 3–5 days. In rheumatoid arthritis: Reduced fever, increased strength, reduced stiffness, and relief of pain, swelling, and tenderness.</li>
<li>Monitor for and report promptly S&S of CV thrombotic events (i.e., angina, MI, TIA, or stroke).</li>
<li>Monitor for and report promptly S&S of GI ulceration or bleeding. Significant GI bleeding may occur without prior warning.</li>
<li>Observe patients carefully; instruct to report adverse reactions promptly to prevent serious and sometimes irreversible or fatal effects.</li>
<li>Monitor weight and observe dependent areas for signs of edema in patients with the underlying cardiovascular disease.</li>
<li>Monitor I&O closely and keep prescriber informed during IV administration for patent ductus arteriosus. Significant impairment of renal function is possible; urine output may decrease by 50% or more. Also, monitor BUN, serum creatinine, glomerular filtration rate, creatinine clearance, and serum electrolytes.</li>
<li>Monitor lab tests: Periodic renal function, LFTs, CBC with differential, BP and HR, visual and hearing acuity.</li>
</ul>
<p><strong>Patient & Family Education</strong></p>
<ul>
<li>Stop taking a drug and report promptly to prescriber if you experience S&S of GI ulceration: Stomach pain, frequent indigestion and nausea, bloody or tarry stools, vomit with blood or coffee- ground appearance.</li>
<li>Stop taking drug and report promptly to prescriber if you experience chest pain, shortness of breath, weakness, slurring of speech, or other signs of a cardiac or neurologic problem.</li>
<li>Do not take aspirin or other NSAIDs; they increase a possibility of ulcers.</li>
<li>Note: Frontal a headache is the most frequent CNS adverse effect; if it persists, dosage reduction or drug withdrawal may be indicated. Take drug at bedtime with milk to reduce the incidence of a morning headache.</li>
<li>Do not drive or engage in other potentially hazardous activities until response to a drug is known.</li>
</ul>
Videos
Indomethacin

Introduction to SQL
Introduction to SQL:
SQL stands for Structured Query language and is an ANSI (American National Standards Institue) standard for computer language for accessing and manipulating database systems. SQL is a special-purpose language which is designed for managing data held in a relational database management system.Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language, data manipulation language and data control language.The scope of SQL includes data insert, query, update and delete, schema creation and modification, and data access control. SQL works with database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase etc. Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard.
History of SQL
SQL is originally based on the relational tuple calculus. SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. The version was initially called SEQUEL which stands for Structured English query Language. It was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, SYSTEM R and this was developed by a group at IBM San Jose Research Laboratory during the 1970s. Later SEQUEL was changed to SQL because SEQUEL was a trademark of the UK-based Hawker Siddeley aircraft company. In the late 1970s, Relational Software, Inc. which is now called Oracle Corporation saw the concepts of SQL and developed their own SQL-based relational database management system with aspirations of selling it to the U.S Navy, Central Intelligence Agency as well as other U.S. government agencies.In June 1979, Relational Software, Inc. introduced the first commercially available implementation of SQL, OracleV2 (Version2) for VAXcomputers.
Several parts of SQL language
Data Definition Language: The most important DDL statements in SQL are:-
- CREATE: creates a new database table
- ALTER: alters (changes) a database table
- DROP: deletes a database table.
Data Manipulation Language: The most important DML statements in SQL are:-
- SELECT: extracts data from a database table
- UPDATE: updates data in a database table
- DELETE: deletes data from a database table
- INSERT INTO: inserts new data into a database table
Data Control Language: The most important DCL statements in SQL are:-
- GRANT: gives users' access privileges to database
- REVOKE: withdraw users' access privileges to the database given with the GRANT command.
View Definition
Transition Control
Embedded SQL and Dynamic SQL
Domain Types in SQL
- Char(n). A fixed-length character string, with userspecified length n.
- Varchar(n). Variable length character strings, with userspecified maximum length n.
- int. Integer (a finite subset of the integers that is machinedependent).
- smallest. Small integer (a machinedependent subset of the integer domain type).
- Numeric(p,d). Fixed point number, with a userspecified precision of p digits,with n digits to the right of decimal point.
- Real, double precision. Floating point and doubleprecision floating point numbers, with machinedependent precision.
- Float(n). Floating point number, with a userspecified precision of at least n digits.
- date: Dates containing a four-digit year, month and a date. For example: date '2016-06-14'
- Time: Time of the day, in hours, minutes and seconds. For example: time '09:00:30'
- timestamp: date plus the time of day. For example: timestamp '2016-06-14 09:00:30.75'
- interval: the period of time. For example interval '1' day. Subtracting a date/time/timestamp value from another gives an interval value. The interval values can be added to date/time/timestamp values.
- Operations on complex types: Subtracting a date/time/timestamp value from another gives an interval value. Interval values can be added to date/time/timestamp values. Values of individual fields can be extracted from date/time/timestamp. String types can typically be cast to date/time/timestamp.
References:
- H.F.Korth and A. Silberschatz,"Database system concepts",McGraw Hill,2010
- A.K.Majumdar and p, Bhatt acharya,"Database Management Systems",Tata McGraw Hill,India,2004
- F.Korth, Henry. Database System Concepts. 6th edition.
Lesson
Relational Languages and Relational Model
Subject
Computer Engineering
Grade
Engineering
Recent Notes
No recent notes.
Related Notes
No related notes.