Premium Essay

Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences

In:

Submitted By mtb550
Words 697
Pages 3
KINGDOM OF SAUDI ARABIA Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences

‫ا ر ا‬ ‫ا‬ ‫وزارة ا م ا‬ ‫د ن ود ا‬ ‫ا م‬ ‫ب وا و ت‬ ‫وم ا‬

‫ود‬

Lab on PL/SQL Introduction to Databases (CS 340)

Problem 1 (20 points)
Table Client ClientID
10000 10001 10002 10003 10004

FirstName
Ahmad Ghazi Mohamed Al-Imam Mohamed University King Saud University

LastName
Abd Allah Al-Amri Al-Hamed

Phone
2134657 2345676 5467698 1020000

Address
Riyadh Riyadh Riyadh Riyadh

Type
Professor Professor Professor University University

Table Bank BankID
30001 30002

BankName
Al-Rajhi AL-Balad

Table Branch BranchID
A100 R100 R101

BankID
30002 30001 30001

BranchName BranchAddress
Olaya Olaya King Fahd Riyadh Riyadh Riyadh

Table Account AccountID BranchID
AC100 AC101 AC107 AC108 A100 A100 R101 R100

ClientID
10000 10001 10003 10004

Balance
20,000 120,000 300,000,000 200,000,000

Table Salary ClientID
10000 10001 10002

Salary
10000 9800 6500

UniversityID
10003 10003 10004 1/7
21 January 2008 at 10H

Dr. Anis Koubâa and Habeeb Allah Vulla

Question 1. Draw the relational

model of the database (2 points)

Question 2. Write a PL/SQL procedure ShowAccountInfo (AccountID) that takes as a parameter AccountID of an account and displays the Balance and the BranchID of this account. (4 points)

Dr. Anis Koubâa and Habeeb Allah Vulla

2/7

21 January 2008 at 10H

Question 3. Write a PL/SQL procedure ShowAllClients () that displays the list of all clients. (4 points)

Question 4. Write a PL/SQL function TransferSalary that takes as input parameter
• • First input: the Account ID of a University, Second input: the Account ID of a professor

and adds the salary to the balance of the account of the professor. You must check that the first Account ID

Similar Documents

Free Essay

Srs Woow

...بسم الله الرحمن الرحيم Name: -------------------------------- Group:---- Level:------- Major:------------- |المملكة العربية السعودية |[pic] |KINGDOM OF SAUDI ARABIA | |وزارة التعليم العالي | |Ministry of Higher Education | |جامعة الإمام محمد بن سعود الإسلامية | |Al-Imam Muhammad Ibn Saud Islamic University | |كلية علوم الحاسب والمعلومات | |College of Computer & Information Sciences | CS231: Operating Systems 1st Mid-Term Exam 2nd semester of 1430/1431 Exam Duration: 1:30H Marks: out of 20 I. Multiple choices [6 Marks, 1 for each]: 1. Which of the following is not shared by different threads of the same process? a. Global variables b. Program counter c. Open files d. None of the above 2. Which of the following process state transitions is NOT correct? a. RUNNIG to READY b. READY to RUNNIG c. WAITING to RUNNING d. WAITING to READY 3. Which of the following programming examples, multithreading provides better performance than a single-threaded solution? a. A web server that responds clients service requests b. A web browser that can process...

Words: 693 - Pages: 3

Free Essay

Islamic Finance

...Islamic Banking and Finance To Dr Mohammad Omar Zubair, who is a source of inspiration for all those working in the field of Islamic economics and finance Islamic Banking and Finance New Perspectives on Profit-Sharing and Risk Edited by Munawar Iqbal Islamic Development Bank, Saudi Arabia David T. Llewellyn Loughborough University, UK Edward Elgar Cheltenham, UK • Northampton, MA, USA In association with: International Association of Islamic Economics Islamic Development Bank The Islamic Foundation © Dr Munawar Iqbal and Professor David T. Llewellyn 2002 (on behalf of the Steering Committee for the Fourth International Conference on Islamic Economics and Banking held at Loughborough University, UK, August 13–15, 2000) All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior permission of the publisher. Published by Edward Elgar Publishing Limited Glensanda House Montpellier Parade Cheltenham Glos GL50 1UA UK Edward Elgar Publishing, Inc. 136 West Street Suite 202 Northampton Massachusetts 01060 USA A catalogue record for this book is available from the British Library Library of Congress Cataloguing in Publication Data Islamic Banking and Finance: New Perspectives on Profit-Sharing and Risk / edited by Munawar Iqbal, David T. Llewellyn p. cm. “Some of the papers were presented...

Words: 106697 - Pages: 427