SET-2 ER Diagram for Online Banking: Entities: Customer, Account, Transaction, Bank, Branch, Loan Relationships: Customer owns Account (one-to-many) Account has Transaction (one-to-many) Bank has Branches (one-to-many) Customer takes Loan (one-to-many) 2.PL/SQL Procedure with OUT Parameter to Calculate Square and Cube: CREATE OR REPLACE PROCEDURE calculate_square_cube( num IN NUMBER, square OUT NUMBER, cube OUT NUMBER ) AS BEGIN square := num * num; cube := num * num * num; END; 3.SQL Queries: A. SELECT * FROM Students WHERE state NOT IN ('Telangana', 'AndhraPradesh'); B. CREATE VIEW TelanganaStudents AS SELECT Sid, Sname FROM Students WHERE state = 'Telangana'; C. SELECT * FROM Students WHERE gender = 'female' AND course = 'Compcourse' AND category = 'OBC'; D. SELECT Sid, Sname, (marks_obtained / total_marks) * 100 AS percentage FROM Results; E. SELECT * FROM Students ORDER BY Sname, course ASC; F. DELETE FROM Students WHERE course = 'Compcourse' AND YEAROFBIRTH > 2002; G. ALTER TABLE Students MODIFY (state VARCHAR2(40)); H. SELECT Sname FROM Students WHERE LENGTH(Sname) = 5;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter