Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
Download
Mean Effective Pressure: Otto Cycle (in Hindi)
607 plays

More
Study of Mean effective pressure

Shivam Gupta
YouTuber : 3 times GATE qualified🏆 : ESE written qualified : PSU's qualified : Mechanical lover 🏅: musician : model : all Rounder 🥇

Comments
(5)
U
Unacademy user
Transcripts for the video: 1)what's up guys ! welcome to unacdemy! this is sps and this course is part 3 of the course series sql made easy and i'm here to make you an expert at sql for a) gate exam n b) placement purposes. 2) let me... 3) This lesson is part 2 of displaying data from multiple tables. 4) Returning Records with No Direct Match with Outer Joins If a row does not satisfy a join condition, the row will not appear in the query result. For example, in the equijoin condition of EMPLOYEES and DEPARTMENTS tables, employee Grant does not appear because there is no department ID recorded for her in the EMPLOYEES table. Instead of seeing 20 employees in the result set, you see 19 records. SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id; 5) Using Outer Joins to Return Records with No Direct Match The missing rows can be returned if an outer join operator is used in the join condition. The operator is a plus sign enclosed in parentheses (+), and it is placed on the “side” of the join that is deficient in information. This operator has the effect of creating one or more null rows, to which one or more rows from the nondeficient table can be joined. In the syntax: table1.column = is the condition that joins (or relates) the tables together. table2.column (+) is the outer join symbol, which can be placed on either side of the WHERE clause condition, but not on both sides. (Place the outer join symbol following the name of the column in the table without the matching rows.) 6) Using Outer Joins to Return Records with No Direct Match (continued) The slide example displays employee last names, department ID’s and department names. The Contracting department does not have any employees. The empty value is shown in the output shown. Outer Join Restrictions The outer join operator can appear on only one side of the expression—the side that has information missing. It returns those rows from one table that have no direct match in the other table. A condition involving an outer join cannot use the IN operator or be linked to another condition by the OR operator.
7) Joining a Table to Itself Sometimes you need to join a table to itself. Let us take an eg. Before that let me make one point very clear. If you have seen my videos on other courses you would be already quite familier with this point. the point is that the manager of a company is also an employee of the comapny. if you look at this employees table of a company on the screen you'll find a column of manager id too. that column will tell you the id of the manager of the employee.now there must be a separate row in the employee's table where that manager is depicted as the employee and the there would be in turn a manager for this manager. i hope you can see it in this table. (explain the table) There's a heirarchy of employees in every company right? Now you might think that who would be depicted as manager of the top most employee of the company someone who has actually no manager to supervise him actually.now as for this person, the manager id column in the the employees table would be null. This is the case for the employee KING.Now let us see the example. To find the name of each employee’s manager, you need to join the EMPLOYEES table to itself, or perform a self join. For example, to find the name of Earnest’s manager, you need to: Find Earnest in the EMPLOYEES table by looking at the LAST_NAME column.his employee id is 104. Find the manager number for Earnest by looking at the MANAGER_ID column. earnest’s manager number is 103. Find the name of the manager with EMPLOYEE_ID 103 by looking at the LAST_NAME column. Hunold’s employee number is 103, so Hunold is Earnest’s manager. In this process, you look in the table twice. The first time you look in the table to find Earnest in the LAST_NAME column and MANAGER_ID value of 103. The second time you look in the EMPLOYEE_ID column to find 103 and the LAST_NAME column to find Hunold. 8) The slide example joins the EMPLOYEES table to itself. To simulate two tables in the FROM clause, there are two aliases, namely w and m, for the same table, EMPLOYEES. In this example, the WHERE clause contains the join that means “where a worker’s manager number matches the employee number for the manager.” now the The column heading in the result of the query on the slide seems meaningless. A meaningful column alias should have been used instead. another thing to note is that There are only 19 rows in the output, but there are 20 rows in the EMPLOYEES table. This occurs because employee King, who is the president, does not have a manager.
9) Defining Joins Using the SQL: 1999 syntax, you can obtain the same results as were shown in the prior pages. In the syntax: table1.column Denotes the table and column from which data is retrieved CROSS JOIN Returns a Cartesian product from the two tables NATURAL JOIN Joins two tables based on the same column name JOIN table USING column_name Performs an equijoin based on the column name JOIN table ON table1.column_name Performs an equijoin based on the condition in the ON clause = table2.column_name LEFT/RIGHT/FULL OUTER 10) Creating Cross Joins (read) The example on the slide gives the same results as the following: SELECT last_name, department_name FROM employees, departments; 11) Creating Natural Joins It was not possible to do a join without explicitly specifying the columns in the corresponding tables in prior releases of Oracle. In Oracle9i it is possible to let the join be completed automatically based on columns in the two tables which have matching data types and names, using the keywords NATURAL JOIN keywords. Note: The join can happen only on columns having the same names and data types in both the tables. If the columns have the same name, but different data types, then the NATURAL JOIN syntax causes an error. 12) Retrieving Records with Natural Joins In the example on the slide, the LOCATIONS table is joined to the DEPARTMENT table by the LOCATION_ID column, which is the only column of the same name in both tables. If other common columns were present, the join would have used them all. 13) Equijoins The natural join can also be written as an equijoin: SELECT department_id, department_name, departments.location_id, city FROM departments, locations WHERE departments.location_id = locations.location_id; Natural Joins with a WHERE Clause Additional restrictions on a natural join are implemented by using a WHERE clause. The example below limits the rows of output to those with a department ID equal to 20 or 50. SELECT department_id, department_name, location_id, city FROM departments NATURAL JOIN locations WHERE department_id IN (20, 50); 14) The USING Clause Natural joins use all columns with matching names and data types to join the tables. The USING clause can be used to specify only those columns that should be used for an equijoin. The columns referenced in the USING clause should not have a qualifier (i.e it should not have a table name or alias) anywhere in the SQL statement.
15) For example, this statement is valid: SELECT l.city, d.department_name FROM locations l JOIN departments d USING (location_id) WHERE location_id = 1400; This statement is invalid because the LOCATION_ID is qualified in the WHERE clause: SELECT l.city, d.department_name FROM locations l JOIN departments d USING (location_id) WHERE d.location_id = 1400; ORA-25154: column part of USING clause cannot have qualifier The same restriction applies to NATURAL joins also. Therefore columns that have the same name in both tables have to be used without any qualifiers. 16) The example shown joins the DEPARTMENT_ID column in the EMPLOYEES and DEPARTMENTS tables, and thus shows the location where an employee works. This can also be written as an equijoin: SELECT employee_id, last_name, employees.department_id, location_id FROM employees, departments WHERE employees.department_id = departments.department_id; 17) The ON Condition Use the ON clause to specify a join condition. This lets you specify join conditions separate from any search or filter conditions in the WHERE clause. (READ FROM SLIDE) 18) Creating Joins with the ON Clause The ON clause can also be used as follows to join columns that have different names: SELECT e.last_name emp, m.last_name mgr FROM employees e JOIN employees m ON (e.manager_id = m.employee_id); 19) Three-Way Joins A three-way join is a join of three tables. In SQL: 1999 compliant syntax, joins are performed from left to right so the first join to be performed is EMPLOYEES JOIN DEPARTMENTS. The first join condition can reference columns in EMPLOYEES and DEPARTMENTS but cannot reference columns in LOCATIONS. The second join condition can reference columns from all three tables. 20) This can also be written as a three-way equijoin: SELECT employee_id, city, department_name FROM employees, departments, locations WHERE employees.department_id = departments.department_id AND departments.location_id = locations.location_id; Instructor Note The example shown can also be accomplished with the USING clause: SELECT e.employee_id, l.city, d.department_name FROM employees e JOIN departments d USING (department_id) JOIN locations l USING (location_id); 21) (read from slide) 22) Example of LEFT OUTER JOIN This query retrieves all rows in the EMPLOYEES table, which is the left table even if there is no match in the DEPARTMENTS table. This query was completed in earlier releases as follows: SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE d.department_id (+) = e.department_id;
23) Example of RIGHT OUTER JOIN This query retrieves all rows in the DEPARTMENTS table, which is the right table even if there is no match in the EMPLOYEES table. This query was completed in earlier releases as follows: SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE d.department_id = e.department_id (+); 24) Example of FULL OUTER JOIN This query retrieves all rows in the EMPLOYEES table, even if there is no match in the DEPARTMENTS table. It also retrieves all rows in the DEPARTMENTS table, even if there is no match in the EMPLOYEES table. 25) Note It was not possible to complete this in earlier releases using outer joins. However, you could accomplish the same results using the UNION operator. SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE e.department_id (+) = d.department_id UNION SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id (+); 26) Applying Additional Conditions You can apply additional conditions in the WHERE clause. The example shown performs a join on the EMPLOYEES and DEPARTMENTS tables, and, in addition, displays only employees with a manager ID equal to 149. 27) congratulations for completing our 4th objective. you have 40 percent of your journey in becoming an expert at sql. 28) Summary. pause the video and have a look at it. 29) that's it for this video guys. see you int the next one.
HG
Sir why we are using reversible word like reversible adiabatic, what do the meaning this
Raju shaikh
5 months ago
because all the cycling processes are reversible , reversible means system returns to its original situation without any effect
sir in 2nd proof when Wnet=mcv(T3........T1) and finally when you are taking derivation with respect to T4 than it is constant but it's skipped why????
Shivam Gupta
a year ago
Dear Angad can you please explain your doubt because i am not getting what you actually asked ..
knowing phenomenal you didn't explain as you told in your previous video
Shivam Gupta
a year ago
Dear Angad .. will surely come with the knocking and rest of the topics.. in the next lessons..
Hello sir, I have one doubt please clear it. What is knocking phenomenon and why is found only SI engine.
Shivam Gupta
a year ago
Hello Saurav , when there is a premature or uncontrolled combustion in SI engine, it produces a high frequency pressure waves. These pressure waves force the parts of the engine to vibrate,which produces a sharp audible knock sound. which is commonly known as "Knocking". and in CI engine this uncontrolled combustion is associated with "Detonation". i'll suggest you to be enrolled in the course,soon i'll come with the detailed analysis of " knocking and detonation" in my upcoming lessons 😊 thankyou.
Hello sir, I have one doubt please clear it. What is knocking phenomenon and why is found only SI engine.