Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Question:
a) Given the following relation:
Location(loc_id, bldg_code, room, capacity)
The underlined field is a primary key.
(i) Write a PL/SQL program using the implicit cursor to display the building code of location id 5.
(ii) Write a PL/SQL program that uses an explicit cursor to retrieve and display the room value for every record in the location table in which the building code value is "LIB".
(b) Write a PROLOG program that answers the question about family members and relationships. Include predicates and rules which define sister, brother, father, mother, grandchild, grandfather and uncle. The program should be able to answer queries such as the following:
- father(X,Bob) - grandson(X,Y) - uncle(Bill, Sue) - mother(mary, X)
Comparison Operators The Comparison operators can compare one expression to another. The outcome is always true, false, or null. Usually, you use a comparison operators in condi
Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns
Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to the
Implicit Cursors The Oracle implicitly opens a cursor to process each SQL statement not related with an explicitly declared cursor. The PL/SQL lets you refer to the most recen
Using Aliases The Select-list items fetched from a cursor related with the %ROWTYPE should have simple names or, if they are expressions, should have aliases. In the example bel
Assigning and Comparing Collections One collection can be assigned to other by an SELECT, INSERT, UPDATE, or FETCH statement, an assignment statement, or by a subprogram call. A
1- You can check attribute names from each table in DBF11 by running for example: desc dbf11.Member; desc dbf11.Agent; desc dbf11.Producer; Because some attribute names in
Defining Autonomous Transactions To define an autonomous transaction, you use the pragma (compiler directive) AUTONOMOUS_TRANSACTION. The pragma instructs the PL/SQL compiler
UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p
DELETE Statement The DELETE statement eliminates whole rows of data from the specified table or view. Syntax:
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd