Monday, September 30, 2019

Stefan’s Diaries: Bloodlust Chapter 16-17

Chapter 16 I searched in vain for peaceful sleep but never found it. Instead when I closed my eyes I saw Damon, his legs curled around a hard wooden chair, his arms bound in ropes. His skin bled, the droplets a dark maroon where the vervain-soaked ropes bit into his flesh. Next came the images of Callie, her flame-colored hair flowing behind her, her eyes lit with a frightening passion. She and her father danced around Damon, my brothers form prone on the ground. They threw their hands in the air tauntingly, gripping wooden stakes, the ends so sharpened they reached a fine point. Their movements became more frenzied as they approached, readying their weapons But worst of all were the visions of Katherine. I would see her, looking beautiful as always, her porcelain face hovering above mine and her glossy mane tickling my shoulders. With a coy, knowing smile she would lean toward me, and then she would open her mouth. Her fangs glinted in the lamp light as they plunged into my neck. My eyes flew open. Sleep would not afford me any rest. My mind went to memories of Katherine. The human part of me–or what was left of it–hated her with every fiber of my being. My hand curled into a fist involuntarily when I thought of her, and how shed destroyed my family. But the vampire part of me missed what shed represented–stability and love. And just as that part of my soul would last for eternity, so too would the part of me that longed for her. I wanted her now, beside me, curled up in my sheets. I wanted her to lean against the windowsill and listen as I told her about Damon, and tell me, in her calm, even cold, matter-of-fact way what to do. Being with Katherine had made me fearless, confident. She had made everything seem possible. Even though I trusted Lexi, I knew she didnt trust me to take care of things she didnt believe that any plan I had would work. That was why Lexi reminded me so often of all the obstacles in my path. I longed for the Katherine I had fallen for, the one who seemed both fearless and to truly care for me. I wanted her by my side right now so I would feel less alone. But I knew that couldnt be. That Katherine had never really existed. Besides, she was gone, and she was never coming back. The door opened, and Lexi stood there, a goblet of animal blood in her hands. She brought it to my lips. I took a few deep sips, despite the disgust it called up in me. When I had drained the cup, she put it on the nightstand, then brushed my hair off my forehead. â€Å"Are you still going to the fight tonight?† â€Å"Are you going to try to stop me?† â€Å"No.† Lexi bit her lip. â€Å"Not so long as you simply leave it at saving your brother. Revenge is for humans–and killing Gallagher wont teach humans any lesson.† I nodded, all the while knowing Id use brute force if it was necessary to free Damon. â€Å"Good.† Lexi turned to leave. Halfway toward the door, she turned back and locked eyes with me, and her expression softened. â€Å"Youve cheated death once. I hope youll cheat it a second time.† After dressing, I walked to Lake Road with human speed. By the time I got there, it was past dusk. Lanterns and torches were set up around the perimeter of the fairgrounds, making the entire area look as if it was bathed in daylight. The circus tent was striped red and white, and surrounded by midway games and individual booths. â€Å"Fortunes Told!† a poster above one read. â€Å"See the Worlds Ugliest Woman–If You Dare!† proclaimed another. I could hear the chattering of some type of animal coming from a far corner, but I couldnt get a sense of where Damon was. Just then, Callie walked out of the main tent, trailed by her father and her two henchmen. She was wearing the same pair of overalls shed had on the night before over a mans linen shirt, and her hair fell around her shoulders. There was a smudge of dirt beneath her eye. I had a sudden urge to wipe it away but stuck my hands in my pocket instead. â€Å"Stefan!† she called, her face breaking into a smile. â€Å"Youre here. Father, this is the man I told you about.† Mr. Gallagher looked even more imposing up close. He towered above me, his dark brows knitted together. I kept my expression open, innocent. Lexi said Gallagher was a skilled vampire hunter–would he be able to detect the truth just by staring at me? â€Å"My daughter says youre curious about vampires,† he said. â€Å"Prove youre serious and work the ticket counter. Then we can talk.† â€Å"Yes, sir.† I nodded, feeling like Stefan the obedient child. â€Å"And, boy?† Gallagher asked, turning back toward me. â€Å"Yes?† â€Å"You want to place a bet on the fight? Winnerll take a lot. Could make you a fortune.† He raised an eyebrow. My eyes narrowed, and blood screamed through my veins, fast and hot. How dare this man ask me to bet on my brothers life? How dare he act so self-important when I could rip his throat out in an instant? â€Å"Stefan?† Callie asked warily. Forcing myself to calm down, I reached into the pockets of my well-worn britches and pulled them inside out. â€Å"Im afraid I have no money, sir. Thats why Im so grateful to have this job.† Gallagher took a step closer to me. â€Å"You say youre from Mississippi, boy?† He gazed at me curiously. â€Å"Your accent sounds more northern–maybe Virginian.† â€Å"My parents were from Virginia. I suppose their accent rubbed off on me,† I said in as casual a voice as I could muster. After a long moment, he nodded. â€Å"Well, when you rustle up some currency, come find me. In the meantime, Callie will show you the ropes. And son?† he called, turning on his heel. â€Å"Yes, sir?† I asked. â€Å"Ill be watching you.† Chapter 17 Dont be bothered by him,† Callie said, once her father was a safe distance away. â€Å"Im not,† I lied. Her green eyes flicked over me, as if she didnt believe my words. But she didnt press the issue. â€Å"Ill give you a quick tour,† she said, taking me into one of the smaller tents. In a corner, a woman was hunched over a mirror. She turned, and I took a step back. Her face was covered with tattoos, which, upon closer inspection, were courtesy of rapidly drying India ink. â€Å"The tattooed woman,† Callie said. â€Å"And the conjoined twins.† The woman and the twins next to her waved at us. The twins bodies were connected at the hip. They were beautiful, with blond hair and sad expressions. A man with flippers instead of arms whispered something in one of their ears. They glanced at each other, then broke into laughter. â€Å"This is the show.† Callie opened her hands wide, and for the first time I noticed a wooden stake dangling on a silver chain from her wrist. She also had a sprig of vervain tucked behind her ear. â€Å"Miss Callie!† A hulking, seven-foot-tall mountain of a man ducked under the door of the tent and walked toward us. He picked her up by her tiny waist and swung her around. â€Å"Arnold!† she said gleefully. â€Å"The worlds strongest man. Married to the bearded lady,† she explained to me before looking back up at Arnold. â€Å"How is Caroline feeling?† The giant shrugged. â€Å"Shes doing well. Cant wait to come back and introduce everyone to the babies.† â€Å"They just had twins!† Callie said fondly. I nodded my greeting to the man and gazed over Callies shoulder. Where were they keeping Damon? â€Å"Are you okay?† Callie asked. She brushed my arm, and I flinched when the vervain touched my skin. â€Å"I just need air,† I said, bursting out of the tent. Callie ran after me. â€Å"Im sorry, Stefan,† she said, her voice cold. â€Å"Some people dont like it here. Theyre not comfortable. But somehow I thought youd be different.† â€Å"No, its not that.† Even surrounded by these human curiosities, I was the biggest freak of them all: the vampire who pretended to be human. â€Å"Ive just got a lot on my mind. I promise you, I like it here.† â€Å"Okay,† she said, not sounding quite convinced. But she continued to lead me farther into the grounds. We passed a two-headed cat, a sad-looking monkey playing â€Å"Old Tom Dooley† on a harmonica, and the skeleton of what a sign declared to be a sea monster. Some freaks milling around were obviously actors, wearing fabric tubes filled with straw to simulate extra limbs, while others had been born that way. â€Å"Come with me,† Callie said as she tugged on my arm. But I stayed. A black iron wagon rolled up to the tent, similar to the one Father had used to round up vampires during the Mystic Falls siege. It stopped, and the driver jumped from the cart. Immediately, five burly men rushed up with stakes. Once they were in place, the driver unlocked the back of the wagon. The scent of vervain wafted in the air, causing my joints to ache. Damon. â€Å"And theres your vampire,† Callie said, her mouth set in a firm line as all five men dragged Damon from the back of the wagon. One burly man, his sweat-stained shirt rolled at the sleeves, kept a stake positioned firmly over his heart. â€Å"Gentle now, Jasper! We need him alive before the fight!† Callie called, her voice sharp. Damon turned, baring his teeth in our direction. I saw surprise in his eyes, which quickly turned into contempt. â€Å"My little brother, the good Samaritan,† he whispered under his breath, barely moving his jaw. Luckily, he said it low enough that only I heard. His voice sent a tremor through my body. Callie cocked her head, and I realized how risky it was for Damon and me to be in such close proximity. Would spite cause him to call me out as a fellow demon? â€Å"Are you sure I cant help with the vampire?† I asked her. â€Å"You heard my father. Well start you at the ticket counter. And if anyone tries to sneak in, let Buck handle them,† she said, gesturing to the hulking man hovering several paces behind her like a distended shadow. A commotion sounded in front of the tent. Callie let out a whistle as we approached. The front flap was closed tight, and a mass of people had surrounded a wooden ticket booth. Some, dressed in tattered britches and with dirt-stained hands, were clearly from the shantytown surrounding the lake. But others were dressed in their finest: the men in top hats and silk smoking jackets, the women in feather-adorned hats and silk dresses, fur stoles draped around their bosoms. Callie turned to me, her eyes shining. â€Å"Its never been so busy. Dads going to be so happy!† she said, clapping her hands together. â€Å"Now, go help Buck,† she commanded before running back around the tent. I stood in the wooden booth at the entrance, listening for Damon. But instead my ears filled with snatches of human conversation. â€Å"Ive got a hundred dollars on the lion.† â€Å"No, the vampire. Monsters always win over beasts.† â€Å"Ive told this pretty lady here that she owes me a kiss if the beast wins.† One man hiccupped, obviously drunk. I ground my teeth, wanting to lash out, to bite each and every one of them, to teach them a lesson. But I remembered Lexis words about revenge. Killing these men would not help Damon. A hand clapped my shoulder. I whirled around, ready to bare my teeth. It was Gallagher, his face flushed with excitement. â€Å"We have to hustle, son! The fights about to start, and the more we pack em in, the bigger the payday.† He hopped on an overturned apple crate standing just outside the entrance. â€Å"Step right up, folks! Welcome to my Odditorium! See the worlds ugliest woman, marvel at the worlds strongest man! But thats just the warm-up act. Because tonight, we have a battle royale, the likes of which have never been seen. Monster versus Beast. Who will win? And who wants to bet? Because this is one death that will lead to riches for some.† The crowd pressed in more tightly around me, swarming like a mass of hungry insects. Gallagher grinned at me. â€Å"Get em in, and get em bidding.† And so I held out my hand, collecting their coins and orange stubs of paper, all the while resisting the urge to reach out and snap their necks, as easily as I would a twig branch, and drink the liquid within.

Progesterone For Maintenance Tocolytic Therapy after Threatened Preterm Labour Essay

What was the sampling technique used and what are the advantages and disadvantages of using that technique? The researchers used a two-stage sampling method that was non-random in the first stage and randomized in the second stage. The total population was made up of 137 patients who were admitted for preterm labour. Selection from this initial population was non-random because there were exclusion criteria. The seventy women included were randomised to their treatment groups by assigning randomly generated numbers. The main advantage of using the technique was its simplicity and straightforwardness. Every individual who fit the inclusion criteria had equal chance of being selected. The disadvantage of the technique was that there was bias in the initial selection. Such bias could have affected the accuracy of the experiment. Was there randomisation? There was randomisation in the second stage of sampling, where all those women who fit the inclusion criteria were part of the sampling population. Randomisation was done by generating random numbers and assigning numbers to the women included in the study. Was it biased? There were several sources of bias in the study. The fact that the patients were all from the same clinic is already in itself introducing bias. The study was not double blind, which could also be a source of bias. The use of exclusion criteria in the first stage of sampling lessened the bias. In the second stage of sampling, efforts were done to further remove bias by assigning treatment to all included patients. No patient also left the study, thus further reducing bias. Describe the validity and power of the study Based on the researchers’ desired results, the statistical power of the study for improving latency was initially calculated be 80% with an assumption of getting standard deviation (SD) of 12 days at 5% level of significance. However, when their results came out, the power was calculated to be lower (value for this was not presented in the paper). By checking the means and SD for latency, and assuming a two-tailed analysis, power was calculated to be 51% only. This could be attributed to the high standard deviation that could in turn be due to the relatively small number of samples tested. In other similar studies, the sample population is much higher. For example, another study testing the effect of vaginal progesterone on preterm birth used 413 women (Eduardo B. Da Fonseca, et al. , 2007). Despite the low statistical power, the results presented here are valid as preliminary data on the supplementation of tocolytic therapy with vaginal progesterone to control preterm labour. The study was able to show that progesterone treatment had an effect on the other outcomes that were measured (please refer to Table 2 in the text). Background information of the hypothesis Progesterone is a steroid hormone that is widely used in hormone replacement therapy in menopausal women. It is also used to induce menstruation in women who suddenly stop menstruating. Its capacity to control preterm labour was first reported in the 1980s. Oral administration of progesterone induces side effects like migraine, dizziness, vomiting and blurred vision. This was the usual mode of administration of progesterone, which was proven effective to reduce preterm labour (Meis, et al. , 2003). Since 2003, studies have reported on the use of progesterone vaginal suppository to treat preterm labour (E. B. Da Fonseca, Bittar, Carvalho, & Zugaib, 2003) and even in high risk women (Eduardo B. Da Fonseca, et al. , 2007). Until this current study, there were no previous reports on the use of progesterone to supplement tocolytic therapy, using magnesium sulphate and intravenous ampicillin, on women who actually had preterm labour. Hypothesis of the study Null hypothesis: The use of vaginal progesterone after inhibition of preterm labour will not change latency period and recurrence of preterm labour. Alternate hypothesis (what the study really wants to prove): After the inhibition of preterm labour, treatment with vaginal progesterone will result in increased latency period and decreased recurrence of preterm labour. Methodology The study was conducted on 70 women who were had arrested uterine activity after they were treated for premature labour. The women were randomized to two groups; one was administered vaginal progesterone and the other, a placebo, until delivery. Subjects were monitored for days to latency until delivery, recurring preterm labour and other primary and secondary outcomes. Different statistical tests were used to determine if the treatments resulted in significantly different outcomes. Comparisons were done using Student’s t-test for quantitative data; chi-square and Fisher exact tests, among others, were used for categorical data. Conclusion of the study The study concluded that the use of vaginal progesterone after tocolytic therapy was effective in increasing latency to delivery but not in decreasing the incidence of recurrence of preterm labour. Is it a valid assumption based on the data of the study? Describe the applicability and relevance of the paper to clinical practice. The conclusion is valid based on the data of the study. The paper and the results presented are applicable and relevant to clinical practice because it proposes a new means of treating preterm labour for increased latency. Although the recurrence of preterm labour appeared not to be reduced with the treatment, this could be due to the advanced stage of the pregnancy when the preterm labour occurred or due to the small sampling population. It is significant to note that this is the first to report on the supplementation of tocolytic therapy with vaginal progesterone. Further studies can also be done to validate the results.

Saturday, September 28, 2019

Sql Study Matetial

Oracle/SQL Tutorial1 Michael Gertz Database and Information Systems Group Department of Computer Science University of California, Davis [email  protected] ucdavis. edu http://www. db. cs. ucdavis. edu This Oracle/SQL tutorial provides a detailed introduction to the SQL query language and the Oracle Relational Database Management System. Further information about Oracle and SQL can be found on the web site www. db. cs. ucdavis. edu/dbs. Comments, corrections, or additions to these notes are welcome. Many thanks to Christina Chung for comments on the previous version. Recommended LiteratureGeorge Koch and Kevin Loney: Oracle8 The Complete Reference (The Single Most Comprehensive Sourcebook for Oracle Server, Includes CD with electronic version of the book), 1299 pages, McGraw-Hill/Osborne, 1997. Michael Abbey and Michael Corey: Oracle8 : A Beginner’s Guide [A Thorough Introduction for First-time Users], 767 pages, McGraw-Hill/Osborne, 1997. Steven Feuerstein, Bill Pribyl, Deb by Russell: Oracle PL/SQL Programming (2nd Edition), O’Reilly & Associates, 1028 pages, 1997. C. J. Date and Hugh Darwen: A Guide to the SQL Standard (4th Edition), Addison-Wesley, 1997. Jim Melton and Alan R.Simon: Understanding the New SQL: A Complete Guide (2nd Edition, Dec 2000), The Morgan Kaufmann Series in Data Management Systems, 2000. 1 revised Version 1. 01, January 2000, Michael Gertz, Copyright 2000. Contents 1. SQL – Structured Query Language 1. 1. Tables 1. 2. Queries (Part I) 1. 3. Data De? nition in SQL 1. 4. Data Modi? cations in SQL 1. 5. Queries (Part II) 1. 6. Views 1 3 6 9 11 19 2. SQL*Plus (Minimal User Guide, Editor Commands, Help System) 20 3. Oracle Data Dictionary 23 4. Application Programming 4. 1. PL/SQL 4. 1. 1 Introduction 4. 1. 2 Structure of PL/SQL Blocks 4. 1. Declarations 4. 1. 4 Language Elements 4. 1. 5 Exception Handling 4. 1. 6 Procedures and Functions 4. 1. 7 Packages 4. 1. 8 Programming in PL/SQL 4. 2. Embedded SQL and Pro*C 26 2 7 27 28 32 34 36 38 39 5. Integrity Constraints and Triggers 5. 1. Integrity Constraints 5. 1. 1 Check Constraints 5. 1. 2 Foreign Key Constraints 5. 1. 3 More About Column- and Table Constraints 5. 2. Triggers 5. 2. 1 Overview 5. 2. 2 Structure of Triggers 5. 2. 3 Example Triggers 5. 2. 4 Programming Triggers 6. System Architecture 6. 1. Storage Management and Processes 6. 2. Logical Database Structures 6. 3.Physical Database Structures 6. 4. Steps in Processing an SQL Statement 6. 5. Creating Database Objects 46 47 49 50 50 53 55 58 60 61 63 63 1 SQL – Structured Query Language 1. 1 Tables In relational database systems (DBS) data are represented using tables (relations ). A query issued against the DBS also results in a table. A table has the following structure: Column 1 Column 2 . . . Column n †¦ †¦ †¦ †¦ A table is uniquely identi? ed by its name and consists of rows that contain the stored information, each row containing exactly one tuple (or recor d ). A table can have one or more columns.A column is made up of a column name and a data type, and it describes an attribute of the tuples. The structure of a table, also called relation schema, thus is de? ned by its attributes. The type of information to be stored in a table is de? ned by the data types of the attributes at table creation time. SQL uses the terms table, row, and column for relation, tuple, and attribute, respectively. In this tutorial we will use the terms interchangeably. A table can have up to 254 columns which may have di? erent or same data types and sets of values (domains), respectively.Possible domains are alphanumeric data (strings), numbers and date formats. Oracle o? ers the following basic data types: †¢ char(n): Fixed-length character data (string), n characters long. The maximum size for n is 255 bytes (2000 in Oracle8). Note that a string of type char is always padded on right with blanks to full length of n. ( can be memory consuming). Exampl e: char(40) †¢ varchar2(n): Variable-length character string. The maximum size for n is 2000 (4000 in Oracle8). Only the bytes used for a string require storage. Example: varchar2(80) †¢ number(o, d): Numeric data type for integers and reals. = overall number of digits, d = number of digits to the right of the decimal point. Maximum values: o =38, d= ? 84 to +127. Examples: number(8), number(5,2) Note that, e. g. , number(5,2) cannot contain anything larger than 999. 99 without resulting in an error. Data types derived from number are int[eger], dec[imal], smallint and real. †¢ date: Date data type for storing date and time. The default format for a date is: DD-MMM-YY. Examples : ’13-OCT-94’, ’07-JAN-98’ 1 †¢ long: Character data up to a length of 2GB. Only one long column is allowed per table. Note: In Oracle-SQL there is no data type boolean.It can, however, be simulated by using either char(1) or number(1). As long as no constraint restricts the possible values of an attribute, it may have the special value null (for unknown). This value is di? erent from the number 0, and it is also di? erent from the empty string ’’. Further properties of tables are: †¢ the order in which tuples appear in a table is not relevant (unless a query requires an explicit sorting). †¢ a table has no duplicate tuples (depending on the query, however, duplicate tuples can appear in the query result). A database schema is a set of relation schemas.The extension of a database schema at database run-time is called a database instance or database, for short. 1. 1. 1 Example Database In the following discussions and examples we use an example database to manage information about employees, departments and salary scales. The corresponding tables can be created under the UNIX shell using the command demobld. The tables can be dropped by issuing the command demodrop under the UNIX shell. The table EMP is used to store information about employees: EMPNO ENAME JOB MGR HIREDATE SAL DEPTNO 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 30 7521WARD SALESMAN 7698 22-FEB-81 1250 30 †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. 7698 BLAKE MANAGER 01-MAY-81 3850 30 7902 FORD ANALYST 7566 03-DEC-81 3000 10 For the attributes, the following data types are de? ned: EMPNO:number(4), ENAME:varchar2(30), JOB:char(10), MGR:number(4), HIREDATE:date, SAL:number(7,2), DEPTNO:number(2) Each row (tuple) from the table is interpreted as follows: an employee has a number, a name, a job title and a salary. Furthermore, for each employee the number of his/her manager, the date he/she was hired, and the number of the department where he/she is working are stored. 2The table DEPT stores information about departments (number, name, and location): DEPTNO 10 20 30 40 DNAME STORE RESEARCH SALES MARKETING L OC CHICAGO DALLAS NEW YORK BOSTON Finally, the table SALGRADE contains all information about the salary scales, more precisely, the maximum and minimum salary of each scale. GRADE 1 2 3 4 5 1. 2 LOSAL 700 1201 1401 2001 3001 HISAL 1200 1400 2000 3000 9999 Queries (Part I) In order to retrieve the information stored in the database, the SQL query language is used. In the following we restrict our attention to simple SQL queries and defer the discussion of more complex queries to Section 1. In SQL a query has the following (simpli? ed) form (components in brackets [ ] are optional): select [distinct] from [ where ] [ order by ] 1. 2. 1 Selecting Columns The columns to be selected from a table are speci? ed after the keyword select. This operation is also called projection. For example, the query select LOC, DEPTNO from DEPT; lists only the number and the location for each tuple from the relation DEPT. If all columns should be selected, the asterisk symbol â€Å"? † can be used to denote all attributes. The query select ? from EMP; retrieves all tuples with all columns from the table EMP.Instead of an attribute name, the select clause may also contain arithmetic expressions involving arithmetic operators etc. select ENAME, DEPTNO, SAL ? 1. 55 from EMP; 3 For the di? erent data types supported in Oracle, several operators and functions are provided: †¢ for numbers: abs, cos, sin, exp, log, power, mod, sqrt, +, ? , ? , /, . . . †¢ for strings: chr, concat(string1, string2), lower, upper, replace(string, search string, replacement string), translate, substr(string, m, n), length, to date, . . . †¢ for the date data type: add month, month between, next day, to char, . . The usage of these operations is described in detail in the SQL*Plus help system (see also Section 2). Consider the query select DEPTNO from EMP; which retrieves the department number for each tuple. Typically, some numbers will appear more than only once in the query result, tha t is, duplicate result tuples are not automatically eliminated. Inserting the keyword distinct after the keyword select, however, forces the elimination of duplicates from the query result. It is also possible to specify a sorting order in which the result tuples of a query are displayed.For this the order by clause is used and which has one or more attributes listed in the select clause as parameter. desc speci? es a descending order and asc speci? es an ascending order (this is also the default order). For example, the query select ENAME, DEPTNO, HIREDATE from EMP; from EMP order by DEPTNO [asc], HIREDATE desc; displays the result in an ascending order by the attribute DEPTNO. If two tuples have the same attribute value for DEPTNO, the sorting criteria is a descending order by the attribute values of HIREDATE. For the above query, we would get the following output: ENAME DEPTNO HIREDATEFORD 10 03-DEC-81 SMITH 20 17-DEC-80 BLAKE 30 01-MAY-81 WARD 30 22-FEB-81 ALLEN 30 20-FEB-81 â⠂¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ 1. 2. 2 Selection of Tuples Up to now we have only focused on selecting (some) attributes of all tuples from a table. If one is interested in tuples that satisfy certain conditions, the where clause is used. In a where clause simple conditions based on comparison operators can be combined using the logical connectives and, or, and not to form complex conditions. Conditions may also include pattern matching operations and even subqueries (Section 1. 5). 4 Example:List the job title and the salary of those employees whose manager has the number 7698 or 7566 and who earn more than 1500: select JOB, SAL from EMP where (MGR = 7698 or MGR = 7566) and SAL > 1500; For all data types, the comparison operators =, ! = or , , are allowed in the conditions of a where clause. Further comparison operators are: †¢ Set Conditions: [not] in () Example: select ? from DEPT where DEPTNO in (20,30); †¢ Null value: is [not] null, i. e. , for a tuple to be selected there must (not) exist a de? ned value for this column. Example: select ? from EMP where MGR is not null; Note: the operations = null and ! null are not de? ned! †¢ Domain conditions: [not] between and Example: †¢ select EMPNO, ENAME, SAL from EMP where SAL between 1500 and 2500; †¢ select ENAME from EMP where HIREDATE between ’02-APR-81’ and ’08-SEP-81’; 1. 2. 3 String Operations In order to compare an attribute with a string, it is required to surround the string by apostrophes, e. g. , where LOCATION = ’DALLAS’. A powerful operator for pattern matching is the like operator. Together with this operator, two special characters are used: the percent sign % (also called wild card), and the underline , also called position marker.For example, if one is interested in all tuples of the table DEPT that contain two C in the name of the department, the condition would be where DNAME like ’%C%C%â⠂¬â„¢. The percent sign means that any (sub)string is allowed there, even the empty string. In contrast, the underline stands for exactly one character. Thus the condition where DNAME like ’%C C%’ would require that exactly one character appears between the two Cs. To test for inequality, the not clause is used. Further string operations are: †¢ upper() takes a string and converts any letters in it to uppercase, e. g. DNAME = upper(DNAME) (The name of a department must consist only of upper case letters. ) †¢ lower() converts any letter to lowercase, †¢ initcap() converts the initial letter of every word in to uppercase. †¢ length() returns the length of the string. †¢ substr(, n [, m]) clips out a m character piece of , starting at position n. If m is not speci? ed, the end of the string is assumed. substr(’DATABASE SYSTEMS’, 10, 7) returns the string ’SYSTEMS’. 5 1. 2. 4 Aggregate Functions Aggregate functions are statistical functions such as count, min, max etc. They are used to compute a single value from a set of attribute values of a column: count ax min sum avg Note: 1. 3 1. 3. 1 Counting Rows Example: How many tuples are stored in the relation EMP? select count(? ) from EMP; Example: How many di? erent job titles are stored in the relation EMP? select count(distinct JOB) from EMP; Maximum value for a column Minimum value for a column Example: List the minimum and maximum salary. select min(SAL), max(SAL) from EMP; Example: Compute the di? erence between the minimum and maximum salary. select max(SAL) – min(SAL) from EMP; Computes the sum of values (only applicable to the data type number) Example: Sum of all salaries of employees working in the department 30. elect sum(SAL) from EMP where DEPTNO = 30; Computes average value for a column (only applicable to the data type number) avg, min and max ignore tuples that have a null value for the speci? ed attribute, but count considers null values. Data De? nition in SQL Creating Tables The SQL command for creating an empty table has the following form: create table ( [not null] [unique] [], †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ [not null] [unique] [], [] ); For each column, a name and a data type must be speci? ed and the column name must be unique within the table de? nition. Column de? nitions are separated by colons. There is no di? rence between names in lower case letters and names in upper case letters. In fact, the only place where upper and lower case letters matter are strings comparisons. A not null 6 constraint is directly speci? ed after the data type of the column and the constraint requires de? ned attribute values for that column, di? erent from null. The keyword unique speci? es that no two tuples can have the same attribute value for this column. Unless the condition not null is also speci? ed for this column, the attribute value null is allowed and two tuples having the attribute value null for this column do not violate the constraint.Example: The create table statement for our EMP table has the form create table EMP ( EMPNO number(4) not null, ENAME varchar2(30) not null, JOB varchar2(10), MGR number(4), HIREDATE date, SAL number(7,2), DEPTNO number(2) ); Remark: Except for the columns EMPNO and ENAME null values are allowed. 1. 3. 2 Constraints The de? nition of a table may include the speci? cation of integrity constraints. Basically two types of constraints are provided: column constraints are associated with a single column whereas table constraints are typically associated with more than one column.However, any column constraint can also be formulated as a table constraint. In this section we consider only very simple constraints. More complex constraints will be discussed in Section 5. 1. The speci? cation of a (simple) constraint has the following form: [constraint ] primary key | unique | not null A constraint can be named. It is advisable to name a constraint in order to get m ore meaningful information when this constraint is violated due to, e. g. , an insertion of a tuple that violates the constraint. If no name is speci? ed for the constraint, Oracle automatically generates a name of the pattern SYS C.The two most simple types of constraints have already been discussed: not null and unique. Probably the most important type of integrity constraints in a database are primary key constraints. A primary key constraint enables a unique identi? cation of each tuple in a table. Based on a primary key, the database system ensures that no duplicates appear in a table. For example, for our EMP table, the speci? cation create table EMP ( EMPNO number(4) constraint pk emp primary key, . . . ); 7 de? nes the attribute EMPNO as the primary key for the table. Each value for the attribute EMPNO thus must appear only once in the table EMP.A table, of course, may only have one primary key. Note that in contrast to a unique constraint, null values are not allowed. Examp le: We want to create a table called PROJECT to store information about projects. For each project, we want to store the number and the name of the project, the employee number of the project’s manager, the budget and the number of persons working on the project, and the start date and end date of the project. Furthermore, we have the following conditions: – a project is identi? ed by its project number, – the name of a project must be unique, – the manager and the budget must be de? ed. Table de? nition: create table PROJECT ( PNO number(3) constraint prj pk primary key, PNAME varchar2(60) unique, PMGR number(4) not null, PERSONS number(5), BUDGET number(8,2) not null, PSTART date, PEND date); A unique constraint can include more than one attribute. In this case the pattern unique(, . . . , ) is used. If it is required, for example, that no two projects have the same start and end date, we have to add the table constraint constraint no same dates unique( PEND, PSTART) This constraint has to be de? ned in the create table command after both columns PEND and PSTART have been de? ed. A primary key constraint that includes more than only one column can be speci? ed in an analogous way. Instead of a not null constraint it is sometimes useful to specify a default value for an attribute if no value is given, e. g. , when a tuple is inserted. For this, we use the default clause. Example : If no start date is given when inserting a tuple into the table PROJECT, the project start date should be set to January 1st, 1995: PSTART date default(’01-JAN-95’) Note: Unlike integrity constraints, it is not possible to specify a name for a default. 8 1. 3. 3 Checklist for Creating TablesThe following provides a small checklist for the issues that need to be considered before creating a table. †¢ What are the attributes of the tuples to be stored? What are the data types of the attributes? Should varchar2 be used instead of char ? â⠂¬ ¢ Which columns build the primary key? †¢ Which columns do (not) allow null values? Which columns do (not) allow duplicates ? †¢ Are there default values for certain columns that allow null values ? 1. 4 Data Modi? cations in SQL After a table has been created using the create table command, tuples can be inserted into the table, or tuples can be deleted or modi? ed. 1. 4. 1Insertions The most simple way to insert a tuple into a table is to use the insert statement insert into [()] values (); For each of the listed columns, a corresponding (matching) value must be speci? ed. Thus an insertion does not necessarily have to follow the order of the attributes as speci? ed in the create table statement. If a column is omitted, the value null is inserted instead. If no column list is given, however, for each column as de? ned in the create table statement a value must be given. Examples: insert into PROJECT(PNO, PNAME, PERSONS, BUDGET, PSTART) values(313, ’DBS’, 4, 150000. 42, ’10-OCT-94’); r insert into PROJECT values(313, ’DBS’, 7411, null, 150000. 42, ’10-OCT-94’, null); If there are already some data in other tables, these data can be used for insertions into a new table. For this, we write a query whose result is a set of tuples to be inserted. Such an insert statement has the form insert into [()] Example: Suppose we have de? ned the following table: 9 create table OLDEMP ( ENO number(4) not null, HDATE date); We now can use the table EMP to insert tuples into this new relation: insert into OLDEMP (ENO, HDATE) select EMPNO, HIREDATE from EMP where HIREDATE < ’31-DEC-60’; 1. 4. 2 UpdatesFor modifying attribute values of (some) tuples in a table, we use the update statement: update set = , . . . , = [where ]; An expression consists of either a constant (new value), an arithmetic or string operation, or an SQL query. Note that the new value to assign to must a the matching data typ e. An update statement without a where clause results in changing respective attributes of all tuples in the speci? ed table. Typically, however, only a (small) portion of the table requires an update. Examples: †¢ The employee JONES is transfered to the department 20 as a manager and his salary is increased by 1000: pdate EMP set JOB = ’MANAGER’, DEPTNO = 20, SAL = SAL +1000 where ENAME = ’JONES’; †¢ All employees working in the departments 10 and 30 get a 15% salary increase. update EMP set SAL = SAL ? 1. 15 where DEPTNO in (10,30); Analogous to the insert statement, other tables can be used to retrieve data that are used as new values. In such a case we have a instead of an . Example: All salesmen working in the department 20 get the same salary as the manager who has the lowest salary among all managers. update EMP set SAL = (select min(SAL) from EMP where JOB = ’MANAGER’) where JOB = ’SALESMAN’ and DEPTNO = 20;Ex planation: The query retrieves the minimum salary of all managers. This value then is assigned to all salesmen working in department 20. 10 It is also possible to specify a query that retrieves more than only one value (but still only one tuple! ). In this case the set clause has the form set() = . It is important that the order of data types and values of the selected row exactly correspond to the list of columns in the set clause. 1. 4. 3 Deletions All or selected tuples can be deleted from a table using the delete command: delete from [where ]; If the where clause is omitted, all tuples are deleted from the table.An alternative command for deleting all tuples from a table is the truncate table command. However, in this case, the deletions cannot be undone (see subsequent Section 1. 4. 4). Example: Delete all projects (tuples) that have been ? nished before the actual date (system date): delete from PROJECT where PEND < sysdate; sysdate is a function in SQL that returns the system date. Another important SQL function is user, which returns the name of the user logged into the current Oracle session. 1. 4. 4 Commit and Rollback A sequence of database modi? cations, i. e. , a sequence of insert, update, and delete statements, is called a transaction.Modi? cations of tuples are temporarily stored in the database system. They become permanent only after the statement commit; has been issued. As long as the user has not issued the commit statement, it is possible to undo all modi? cations since the last commit. To undo modi? cations, one has to issue the statement rollback;. It is advisable to complete each modi? cation of the database with a commit (as long as the modi? cation has the expected e? ect). Note that any data de? nition command such as create table results in an internal commit. A commit is also implicitly executed when the user terminates an Oracle session. . 5 Queries (Part II) In Section 1. 2 we have only focused on queries that refer to exactly o ne table. Furthermore, conditions in a where were restricted to simple comparisons. A major feature of relational databases, however, is to combine (join) tuples stored in di? erent tables in order to display more meaningful and complete information. In SQL the select statement is used for this kind of queries joining relations: 11 select [distinct] [. ], . . . , [. ] from [], . . . , [] [where ] The speci? cation of table aliases in the from clause is necessary to refer to columns that have the same name in di? rent tables. For example, the column DEPTNO occurs in both EMP and DEPT. If we want to refer to either of these columns in the where or select clause, a table alias has to be speci? ed and put in the front of the column name. Instead of a table alias also the complete relation name can be put in front of the column such as DEPT. DEPTNO, but this sometimes can lead to rather lengthy query formulations. 1. 5. 1 Joining Relations Comparisons in the where clause are used to comb ine rows from the tables listed in the from clause. Example : In the table EMP only the numbers of the departments are stored, not their name.For each salesman, we now want to retrieve the name as well as the number and the name of the department where he is working: select ENAME, E. DEPTNO, DNAME from EMP E, DEPT D where E. DEPTNO = D. DEPTNO and JOB = ’SALESMAN’; Explanation: E and D are table aliases for EMP and DEPT, respectively. The computation of the query result occurs in the following manner (without optimization): 1. Each row from the table EMP is combined with each row from the table DEPT (this operation is called Cartesian product ). If EMP contains m rows and DEPT contains n rows, we thus get n ? m rows. 2.From these rows those that have the same department number are selected (where E. DEPTNO = D. DEPTNO). 3. From this result ? nally all rows are selected for which the condition JOB = ’SALESMAN’ holds. In this example the joining condition f or the two tables is based on the equality operator â€Å"=†. The columns compared by this operator are called join columns and the join operation is called an equijoin. Any number of tables can be combined in a select statement. Example: For each project, retrieve its name, the name of its manager, and the name of the department where the manager is working: select ENAME, DNAME, PNAME rom EMP E, DEPT D, PROJECT P where E. EMPNO = P. MGR and D. DEPTNO = E. DEPTNO; 12 It is even possible to join a table with itself: Example: List the names of all employees together with the name of their manager: select E1. ENAME, E2. ENAME from EMP E1, EMP E2 where E1. MGR = E2. EMPNO; Explanation: The join columns are MGR for the table E1 and EMPNO for the table E2. The equijoin comparison is E1. MGR = E2. EMPNO. 1. 5. 2 Subqueries Up to now we have only concentrated on simple comparison conditions in a where clause, i. e. , we have compared a column with a constant or we have compared two c olumns.As we have already seen for the insert statement, queries can be used for assignments to columns. A query result can also be used in a condition of a where clause. In such a case the query is called a subquery and the complete select statement is called a nested query. A respective condition in the where clause then can have one of the following forms: 1. Set-valued subqueries [not] in () [any|all] () An can either be a column or a computed value. 2. Test for (non)existence [not] exists () In a where clause conditions using subqueries can be combined arbitrarily by using the logical connectives and and or.Example: List the name and salary of employees of the department 20 who are leading a project that started before December 31, 1990: select ENAME, SAL from EMP where EMPNO in (select PMGR from PROJECT where PSTART < ’31-DEC-90’) and DEPTNO =20; Explanation: The subquery retrieves the set of those employees who manage a project that started before December 31, 1 990. If the employee working in department 20 is contained in this set (in operator), this tuple belongs to the query result set. Example: List all employees who are working in a department located in BOSTON: 13 select ? from EMP where DEPTNO in select DEPTNO from DEPT where LOC = ’BOSTON’); The subquery retrieves only one value (the number of the department located in Boston). Thus it is possible to use â€Å"=† instead of in. As long as the result of a subquery is not known in advance, i. e. , whether it is a single value or a set, it is advisable to use the in operator. A subquery may use again a subquery in its where clause. Thus conditions can be nested arbitrarily. An important class of subqueries are those that refer to its surrounding (sub)query and the tables listed in the from clause, respectively. Such type of queries is called correlated subqueries.Example: List all those employees who are working in the same department as their manager (note that co mponents in [ ] are optional: select ? from EMP E1 where DEPTNO in (select DEPTNO from EMP [E] where [E. ]EMPNO = E1. MGR); Explanation: The subquery in this example is related to its surrounding query since it refers to the column E1. MGR. A tuple is selected from the table EMP (E1) for the query result if the value for the column DEPTNO occurs in the set of values select in the subquery. One can think of the evaluation of this query as follows: For each tuple in the table E1, the subquery is evaluated individually.If the condition where DEPTNO in . . . evaluates to true, this tuple is selected. Note that an alias for the table EMP in the subquery is not necessary since columns without a preceding alias listed there always refer to the innermost query and tables. Conditions of the form [any|all] are used to compare a given with each value selected by . †¢ For the clause any, the condition evaluates to true if there exists at least on row selected by the subquery for which the comparison holds. If the subquery yields an empty result set, the condition is not satis? ed. For the clause all, in contrast, the condition evaluates to true if for all rows selected by the subquery the comparison holds. In this case the condition evaluates to true if the subquery does not yield any row or value. Example: Retrieve all employees who are working in department 10 and who earn at least as much as any (i. e. , at least one) employee working in department 30: select ? from EMP where SAL >= any (select SAL from EMP where DEPTNO = 30) and DEPTNO = 10; 14 Note: Also in this subquery no aliases are necessary since the columns refer to the innermost from clause.Example: List all employees who are not working in department 30 and who earn more than all employees working in department 30: select ? from EMP where SAL > all (select SAL from EMP where DEPTNO = 30) and DEPTNO 30; For all and any, the following equivalences hold: in ? = any not in ? all or ! = all Often a query resu lt depends on whether certain rows do (not) exist in (other) tables. Such type of queries is formulated using the exists operator. Example: List all departments that have no employees: select ? from DEPT where not exists (select ? from EMP where DEPTNO = DEPT.DEPTNO); Explanation: For each tuple from the table DEPT, the condition is checked whether there exists a tuple in the table EMP that has the same department number (DEPT. DEPTNO). In case no such tuple exists, the condition is satis? ed for the tuple under consideration and it is selected. If there exists a corresponding tuple in the table EMP, the tuple is not selected. 1. 5. 3 Operations on Result Sets Sometimes it is useful to combine query results from two or more queries into a single result. SQL supports three set operators which have the pattern: The set operators are: union [all] returns a table consisting of all rows either appearing in the result of or in the result of . Duplicates are automatically eliminated unless the clause all is used. †¢ intersect returns all rows that appear in both results and . †¢ minus returns those rows that appear in the result of but not in the result of . 15 Example: Assume that we have a table EMP2 that has the same structure and columns as the table EMP: †¢ All employee numbers and names from both tables: select EMPNO, ENAME from EMP union select EMPNO, ENAME from EMP2; †¢ Employees who are listed in both EMP and EMP2: select ? from EMP intersect select ? from EMP2; Employees who are only listed in EMP: select ? from EMP minus select ? from EMP2; Each operator requires that both tables have the same data types for the columns to which the operator is applied. 1. 5. 4 Grouping In Section 1. 2. 4 we have seen how aggregate functions can be used to compute a single value for a column. Often applications require grouping rows that have certain properties and then applying an aggregate function on one column for each group separately. For this, SQ L provides the clause group by . This clause appears after the where clause and must refer to columns of tables listed in the from clause. select from here group by [having ]; Those rows retrieved by the selected clause that have the same value(s) for are grouped. Aggregations speci? ed in the select clause are then applied to each group separately. It is important that only those columns that appear in the clause can be listed without an aggregate function in the select clause ! Example: For each department, we want to retrieve the minimum and maximum salary. select DEPTNO, min(SAL), max(SAL) from EMP group by DEPTNO; Rows from the table EMP are grouped such that all rows in a group have the same department number. The aggregate functions are then applied to each such group.We thus get the following query result: 16 DEPTNO 10 20 30 MIN(SAL) 1300 800 950 MAX(SAL) 5000 3000 2850 Rows to form a group can be restricted in the where clause. For example, if we add the condition where JOB = ’CLERK’, only respective rows build a group. The query then would retrieve the minimum and maximum salary of all clerks for each department. Note that is not allowed to specify any other column than DEPTNO without an aggregate function in the select clause since this is the only column listed in the group by clause (is it also easy to see that other columns would not make any sense).Once groups have been formed, certain groups can be eliminated based on their properties, e. g. , if a group contains less than three rows. This type of condition is speci? ed using the having clause. As for the select clause also in a having clause only and aggregations can be used. Example: Retrieve the minimum and maximum salary of clerks for each department having more than three clerks. select DEPTNO, min(SAL), max(SAL) from EMP where JOB = ’CLERK’ group by DEPTNO having count(? ) > 3; Note that it is even possible to specify a subquery in a having clause.In the above query, for example, instead of the constant 3, a subquery can be speci? ed. A query containing a group by clause is processed in the following way: 1. Select all rows that satisfy the condition speci? ed in the where clause. 2. From these rows form groups according to the group by clause. 3. Discard all groups that do not satisfy the condition in the having clause. 4. Apply aggregate functions to each group. 5. Retrieve values for the columns and aggregations listed in the select clause. 1. 5. 5 Some Comments on Tables Accessing tables of other usersProvided that a user has the privilege to access tables of other users (see also Section 3), she/he can refer to these tables in her/his queries. Let be a user in the Oracle system and a table of this user. This table can be accessed by other (privileged) users using the command select ? from . ; 17 In case that one often refers to tables of other users, it is useful to use a synonym instead of .. In Oracle-SQL a synonym can be created u sing the command create synonym for . ; It is then possible to use simply in a from clause. Synonyms can also be created for one’s own tables. Adding Comments to De? nitionsFor applications that include numerous tables, it is useful to add comments on table de? nitions or to add comments on columns. A comment on a table can be created using the command comment on table is ’’; A comment on a column can be created using the command comment on column . is ’’; Comments on tables and columns are stored in the data dictionary. They can be accessed using the data dictionary views USER TAB COMMENTS and USER COL COMMENTS (see also Section 3). Modifying Table- and Column De? nitions It is possible to modify the structure of a table (the relation schema) even if rows have already been inserted into this table.A column can be added using the alter table command alter table add( [default ] []); If more than only one column should be added at one time, respectiv e add clauses need to be separated by colons. A table constraint can be added to a table using alter table add (); Note that a column constraint is a table constraint, too. not null and primary key constraints can only be added to a table if none of the speci? ed columns contains a null value. Table de? nitions can be modi? ed in an analogous way. This is useful, e. g. , when the size of strings that can be stored needs to be increased.The syntax of the command for modifying a column is alter table modify( [] [default ] []); Note: In earlier versions of Oracle it is not possible to delete single columns from a table de? nition. A workaround is to create a temporary table and to copy respective columns and rows into this new table. Furthermore, it is not possible to rename tables or columns. In the most recent version (9i), using the alter table command, it is possible to rename a table, columns, and constraints. In this version, there also exists a drop column clause as part of the alter table statement. Deleting a TableA table and its rows can be deleted by issuing the command drop table [cascade constraints];. 18 1. 6 Views In Oracle the SQL command to create a view (virtual table) has the form create [or replace] view [()] as [with check option [constraint ]]; The optional clause or replace re-creates the view if it already exists. names the columns of the view. If is not speci? ed in the view de? nition, the columns of the view get the same names as the attributes listed in the select statement (if possible). Example: The following view contains the name, job title and the annual salary of employees working in the department 20: create view DEPT20 as elect ENAME, JOB, SAL? 12 ANNUAL SALARY from EMP where DEPTNO = 20; In the select statement the column alias ANNUAL SALARY is speci? ed for the expression SAL? 12 and this alias is taken by the view. An alternative formulation of the above view de? nition is create view DEPT20 (ENAME, JOB, ANNUAL SALARY) as se lect ENAME, JOB, SAL ? 12 from EMP where DEPTNO = 20; A view can be used in the same way as a table, that is, rows can be retrieved from a view (also respective rows are not physically stored, but derived on basis of the select statement in the view de? ition), or rows can even be modi? ed. A view is evaluated again each time it is accessed. In Oracle SQL no insert, update, or delete modi? cations on views are allowed that use one of the following constructs in the view de? nition: †¢ Joins †¢ Aggregate function such as sum, min, max etc. †¢ set-valued subqueries (in, any, all) or test for existence (exists) †¢ group by clause or distinct clause In combination with the clause with check option any update or insertion of a row into the view is rejected if the new/modi? ed row does not meet the view de? nition, i. e. these rows would not be selected based on the select statement. A with check option can be named using the constraint clause. A view can be deleted us ing the command delete . 19 2 SQL*Plus Introduction SQL*Plus is the interactive (low-level) user interface to the Oracle database management system. Typically, SQL*Plus is used to issue ad-hoc queries and to view the query result on the screen. Some of the features of SQL*Plus are: †¢ A built-in command line editor can be used to edit (incorrect) SQL queries. Instead of this line editor any editor installed on the computer can be invoked. There are numerous commands to format the output of a query. †¢ SQL*Plus provides an online-help. †¢ Query results can be stored in ? les which then can be printed. Queries that are frequently issued can be saved to a ? le and invoked later. Queries can be parameterized such that it is possible to invoke a saved query with a parameter. A Minimal User Guide Before you start SQL*Plus make sure that the following UNIX shell variables are properly set (shell variables can be checked using the env command, e. g. , env | grep ORACLE): â₠¬ ¢ ORACLE HOME, e. g. , ORACLE HOME=/usr/pkg/oracle/734 †¢ ORACLE SID, e. , ORACLE SID=prod In order to invoke SQL*Plus from a UNIX shell, the command sqlplus has to be issued. SQL*Plus then displays some information about the product, and prompts you for your user name and password for the Oracle system. gertz(catbert)54: sqlplus SQL*Plus: Release 3. 3. 4. 0. 1 – Production on Sun Dec 20 19:16:52 1998 Copyright (c) Oracle Corporation 1979, 1996. All rights reserved. Enter user-name: scott Enter password: Connected to: Oracle7 Server Release 7. 3. 4. 0. 1 – Production Release With the distributed option PL/SQL Release 2. 3. 4. 0. 0 – Production SQL> 20SQL> is the prompt you get when you are connected to the Oracle database system. In SQL*Plus you can divide a statement into separate lines, each continuing line is indicated by a prompt such 2>, 3> etc. An SQL statement must always be terminated by a semicolon (;). In addition to the SQL statements discussed in the previous section, SQL*Plus provides some special SQL*Plus commands. These commands need not be terminated by a semicolon. Upper and lower case letters are only important for string comparisons. An SQL query can always be interrupted by using C. To exit SQL*Plus you can either type exit or quit.Editor Commands The most recently issued SQL statement is stored in the SQL bu? er, independent of whether the statement has a correct syntax or not. You can edit the bu? er using the following commands: †¢ l[ist] lists all lines in the SQL bu? er and sets the current line (marked with an †? †) to the last line in the bu? er. †¢ l sets the actual line to †¢ c[hange]// replaces the ? rst occurrence of by (for the actual line) †¢ a[ppend] appends to the current line †¢ del deletes the current line †¢ r[un] executes the current bu? er contents †¢ get reads the data from the ? le into the bu? er †¢ save writes the current bu? r into the ? le †¢ edit invokes an editor and loads the current bu? er into the editor. After exiting the editor the modi? ed SQL statement is stored in the bu? er and can be executed (command r). The editor can be de? ned in the SQL*Plus shell by typing the command de? ne editor = , where can be any editor such as emacs, vi, joe, or jove. SQL*Plus Help System and Other Useful Commands †¢ To get the online help in SQL*Plus just type help , or just help to get information about how to use the help command. In Oracle Version 7 one can get the complete list of possible commands by typing help command. To change the password, in Oracle Version 7 the command alter user identi? ed by ; is used. In Oracle Version 8 the command passw prompts the user for the old/new password. †¢ The command desc[ribe] lists all columns of the given table together with their data types and information about whether null values are allowed or not. †¢ You can invoke a UNIX command from the SQL*Plus she ll by using host . For example, host ls -la *. sql lists all SQL ? les in the current directory. 21 †¢ You can log your SQL*Plus session and thus queries and query results by using the command spool .All information displayed on screen is then stored in which automatically gets the extension . lst. The command spool o? turns spooling o?. †¢ The command copy can be used to copy a complete table. For example, the command copy from scott/tiger create EMPL using select ? from EMP; copies the table EMP of the user scott with password tiger into the relation EMPL. The relation EMP is automatically created and its structure is derived based on the attributes listed in the select clause. †¢ SQL commands saved in a ? le . sql can be loaded into SQL*Plus and executed using the command @. Comments are introduced by the clause rem[ark] (only allowed between SQL statements), or – – (allowed within SQL statements). Formatting the Output SQL*Plus provides numerous comm ands to format query results and to build simple reports. For this, format variables are set and these settings are only valid during the SQL*Plus session. They get lost after terminating SQL*Plus. It is, however, possible to save settings in a ? le named login. sql in your home directory. Each time you invoke SQL*Plus this ? le is automatically loaded. The command column . . . is used to format columns of your query result.The most frequently used options are: †¢ format A For alphanumeric data, this option sets the length of to . For columns having the data type number, the format command can be used to specify the format before and after the decimal point. For example, format 99,999. 99 speci? es that if a value has more than three digits in front of the decimal point, digits are separated by a colon, and only two digits are displayed after the decimal point. †¢ The option heading relabels and gives it a new heading. †¢ null is used to specify the output of null val ues (typically, null values are not displayed). column clear deletes the format de? nitions for . The command set linesize can be used to set the maximum length of a single line that can be displayed on screen. set pagesize sets the total number of lines SQL*Plus displays before printing the column names and headings, respectively, of the selected rows. Several other formatting features can be enabled by setting SQL*Plus variables. The command show all displays all variables and their current values. To set a variable, type set . For example, set timing on causes SQL*Plus to display timing statistics for each SQL command that is executed. et pause on [] makes SQL*Plus wait for you to press Return after the number of lines de? ned by set pagesize has been displayed. is the message SQL*Plus will display at the bottom of the screen as it waits for you to hit Return. 22 3 Oracle Data Dictionary The Oracle data dictionary is one of the most important components of the Oracle DBMS. It con tains all information about the structures and objects of the database such as tables, columns, users, data ? les etc. The data stored in the data dictionary are also often called metadata.Although it is usually the domain of database administrators (DBAs), the data dictionary is a valuable source of information for end users and developers. The data dictionary consists of two levels: the internal level contains all base tables that are used by the various DBMS software components and they are normally not accessible by end users. The external level provides numerous views on these base tables to access information about objects and structures at di? erent levels of detail. 3. 1 Data Dictionary Tables An installation of an Oracle database always includes the creation of three standard Oracle users: SYS: This is the owner of all data dictionary tables and views. This user has the highest privileges to manage objects and structures of an Oracle database such as creating new users. â⠂¬ ¢ SYSTEM: is the owner of tables used by di? erent tools such SQL*Forms, SQL*Reports etc. This user has less privileges than SYS. †¢ PUBLIC: This is a â€Å"dummy† user in an Oracle database. All privileges assigned to this user are automatically assigned to all users known in the database. The tables and views provided by the data dictionary contain information about †¢ users and their privileges, tables, table columns and their data types, integrity constraints, indexes, †¢ statistics about tables and indexes used by the optimizer, †¢ privileges granted on database objects, †¢ storage structures of the database. The SQL command select ? from DICT[IONARY]; lists all tables and views of the data dictionary that are accessible to the user. The selected information includes the name and a short description of each table and view. Before issuing this query, check the column de? nitions of DICT[IONARY] using desc DICT[IONARY] and set the appropriate va lues for column using the format command. The query select ? from TAB; etrieves the names of all tables owned by the user who issues this command. The query select ? from COL; 23 returns all information about the columns of one’s own tables. Each SQL query requires various internal accesses to the tables and views of the data dictionary. Since the data dictionary itself consists of tables, Oracle has to generate numerous SQL statements to check whether the SQL command issued by a user is correct and can be executed. Example: The SQL query select ? from EMP where SAL > 2000; requires a veri? cation whether (1) the table EMP exists, (2) the user has the privilege to access this table, (3) the column SAL is de? ed for this table etc. 3. 2 Data Dictionary Views The external level of the data dictionary provides users a front end to access information relevant to the users. This level provides numerous views (in Oracle7 approximately 540) that represent (a portion of the) data fro m the base tables in a readable and understandable manner. These views can be used in SQL queries just like normal tables. The views provided by the data dictionary are divided into three groups: USER, ALL, and DBA. The group name builds the pre? x for each view name. For some views, there are associated synonyms as given in brackets below. USER : Tuples in the USER views contain information about objects owned by the account performing the SQL query (current user) USER TABLES USER USER USER USER USER USER CATALOG COL COMMENTS CONSTRAINTS INDEXES OBJECTS TAB COLUMNS USER USER USER USER TAB COMMENTS TRIGGERS USERS VIEWS all tables with their name, number of columns, storage information, statistical information etc. (TABS) tables, views, and synonyms (CAT) comments on columns constraint de? nitions for tables all information about indexes created for tables (IND) all database objects owned by the user (OBJ) columns of the tables and views owned by the user COLS) comments on tables and views triggers de? ned by the user information about the current user views de? ned by the user †¢ ALL : Rows in the ALL views include rows of the USER views and all information about objects that are accessible to the current user. The structure of these views is analogous to the structure of the USER views. 24 ALL CATALOG owner, name and type of all accessible tables, views, and synonyms ALL TABLES owner and name of all accessible tables ALL OBJECTS owner, type, and name of accessible database objects ALL TRIGGERS . . . ALL USERS †¦ ALL VIEWS †¦ DBA : The DBA views encompass information about all database objects, regardless of the owner. Only users with DBA privileges can access these views. DBA DBA DBA DBA DBA TABLES CATALOG OBJECTS DATA FILES USERS tables of all users in the database tables, views, and synonyms de? ned in the database object of all users information about data ? les information about all users known in the database 25 4 Application Programming 4 . 1 4. 1. 1 PL/SQL Introduction The development of database applications typically requires language constructs similar to those that can be found in programming languages such as C, C++, or Pascal.These constructs are necessary in order to implement complex data structures and algorithms. A major restriction of the database language SQL, however, is that many tasks cannot be accomplished by using only the provided language elements. PL/SQL (Procedural Language/SQL) is a procedural extension of Oracle-SQL that o? ers language constructs similar to those in imperative programming languages. PL/SQL allows users and designers to develop complex database applications that require the usage of control structures and procedural elements such as procedures, functions, and modules. The basic construct in PL/SQL is a block.Blocks allow designers to combine logically related (SQL-) statements into units. In a block, constants and variables can be declared, and variables can be used to store q uery results. Statements in a PL/SQL block include SQL statements, control structures (loops), condition statements (if-then-else), exception handling, and calls of other PL/SQL blocks. PL/SQL blocks that specify procedures and functions can be grouped into packages. A package is similar to a module and has an interface and an implementation part. Oracle o? ers several prede? ned packages, for example, input/output routines, ? le handling, job scheduling etc. see directory $ORACLE HOME/rdbms/admin). Another important feature of PL/SQL is that it o? ers a mechanism to process query results in a tuple-oriented way, that is, one tuple at a time. For this, cursors are used. A cursor basically is a pointer to a query result and is used to read attribute values of selected tuples into variables. A cursor typically is used in combination with a loop construct such that each tuple read by the cursor can be processed individually. In summary, the major goals of PL/SQL are to †¢ increase the expressiveness of SQL, †¢ process query results in a tuple-oriented way, †¢ optimize combined SQL statements, develop modular database application programs, †¢ reuse program code, and †¢ reduce the cost for maintaining and changing applications. 26 4. 1. 2 Structure of PL/SQL-Blocks PL/SQL is a block-structured language. Each block builds a (named) program unit, and blocks can be nested. Blocks that build a procedure, a function, or a package must be named. A PL/SQL block has an optional declare section, a part containing PL/SQL statements, and an optional exception-handling part. Thus the structure of a PL/SQL looks as follows (brackets [ ] enclose optional parts): [] [declare ] begin [exception ] end; The block header speci? s whether the PL/SQL block is a procedure, a function, or a package. If no header is speci? ed, the block is said to be an anonymous PL/SQL block. Each PL/SQL block again builds a PL/SQL statement. Thus blocks can be nested like blocks in conventional programming languages. The scope of declared variables (i. e. , the part of the program in which one can refer to the variable) is analogous to the scope of variables in programming languages such as C or Pascal. 4. 1. 3 Declarations Constants, variables, cursors, and exceptions used in a PL/SQL block must be declared in the declare section of that block.Variables and constants can be declared as follows: [constant] [not null] [:= ]; Valid data types are SQL data types (see Section 1. 1) and the data type boolean. Boolean data may only be true, false, or null. The not null clause requires that the declared variable must always have a value di? erent from null. is used to initialize a variable. If no expression is speci? ed, the value null is assigned to the variable. The clause constant states that once a value has been assigned to the variable, the value cannot be changed (thus the variable becomes a constant). Example: declare hire date job title mp found salary i ncr †¦ begin . . . end; date; /* implicit initialization with null */ varchar2(80) := ’Salesman’; boolean; /* implicit initialization with null */ constant number(3,2) := 1. 5; /* constant */ 27 Instead of specifying a data type, one can also refer to the data type of a table column (so-called anchored declaration). For example, EMP. Empno%TYPE refers to the data type of the column Empno in the relation EMP. Instead of a single variable, a record can be declared that can store a complete tuple from a given table (or query result). For example, the data type DEPT%ROWTYPE speci? s a record suitable to store all attribute values of a complete row from the table DEPT. Such records are typically used in combination with a cursor. A ? eld in a record can be accessed using . , for example, DEPT. Deptno. A cursor declaration speci? es a set of tuples (as a query result) such that the tuples can be processed in a tuple-oriented way (i. e. , one tuple at a time) using the f etch statement. A cursor declaration has the form cursor [()] is ; The cursor name is an undeclared identi? er, not the name of any PL/SQL variable. A parameter has the form . Possible parameter types are char, archar2, number, date and boolean as well as corresponding subtypes such as integer. Parameters are used to assign values to the variables that are given in the select statement. Example: We want to retrieve the following attribute values from the table EMP in a tupleoriented way: the job title and name of those employees who have been hired after a given date, and who have a manager working in a given department. cursor employee cur (start date date, dno number) is select JOB, ENAME from EMP E where HIREDATE > start date and exists (select ? from EMP where E. MGR = EMPNO and DEPTNO = dno);If (some) tuples selected by the cursor will be modi? ed in the PL/SQL block, the clause for update[()] has to be added at the end of the cursor declaration. In this case selected tuples ar e locked and cannot be accessed by other users until a commit has been issued. Before a declared cursor can be used in PL/SQL statements, the cursor must be opened, and after processing the selected tuples the cursor must be closed. We discuss the usage of cursors in more detail below. Exceptions are used to process errors and warnings that occur during the execution of PL/SQL statements in a controlled manner.Some exceptions are internally de? ned, such as ZERO DIVIDE. Other exceptions can be speci? ed by the user at the end of a PL/SQL block. User de? ned exceptions need to be declared using exception. We will discuss exception handling in more detail in Section 4. 1. 5 4. 1. 4 Language Elements In addition to the declaration of variables, constants, and cursors, PL/SQL o? ers various language constructs such as variable assignments, control structures (loops, if-then-else), procedure and function calls, etc. However, PL/SQL does not allow commands of the SQL data de? nition langu age such as the create table statement.For this, PL/SQL provides special packages. 28 Furthermore, PL/SQL uses a modi? ed select statement that requires each selected tuple to be assigned to a record (or a list of variables). There are several alternatives in PL/SQL to a assign a value to a variable. The most simple way to assign a value to a variable is declare counter integer := 0; †¦ begin counter := counter + 1; Values to assign to a variable can also be retrieved from the database using a select statement select into from where ; It is important to ensure that the select statement retrieves at most one tuple !Otherwise it is not possible to assign the attribute values to the speci? ed list of variables and a runtime error occurs. If the select statement retrieves more than one tuple, a cursor must be used instead. Furthermore, the data types of the speci? ed variables must match those of the retrieved attribute values. For most data types, PL/SQL performs an automatic type conversion (e. g. , from integer to real). Instead of a list of single variables, a record can be given after the keyword into. Also in this case, the select statement must retrieve at most one tuple ! declare mployee rec EMP%ROWTYPE; max sal EMP. SAL%TYPE; begin select EMPNO, ENAME, JOB, MGR, SAL, COMM, HIREDATE, DEPTNO into employee rec from EMP where EMPNO = 5698; select max(SAL) into max sal from EMP; †¦ end; PL/SQL provides while-loops, two types of for-loops, and continuous loops. Latter ones are used in combination with cursors. All types of loops are used to execute a sequence of statements multiple times. The speci? cation of loops occurs in the same way as known from imperative programming languages such as C or Pascal. A while-loop has the pattern [>] while loop ; end loop [] ; 9 A loop can be named. Naming a loop is useful whenever loops are nested and inner loops are completed unconditionally using the exit ; statement. Whereas the number of iterations through a w hile loop is unknown until the loop completes, the number of iterations through the for loop can be speci? ed using two integers. [>] for in [reverse] .. loop end loop [] ; The loop counter is declared implicitly. The scope of the loop counter is only the for loop. It overrides the scope of any variable having the same name outside the loop. Inside the for loop, can be referenced like a constant. ay appear in expressions, but one cannot assign a value to . Using the keyword reverse causes the iteration to proceed downwards from the higher bound to the lower bound. Processing Cursors: Before a cursor can be used, it must be opened using the open statement open [()] ; The associated select statement then is processed and the cursor references the ? rst selected tuple. Selected tuples then can be processed one tuple at a time using the fetch command fetch into ; The fetch command assigns the selected attribute values of the current tuple to the list of variables.After the fetch command , the cursor advances to the next tuple in the result set. Note that the variables in the list must have the same data types as the selected values. After all tuples have been processed, the close command is used to disable the cursor. close ; The example below illustrates how a cursor is used together with a continuous loop: declare cursor emp cur is select ? from EMP; emp rec EMP%ROWTYPE; emp sal EMP. SAL%TYPE; begin open emp cur; loop fetch emp cur into emp rec; exit when emp cur%NOTFOUND; emp sal := emp rec. sal; end loop; close emp cur; †¦ end; 30Each loop can be completed unconditionally using the exit clause: exit [] [when ] Using exit without a block label causes the completion of the loop that contains the exit statement. A condition can be a simple comparison of values. In most cases, however, the condition refers to a cursor. In the example above, %NOTFOUND is a predicate that evaluates to false if the most recent fetch command has read a tuple. The value of %NOTFOUN D is null before the ? rst tuple is fetched. The predicate evaluates to true if the most recent fetch failed to return a tuple, and false otherwise. FOUND is the logical opposite of %NOTFOUND. Cursor for loops can be used to simplify the usage of a cursor: [>] for in [()] loop end loop []; A record suitable to store a tuple fetched by the cursor is implicitly declared. Furthermore, this loop implicitly performs a fetch at each iteration as well as an open before the loop is entered and a close after the loop is left. If at an iteration no tuple has been fetched, the loop is automatically terminated without an exit. It is even possible to specify a query instead of in a for loop: for in () loop end loop; That is, a cursor needs not be speci? d before the loop is entered, but is de? ned in the select statement. Example: for sal rec in (select SAL + COMM total from EMP) loop †¦ ; end loop; total is an alias for the expression computed in the select statement. Thus, at each iterati on only one tuple is fetched. The record sal rec, which is implicitly de? ned, then contains only one entry which can be accessed using sal rec. total. Aliases, of course, are not necessary if only attributes are selected, that is, if the select statement contains no arithmetic operators or aggregate functions. For conditional control, PL/SQL o? rs if-then-else

Friday, September 27, 2019

The Nursing Process Discipline Theory Dissertation

The Nursing Process Discipline Theory - Dissertation Example As such, nurses need to put in place different reminder systems, as well as the implementation of infection control programs in order to be in the best position to decrease effectively all forms of catheter-associated UTIs (Elphern, 2009). This is despite the challenging aspect of their introduction into the treatment program or the patient care plan. Therefore, in order to achieve all this, the nurses have to rely on the Nursing Process Discipline Theory as suggested by Orlando in order to undertake their respective duties effectively. Orlando’s Nursing Process Discipline Theory states that the role of a nurse is o find out the immediate needs of a patient and help him or her. For instance, the presenting behavior of the patient can be a cry for help. Nevertheless, the assistance that a patient needs might not necessarily be what he exactly wants or desires. As such, this requires nurses to make use of their personal perceptions, their thoughts about these perceptions, as well as their feelings possibly engendered from their thoughts in an exploration of the meaning of each patient’s behavior. This will inevitably assist the nurse to discern the nature of distress of a given patient, thereby being in a better position to provide the patient with the much-needed assistance. According to Elphern (2009), this theory applies to the prevention and management of Catheter-Associated UTIs because it enables nurses to act professionally at all times. This is because they have to prevent an infection from occurring, and as such, have to study the patient at all times and be there at their times of need. The best way to prevent such infections is to avoid any unnecessary catheterization, or removing catheters as soon as possible. Since nurses are well aware of this procedure, they will advise patients appropriately for them to avoid catheterization where possible. In addition, these nurses will also monitor keenly the patients fitted with catheters on a daily basis to determine when is best to remove or change the catheter at the soonest possible

Thursday, September 26, 2019

Believing in illusion and accepting it as reality Essay

Believing in illusion and accepting it as reality - Essay Example Moreover, the media can easily give a bad name to anyone or exonerate the guilty, regardless of the truth. Thus, people are fooled and made to believe that whatever the media says is gospel truth. The media is also responsible for inventing false beliefs and prejudices, just like the shadows in the cave in Plato’s allegory. The media preaches racial discrimination, the normality of homosexuality, hatred and other forms of things that put the human being in shackles. In fact, the sign of bondage is evident in the line, â€Å"†¦and if any one tried to loose another and lead him up to the light, let them only catch the offender, and they would put him to death† (Plato). Thus, it would be hard to disbelieve because if you have a different opinion from the rest, you will naturally be ostracized or even literally put to death. What then do we make of these people who keep on believing the illusions produced by the media? Pitiful. Indeed, as Plato asked Glaucon, â€Å"†¦do you not suppose that he [the discoverer of the sun and the visible world] would felicitate himself on the change, and pity them?† (Plato). Truly, those who have not seen the truth remain not only in their bondage but also in their

Business Law - Term Paper Example | Topics and Well Written Essays - 1750 words

Business Law - - Term Paper Example The basic premise of this Act is to maintain good competition in the business life of the corporates. Competition Act aims at regulating the competition and defeating the acts by people who have tried to thwart competition in their respective jurisdictions. It has aimed at attempting to draw a line in anti-competitive activities. The Act has been designed in order to pave a way for the extinguishment of anti-competitive activities. The Act had been at the centre of curbing anti-competitive practices which have been performed by the companies who have been trading on in the business circle. â€Å"Legislation enacted by the federal and various state governments to regulate trade and commerce by preventing unlawful restraints, price-fixing, and monopolies; to promote competition; and to encourage the production of quality goods and services at the lowest prices, with the primary goal of safeguarding public welfare by ensuring that consumer demands will be met by the manufacture and sale of goods at reasonable prices.† The new Act defines a ‘dominant position’ ; what constitutes an abuse of such a dominant position and how are they interrelated. As mentioned in the Competition Act, being of the nature of a dominant enterprise does not constitute to an anti-competitive practice, but the fact when such dominant undertakings misuses their power in the competition to restrict it or to have a negative impact on it amounts to an anti-competitive practice which is prohibited in the Indian competition laws. In the case of N. V. Netherlands Banden Industrie Michelin v. Commission of the European Communities , the question arose to the court as to whether or not an enterprise which is dominant in nature leads to the violation of competition laws prevalent in the EU. It was held that â€Å"an undertaking having a dominant position is not a recrimination but simply means that irrespective of the reasons for which it has such a dominant position,

Wednesday, September 25, 2019

Global Marketing Management. British Petroleum Essay

Global Marketing Management. British Petroleum - Essay Example Internationalisation in terms of marketing can be defined as the outward venture of a company into the international shores to expand its objective, market share and explore new opportunities. Every major company worldwide have ventured or are planning to venture in foreign land to grab the opportunity lying ahead in terms of resource availability, manpower, technology, etc. Internationalisation has helped in bringing the business around globe under one umbrella by making the goods & services available across the different continents and emerging as global brands. Global marketing is the need of the hour in today’s time with more & more organisations making their presence felt in almost all countries. Global venture for the organisations has helped to standardise their products, improve the services and lastly integrated marketing (Johanson, 2008, p. 11-15). There are number of companies from different parts of the world who are now not subjugated as companies concentrating on domestic market, but, can be termed as companies catering to multi-domestic market. Organisations have believed in being a global company then domestic player with their approach of considering every country as their home country and doing business as per the ethics and cultural background of that country. There are various examples of such companies which have been a global partner over many decades and one of them is Britoil Public Limited Company. This company was established in the year 1975 as a nationalised company, named as British National Oil Corporation which was later christened as Britoil Public Limited Company. Later in the year 1988 it was acquired by the British Petroleum Company. British Petroleum is a company which is a pioneer in the petroleum field and has been in this business since 1909. British Petroleum is one of the largest oil producing companies in the world with the revenue standing at USD 297, 107 million as of 2010 (BP, 2012). British Petroleum Company: British Petroleum has made its presence felt in around every corner of the world exploring fuel and natural gas, manufacturing other petroleum products, refining, and marketing and into retail. British Petroleum Company has been venturing into different countries with its mission and vision intact. If furthe r it has to be considered that British Petroleum is planning to enter into different horizon what has to be the internationalisation plan for the company, how will the company process its business plan of internationalisation? What will be the market opportunities? Who will be its competitors? What will be its prime purpose for exploring new country? What has to be the preparedness factor the company to opt for internationalisation in different territory? Will the company be capable of implementing its true skills in offshore market where language and culture can halt the company’s plan? These factors can be analysed in a sequential manner to get a clear picture of the whole plan of internationalisation by British Petroleum (Hollensen, 2009, p. 5-7). Financial Status of British Petroleum: British Petroleum is a cartel firm of different companies with main business interest in discovering, producing and marketing of the natural resources of energy. As a company British Petrole um

Tuesday, September 24, 2019

Is the Brazilian Social-Democratic Model Replicable Outside of Latin Essay

Is the Brazilian Social-Democratic Model Replicable Outside of Latin America - Essay Example This report explores that majority of the socialists embraced the name of social democrats in order to differentiate themselves from the socialists who are against the idea of democracy. In today’s world scholars think that social democracy is not different from other forms of political ideologies. There are various viewpoints regarding this ideology. Some scholars do not consider this form as a distinctive one; instead they say that it is an unstable mixture of Marxism and liberalism. In other words social democrats do not have their own mottos. On the other hand, the people who support this idea of democracy say that this is a perfect model to implement specific policies and maintain certain principles. These certain principles are to create equality and solidarity among the upper and the lower class. This essay declares that values and social theory are two parts of the ideology that social democracy carries. The values basically signify what should be our social development and social life should be made of. And social theory provides us with the mechanism through which we can control both social development and social life. Freedom, equality and brotherhood were the slogan in the French revolution which gave social democracy its main values. All these can be combined together to form democracy as real democracy creates all of these in a society. In social democracy, work and the right to work are seen as a vital part of people’s life which helps them in the development of not only their professional but also personal and social life. In this theory the main factor of production is the labour as because of labour all other factors of production like raw materials, land, capital and technology are utilized. This in return brings about a boost in economic growth. This also means that it is due to the working conditions that we can determine how the society looks and how well is the economy doing. In today’s world social democrats are favouring the capitalistic market economy which goes hand in hand with a strong government. Human rights and environmental issues have become major goals of many social democratic parties instead of the old-style goal of making a socialist government. Generally, social democrats support a number of agendas that ensure their support for human rights. They strongly support the wide system of social security in order to protect people from poverty and save them from loss of income if they are ill or unemployed. This system is mostly followed in European countries.

Monday, September 23, 2019

International Market Comparison Assignment Example | Topics and Well Written Essays - 250 words

International Market Comparison - Assignment Example Nestle’ is one of the biggest consumer packed products firm in the planet that concentrates on augmenting the nutrition food value that, is consumed whereas raising the taste. The firm is categorized as health, nutrition, and wellness firm. Unilever and Nestle’ both concentrate on wellness and health, however, in place of concentrating on the precise wants of the end users like Unilever. Nestle’ concentrates on their corporate unit of wellness to bring full life and suitable food to all of their end users. This is to say that, they commit more effort and time into constituents of their products then the actual end user. The corporate unit of wellness is an international network that is internationally set to aid in endorsing nutrition value. Their policy is to ensure firms provide enhanced products that are suitable to the consumer. Unilever and Nestle’ vary in marketing since Unilever is glued to its profile as well as eliminated commodities, on the other hand, Nestle’ is generating and improving numerous of Nestle’ goods. The packaging employed by Nestle’ plays an immense function in their marketing. Every package encompasses a Nestle’ Nutrition Compass to demonstrate to buyers what they will gain if they buy the product. The philosophy of Nestle ’is that information on nutrition is not adequate. The compass contains three elements: Good to know; Good to remember; and Good to talk. Similar to Unilever, the marketing strategy of Nestle’ is focused on the future of their commodities. They are developing goods that will be focused on gestational matters, obesity, Alzheimer’s, diabetes and additional items that will be of benefit to wellness and health of the

Sunday, September 22, 2019

Sigmund Freud Essay Example for Free

Sigmund Freud Essay Carl Jung worked with Sigmund Freud, who assumed the unconscious mind was a personal thing within an individual . But Carl Jung saw the unconscious mind as the inherited part of the human psyche that could not be developed from personal experience. The collective unconscious is expressed through archetypes, which are universal symbols and thoughts that influence the way we express our emotions and actions. Its the way we connect with each other and understand things. Archetypes are recurring plot patterns, images, descriptive detail, and characters that are expressed in stories, dreams and religions. The unconscious emotions in ourselves are evoked when we recognize these archetypes. Nature vs. Mechanical World This type of plot pattern is used to show that nature is good rather than technology and society which are seen as bad. Nature represents purity and good, while technology represents evil and corruption. The Ritual The ritual marks a translations to a new role in society. An example of this is the sorting hat that is used in Harry Potter to initiate the students in one of the four houses. A ritual in Hamlet would be Claudius and Gertrudes wedding because it lets us know that Claudius is the new king and shows Claudius new role in society. Symbols Symbols such as black cats that represent bad luck and four leaf clovers that represent good luck are universal and helps an audience understand events in a story. For example the use of the snake venom used to kill the old king makes us connect that to the story of Adam and Eve because we see a snake as someone who causes trouble. Comedy Follows the plot of a story from going to an undesirable state to a desirable state. Tragedy The opposite of comedy; going from a desirable state to an undesirable state. Darkness Darkness is associated with the unknown and a sense of despair. It brings an eerie mood to the setting. In Hamlet, the ghost appears at night in the wilderness where its foggy, tying these three archetypes together to have an ever greater impact. This archetype of darkness is portrayed in the Lion King. Mufasa tells Simba everything the light touches is our kingdom. which also shows their power. The difference between Mufasa and Scars land is that Scars land is shown to be dark, dusty, and empty, relfecting his persona. While Mufasas land is full of light, reflecting Mufasas good personality. The Unfaithful Wife Described as someone who is in a relationship who has feelings for someone else. Gertrude is the prime example for this because of this quote: O God, a beast that wants discourse of reason][Would have mournd longer married with my uncle,][My fathers brother [She married O most wicked speed! To past][With such dexterity to incestuous sheets! ][It is not, nor it cannot come to good. ] Hamlet lets the audience see Gertrude as an unfaithful wife because we feel pity for him due to the fact that it actually would be horrible kowing your mom married some other guy after your dad died. The ghost also portrays Gertrude as an unfaithful wife by saying: O wicked wit, and gifts that have the power][So to seduce! won to his shameful lust][The will of my most seeming-virtuous queen. The unfaithful wife archetype is seen throughout many other stories, movies, and even real life situations. If you look at any teen angst shows there is always a couple where the boyfriend/girlfriend fall for someone else while in the relationship. Most people find nothing wrong with this kind of person cheating because we all have that unconscious thought that makes us root for the underdog. Perfect Woman Is the character in stories that the main character falls in love with. Isnt necessarily a woman, it can be a man or even something that just brings out the best in the hero. I feel that Ophelia starts out as the perfect woman, seeing as her and Hamlet have a relationship, but it ends due to Hamlet going crazy. You can questions whether she is the perfect woman for Hamlet because if they were perfect together they wouldnt have had such a tragic ending. Death Is the antagonist blocking the heros path. Every story has some sort of antagonist whether it may be another person or even a personal conflict that the hero is trying to overcome. Claudius is seen as the antagonist to Hamlet and is also attempting to stop Hamlet from revealing anything about the murder Claudius committed.