III Sem CourseInfo With Question Bank 2012
Transcript of III Sem CourseInfo With Question Bank 2012
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
1
P.E.S. Institute of Technology - Dept. of MCA
GENERAL GUIDELINES
1. This book is to be brought to the classroom daily. . 2. Students should be in time for the first class and subsequent classes thereafter. 3. Students should keep the classroom and Laboratories clean and tidy. 4. Students are informed to clarify their doubts in the respective subjects with the
faculty by taking prior appointments. 5. Students are advised to show due respect to all faculties regardless of the
department and maintain affable personality.
6. Students are to maintain absolute discipline and decorum, so as to promote the fair name of their college in all its activities.
7. Students having less than 85% attendance in any subject (both theory and
practical) will not be allowed to take up the University Examination.
8. Students who fail to get minimum of 25 marks in internal assessment of any subject will fall in NSSR category and not eligible to take up that particular subject.
9. Parents are to follow the progress of their wards by being in touch with the college
authorities at regular intervals.
10. Writing on desks and walls is strictly prohibited, failing which the students will be fined a minimum of Rs.500. If the identity of the individual is not established the entire class will be fined ranging from Rs.100 to Rs.500.
11. Attendance of the students will be displayed on the departmental notice board as
well as available in the web site at the end of the 7th, 11th and 16th week of the semester (w.e.f Aug 1, 2011) along with the list of the students having shortage in attendance.
12. Students should bring the observation book as well as the laboratory record book
completed in all respect to the laboratory.
13. Take the print outs of the source listing and output of the code after execution and delete your files.
14. Students are not supposed to alter the configuration of the system / any software
on the system.
15. Final examination is of 3 hrs. Duration.
16. Students are supposed to fill in the columns in the LOG BOOK at the time of entering the labs.
17. Students should wear IDENTITY CARD all the time. Students without the same will not be allowed to enter either the classroom or the lab.
18. Those students who have less than 85% attendance should sign the undertaking given by their class teachers.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
2
Sl. No Sub. Code SUBJECT
Marks Total
PAGE # IA UE
1 10MCA31 Systems Software 50 100 150 3-5
2 10MCA32 Computer Networks 50 100 150 6-8
3 10MCA33 Programming with Java 50 100 150 9-11
4 10MCA34 Database Management Systems 50 100 150 12-14
5 10MCA35 Operating Systems 50 100 150 15-17
6 10MCA36 Systems Programming Laboratory 50 50 100 18
7 10MCA37 Java Programming Laboratory 50 50 100 19
8 10MCA38 DBMS Laboratory 50 50 100 20-21
Total 400 650 1050
TIME TABLE
Day/ Time 8.15-9.15 9.15-10.15
Tea B
reak 1
0.1
5-1
0.4
5 10.45-11.45 11.45-12.45
Lu
nch
Bre
ak 1
2.4
5-1
.30
1.30-2.30 2.30-3.30
Monday
Tuesday
Wednesday
Thursday
Friday
Class Teachers
III A: B. S. Chengappa
III B: Sree Rekha
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
3
Systems Software
Subject Code : 10MCA31 Hours / Week: 04 Faculty : Chengappa B S Total Hours: 52 Over view: System software is a study about introduction to the design and implementation of software which consist of variety of programs that support operation of the computer. The major topics covered here are assemblers, loaders and linkers, etc.
It also describes the real machines that are used as examples throughout the course. These machines have contrasting architectures and were chosen as examples in order to illustrate the variety in software and hardware systems. Application of this subject includes Compiler design, statistical analysis of coding of software programs etc.
Class #
Chapter # Topic to be covered % of portions covered Reference Chapter
Cumulative
1. Chapter-1
Machine Architecture
Page #: 1-14
Introduction, System Software and Machine Architecture
12 12 2. SIC Machine Architecture 3. SIC/XE Machine Architecture 4. SIC Programming Examples 5. SIC/XE Programming Examples 6. SIC/XE Programming Examples
7.
Chapter-2 & 3
Assemblers
Page #: 46-171
Basic Assembler Function – A Simple SIC Assembler
27 39
8. Assembler Algorithm and Data Structures 9. Assembler Algorithm and Data Structures
10. Machine Dependent Assembler Features – Instruction Formats & Addressing Modes
11. Machine Dependent Assembler Features – Instruction Formats & Addressing Modes
12. Machine Dependent Assembler Features – Instruction Formats & Addressing Modes
13. Program Relocation
14. Machine Independent Assembler Features – Literals
15. Symbol – Definition Statements, Expression 16. Program Blocks 17. Control Sections and Programming Linking
18. Assembler Design Operations – One Pass Assembler
19. Multi-Pass Assembler
20. Implementation Examples – MASM Assembler
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
4
21. Chapter-4
Loaders And Linkers
Page #:130-165
Chapter-5
Editors And Debugging Systems
Page #:403-418
Basic Loader Functions - Design of an Absolute Loader
13 52
22. A Simple Bootstrap Loader 23. Relocation, Program Linking
24. Algorithm and Data Structures for a Linking Loader
25. Automatic Library Search, Loader Options, Loader Design Options, Linkage Editor, Dynamic Linkage
26. Bootstrap Loaders 27. Implementation ex: MS-DOS Linker
10 62
28. Text Editors – Overview of Editing Process, User Interface
29. Editor Structure, Interactive Debugging Systems
30. Debugging Functions and Capabilities 31. Relationship with other parts of the system 32. User-Interface Criteria
33.
Chapter-6
Macro Processors
Page #: 182-211
Basic Macro Processor Functions – Macro Definitions and Expansion
13 75
34. Macro Processor Algorithm and Data Structures
35. Concatenation of Macro parameters, Generation of Unique Labels
36. Conditional Macro Expansion, Keyword Macro Parameters
37. Macro Processor Design Options – Recursive Macro Expansion, General-Purpose Macro Processors
38. Macro Processing within Language Translators
39. Implementation examples – MASM Macro Processor, ANSI C Macro Processor
40.
Chapter-7
Lex & Yacc -1 & 2
Chapters 1,2(2-42), 3(51-65)
Basic Compiler Function – Grammars, Lexical Analysis, Syntactic Analysis, Code Generation
25 100
41. Lex and Yacc – The Simplest Lex Program, Recognizing words with LEX
42. Symbol Tables, Grammars
43. Parser-Lexer communication, The parts of speech, Lexer
44. A YACC Parser, The Rules Section
45. A word counting program, Parsing a command line
46. Using YACC – Grammars, Recursive rules
47. Shift/Reduce parsing, What YACC Cannot parse
48. A YACC Parser – The definition section. The rules section, symbol values and actions
49. The LEXER, Compiling and running a simple parser
50. Arithmetic expressions and ambiguity, variables and typed tokens.
51. problems 52. problems
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
5
LITERATURE:
Book Type
Code Title and Author Publication Information
Edition Publisher Year
Text Book
T1 System Software By Leland. L. Beck
3rd Addison-Wesley
2004
T2 Lex and Yacc By John. R. Levine and Tony Mason -- O’Reilly, SPD 1999
Reference Book R1
Systems Programming and Operating Systems By D. M. Dhamdhere
2nd TMH 1999
Test Syllabus
Test 1 : Chapters 1, 7 Test 2 : Chapters 2, 3, 4 Test 3 : Chapters 5, 6
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
6
QUESTION BANK Chapter 1: Machine Architecture Objective: Gives a description of the Simplified Instructional Computer(SIC) that is used to present fundamental software concepts.
1. (a) Differentiate between system software and application software. (b) Explain all instruction formats of SIC/XE.
2. (a) Write an ALP in SIC/XE: To add two arrays of 200 integers. (b) Describe the following with respect to SIC/XE machine. (i) registers (ii) addressing modes
3. Write a sequence of instructions for SIC/XE to set ALPHA equal to 4*beta-9. Use immediate addressing for the constants.
3. Write a sequence of instructions for SIC to set ALPHA equal to the integer portion of BETA / GAMMA. Assume that ALPHA and BETA are defined.
4. Explain all instruction formats of SIC.
5. Write a sequence of instructions for SIC to set ALPHA equal to the product of BETA and GAMMA.
6. Write SIC instructions to swap the values of ALPHA and BETA.
7. Write a sequence of instructions for SIC to clear a 20 byte string to all blanks.
8. Suppose that APLHA I is an array of 100 words. Write a sequence of instructions for SIC to set all 100 elements of the array to 0.
9. Suppose that record contains a 100-byte record. Write a subroutine for SIC that
will write this record on to device 05.
Chapter 2 & 3: Assemblers
Objective: Assemblers chapter Describes the design and implementation of assemblers, machine-dependent extensions to the basic structure. Introduces a number of machine independent assembler features.
10. Generate the object program for the ALP given below: (record format)
TEST START 0 BEGIN CLEAR X OPCODE CLEAR A CLEAR B4 +LDS #4096 LDS 6C LOOP ADD TABLE, X ADD 18 TIXR S TIXR B8
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
7
JLT LOOP JLT 38 +STA TOTAL STA 0C RSUB RSUB 4C TABLE RESW 4096 TOTAL RESW 1 END BEGIN 11. (a) briefly describe 2 DS required for a simple assembler. (b) Differentiate between literal and immediate operand with an example. 12. Write and explain the algorithm for pass2 of an assembler. 13. Briefly explain how forward references are handled in a 1-pass assembler. 14. (a) explain how relocation is done using modification record. (b) What are assembler directives? Explain the directives BASE, EXTREF? 15. Write short notes on (a) Multipass assemblers (b) Registers and memory in Pentium Pro Architecture
Chapter 4: Loaders and Linkers Objective: This chapter objective is to discuss basic loader functions, introducing machine-dependent and machine –independent loader features.
16. Write the complete algorithm for a linking loader. 17. Explain the program of a boot strap loader. 18. (a) Explain the data structure and variables used in the linking loader algorithm. (b) Explain Absolute loader.
19. What is dynamic loading? What are its advantages? Explain with a neat diagram loading and calling of a subroutine using dynamic linking.
Chapter 5: Editors And Debugging Systems Objective: Discusses about other system software like text editors and debugging systems. Introduces the editing structure of the text editor and debugging functions, capabilities.
20. Explain with figure the editing structure of a text editor.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
8
21. Explain the functions and capabilities of debugging system.
Chapter6: MacroProcessors Objective: The objective of this chapter is to study basic macro processor functions, Machine-independent macro processor features and macro processor design options.
22. (a) What is the difference between a macro call and a subroutine call? (b) What is conditional macro expansion? Explain with example?
23. Explain the following: (i) Concatenation of macro parameters (ii) Generation of unique labels (iii) Recursive macro expansion 24. Explain the various DS’s required for the design of a macro processor with an example? 25. Write an algorithm for one-pass macro processor.
Chapter 7: Lex & Yacc Objective: The objective of this is to study about the two phases of compiler. Discusses about regular expressions, grammars and the structure of lex and yacc program. 26. Explain YACC parser with example. Write a lex program to find the number of vowels and consonants in a given sentence. 27. Explain the structure of a LEX program. Write a LEX program to count number of positive integers, negative integers, positive and negative fractions. 28. Write short notes on: a) YACC b) Linkage editor 29. Write a YACC program for: (a) Variable starts with letter followed by any number of letters or digits. 30. (a) Write the code generation routine for a READ statement. (b) Give a complete BNF notation for the ASSIGNMENT statement. 31. Describe how finite automata are used in recognizing the tokens of a typical programming language.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
9
Computer Networks
Subject Code : 10MCA32 Hours / Week: 04 Faculty : Mrs. VEENA.S Total Hours: 52 Overview: This course gives a concrete idea of building computer networks which helps in effective data communication from one part to another that is from source to destination. A computer network is a dynamic and changing area. This course distinguishes between what is important, what may going to be changed in future and what is long lasting. Emphasis is laid upon the building blocks of networks, different network technologies like Ethernet, FDDI, wireless, cell phone technology etc. It also deals with LANs, MANs and WANs. A detailed study of building an internetwork using the above components and the issues related to internet work will be discussed. It also deals with end-to-end protocols and resource allocation issues. Finally we are going to see some of the applications like email, DNS etc.
Class # Chapter # Topics to be covered
% of portion covered Reference Chapter
Cumulative
1
Chapter-1
Foundation
T 1:Page #:1-50
Overview of the subject, Building a network applications
15 15
2 Requirements: connectivity 3 Cost-effective resource sharing, support for
common services 4 Network architecture: layering and
protocol, OSI architecture 5 Internet architecture 6 Implementing network software 7 Performance: bandwidth and latency 8 Delay x bandwidth product, problems 9
Chapter-2
Direct Link Networks
T 1:Page #:64-147
Physically connecting hosts: hardware Building blocks: nodes
23 38
10 Links 11 Encoding 12 Framing 13 Error detection – Two-dimensional parity,
Internet checksum algorithm 14 Cyclic Redundancy Check 15 Reliable transmission - Stop and wait 16 Sliding window 17 Concurrent logical channels 18 Ethernet(802.3) 19 Rings(802.5,FDDI,RPR) 20 Wireless – (802.15.1, 802.11, 802.16, Cell
Phone Technologies) 21
Chapter- 3
Packet Switching
T1:Page #:166-194
Switching and forwarding: Datagrams
14 52
22 Virtual circuit switching 23 Source routing 24 Bridges and LAN switches: Learning
bridges 25 Spanning tree algorithms 26 Broadcast and multicast 27 Limitations of bridges
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
10
28
Chapter-4 Internetworking
T 1:Page #:232-329
Simple internetworking: service model
23
75
29 Global addresses, Datagram forwarding in IP
30 ARP, DHCP 31 ICMP, Virtual networks and Tunnels 32 Routing: network as a graph 33 Distance vector(RIP) 34 Link state(OSPF) 35 Metrics, routing for mobile hosts, Router
implementation 36 Global internet: - sub netting 37 Classless routing(CIDR) 38 Interdomain Routing(BGP), Routing Areas 39 IP version 6 (IPv6) 40
Chapter-5 End-to-End Protocols
T 1:Page#:380-411,
456-467
Simple demultiplexer (UDP)
14
89
41 Reliable byte stream(TCP) : end-to-end issues, Segment format
42 Connection establishment and Termination, Sliding window revisited
43 Triggering Transmission, Adaptive Retransmission
44 Record boundaries, TCP Extensions, Alternative Design Choices
45 Issues in Resource Allocation: network model
46 Taxonomy, evaluation criteria 47
Chapter-6
Applications
T 1:Page#:640-693
Application layer overview, client and server model
11 100
48 DNS, Name Address mapping, DNS Message format
49 Remote login protocols, Telnet, SSH 50 Electronic Mail (SMTP), File Transfer (FTP),
World Wide Web (HTTP) 51 Overview of IP Telephony 52 VOIP signalling protocols(SIP and H.323)
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
11
LITERATURE:
Book Type
Code Title and Author Publication Information
Edition Publisher Year
Text Book T1
Computer networks – A Systems Approach - Larry L Peterson and Bruce S. David
IV Morgan kaufmann 2007
T2 Computer and Communication Networks – Nader F. Mir --
Pearson education 2007
Reference Book
R1 Data and Computer Communications – William Stallings
VIII Pearson education
2007
R2 Data Communication and Networking - Behrouz A. Forouzan
IV Tata
McGraw-Hill 2006
R3
Communication Networks – Fundamental Concepts and Key Architectures - Alberto Leon-Garcia
II Tata
McGraw-Hill 2004
Test Syllabus Test 1 : Class # 1 - 17 Test 2 : Class # 18 - 35 Test 3 : Class # 36 - 52
QUESTION BANK
Chapter 1: Foundation. This chapter gives the general idea of Computer Networks which will be used throughout the course. It deals with the basic building blocks, different type of architectures, need of layering and the implementation issues of computer networks. Finally we discuss how performance of networks can be measured using bandwidth and latency.
1. Discuss the applications of Computer Networks. 2. What is Multiplexing and Demultiplexing? 3. What is the need for layering? What are the functions of layers? 4. Define the following: a) Bandwidth b) Latency c) Throughput d) RTT e) Jitter 5. Explain the OSI reference model with a neat diagram. 6. Why Encapsulation is required in Network architecture? Explain in detail. 7. Explain the TCP/IP reference model. State the functions of each layer. 8. What are the advantages of layered architecture of a computer network? 9. Compare OSI model with TCP/IP model. 10. What is the significance of Bandwidth X Delay product.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
12
Chapter 2: Direct Link Networks. This chapter discusses the problems faced while transferring information from source to destination, like Encoding, Framing, Error Detection, Reliable transmission and Media Access Control. It gives an insight into a variety of Networking technologies ranging from Ethernet, Token Rings, Cell Phones and Wireless. 1. What are Direct link Networks? What are the issues in Direct Link Networks? 2. With a neat diagram explain the architecture of a workstation. 3. What is Encoding? Describe the different Encoding schemes. 4. Show the 4B/5B Encoding and the resulting signal for the following bit sequence. 1110010100000011 5. Discuss the advantages and disadvantages of each of the encoding schemes. 6. What is Framing? 7. Explain Byte oriented protocols. 8. Explain HDLC with its frame format. 9. Explain Bit stuffing and Byte stuffing. 10. Write the internet checksum algorithm and explain. 11. Explain CRC. 12. Explain how Two-dimensional parity can be used in error detection. 13. What is reliable transmission? Explain stop and wait algorithm. 14. Explain the sliding window algorithm. 15. Discuss 802.3 frame format. 16. Write and explain the clock based Framing. 17. Discuss FDDI. 18. Explain the MAC protocol and how Token ring maintenance is done for token ring networks. 19. Write and explain the collision avoidance and distribution system of wireless networks. 20. Explain the hidden node problem and Exposed node problem in wireless networks. Chapter 3: Packet Switching. This chapter introduces the basic models of switched networks, Datagrams, Virtual Circuits and Source Routing. It also gives the insight into Bridges and LAN switches. 1. Explain packet switching. 2. Explain how forwarding tables can be used in datagram forwarding. 3. Explain virtual circuit switching with an example. 4. What is the need for spanning tree algorithm and explain the algorithm. 5. Explain source routing. 6. Explain the sliding window algorithm. Chapter 4: Internetworking. This chapter introduces the issues related to the network of networks the global Internet. It Explains the nature of the basic internet protocol IPv4. It deals with the global addressing problem and scalability issues. Finally it introduces the alternative to IPv4, i.e. CIDR and IPv6. 1. With a neat diagram explain the simple internetwork. 2. Explain the IPV4 packet format with the importance of each field. 3. What is Fragmentation and reassembly? Why is it required?
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
13
4. Write a note on datagram forwarding in IOP. 5. Write a note on IP address classes. 6. What is address resolution problem? Explain how ARP resolves this problem. 7. What is DHCP? Discuss the dynamic configuration of hosts with the help of DHCP. 8. Discuss the issues related to global internet. 9. Explain IPv6. 10. Give 6 differences between IPv4 and IPv6. 11. Explain Link state routing. 12. Explain OSPF with an example. 13. What is subnetting? Explain subnet addressing for a class B IP – address. 14. Explain in detail inter domain routing (BGP) protocol. 15. Explain CIDR. 16. What are the network number, subnet number and Host number for the following address 135.104.192.100 mask 255.255.128.0? 17. Describe the IP address formats. Chapter 5: End – to – End Protocols and Resource allocation Issues. This Chapter deals with the Transport level issues. It deals with the User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) in detail. It also provides an insight into the issues in Resource allocation. 1. Explain the TCP header format along with the field specifications. 2. Explain “Three way Handshake” algorithm used in TCP. 3. What is meant by sillt window syndrome? Explain the solution to this problem. 4. Discuss the issues in Resource allocation. 5. Explain how resource allocation mechanisms can be classified. 6. Explain the process of connection establishment in the Transport layer? 7. Explain in brief about TCP congestion control. Chapter 6: Applications. This chapter describes a representative sample of network applications and the protocols they use, including the traditional applications like email and the web. It also gives an insight into the protocols like FTP, HTTP VoIP etc. 1. What is DNS? Explain how name resolution takes place in practice. 2. What is SNMP? Explain. 3. Write short notes on Electronic mail. 4. Write a note on World Wide Web. 5. Explain the operation of FTP. Discuss its merits and demerits.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
14
Programming with Java
Subject code: 10MCA33 Hrs / Week: 04 Faculty : Mrs. Sree Rekha Total Hrs : 52
Overview: Java is first and foremost programming language used for internet. This course describes basic fundamentals of Java programming. It includes topics like classes, Inheritance and types, multithreaded programming, Enumeration, Auto boxing, Interfaces, Networking and the Applets.
Class #
Chapter Title/Reference
Literature Topics to be covered
% of portions to be covered
Reference Chapter Cumulative
1
Chapter-1
An overview of Java
T1: Page#:15-103
Object-oriented programming; Simple Java programs, Using blocks of code Lexical issues, the java class libraries
8 8
2 Data types, Variables and Arrays: The primitive types, literals, type conversion and casting, Automatic type promotion in expression, strings
3 Operators: Arithmetic Operators, Bitwise operators, Relational operators, The Assignment Operator, The? Operator, Operator Precedence, Using parentheses
4 Control Statements: Java’s Selection statements, iteration statements, Jump Statements
5
Chapter-2
Introducing Classes
T1:Page#:105-155
Classes: Fundamentals, Declaring objects
14
22
6 Assigning object reference variables Introducing methods, constructors
7 The THIS keyword, Garbage, The Finalize() method, a Stack class
8 Methods and classes: Overloading methods, overloading constructors, using objects as parameters
9 Argument passing, Returning objects, Recursion, Access control
10 Understanding static Introducing Final, Arrays revisited
11
Chapter-3
Inheritance
T1:Page#:157-222
Introducing nested and inner classes, exploring the string class, using command line arguments, Varargs
14 36
12 Inheritance: Using super, creating a multilevel hierarchy
13 Method Overriding, Dynamic method dispatch Using abstract classes
14 Using final with inheritance, The object class.
15 Packages and Interfaces: packages, Access protection
16 importing packages, interfaces
17 Exception handling: Fundamentals, types, Try and catch multiple catch clauses, nested try statements,
18 Throw, throws, finally Built in exceptions, creating your own exception subclasses, chained exceptions, using exceptions.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
15
19
Chapter-4
Multi Threaded Programming
T1:Page#: 223-254, 555-598
Multi Threaded Programming: The main thread, creating a thread, creating multiple threads, using isAlive() and join()
12 48
20 Thread priorities, synchronization, interthread communication,
21 suspending, resuming and stopping threads, using multithreading 22
23 Input/output: Exploring java.io, The Java I/O classes and interfaces, file, the closable and flushable interfaces
24 The stream classes, the byte streams, the character streams, the console class, using stream I/O, serialization, stream benefits.
25 Revision 26 Chapter- 5
Enumeration Autoboxing
T1:Page#:255-271, 315-322, 359-384
Enumeration, type wrappers, Autoboxing
13 61
27 Generics: what are Generics? A simple Generics example, A generics class with two type parameters, the general form of a generic class
28 String handling: The string constructors, string length, special string operations
29 Character extraction, string comparison, search strings
30 Modifying a string, data conversion using ValueOf(), changing the case of characters within a string
31 Additional string methods, StringBuffer, String Builder 32 Chapter- 6
Exploring Java. Lang
T1:Page#:385-402, 409-420, 422-424, 431,437, 441,445, 448-455
Primitive Type wrappers, System, Object, Class
14 75
33 Class Loader, Math, Thread, Thread group 34 Runnable, throwable 35 Collections Framework: Collections overview 36 The collection interfaces, the List interface,
37 The Queue Interface, The collection classes, The Array List class
38 The linked List class, the HashSet, The TreeSet class
39 Revision
40
Chapter-7
Networking
T1:Page#:599-615
Networking basics, The networking classes and interfaces, Inet address
10
85
41 TCP/IP client sockets, URL 42 URL connection, HTTP URL conection
43 TCP/IP server sockets, Cookies, Inet4 Address and Inet6 Address
44 The URI class and RMI 45 Guest Lecture 46
Chapter-8
The Applet Class
T2:Page#:617-636, 637-662, 859-875, 879-906
The Applet class, Event handling
15 100
47 Two event handling mechanisms 48 The delegation event model 49 Event classes, sources of Events 50 Event Listener interfaces
51 Using the Delegation event model, Adapter classes, Inner classes
52 Swing: Introducing swing, Exploring swing Revision
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
16
Literature:
Text Book Code Author Edition/ Publication
Java the Complete Reference T1 Herbert Schildt 7th Edition, Tata McGraw Hill, 2006.
Programming with Java R1 Raghavan P,
Suresh Kumar T V Sanguine-Pearson, 2010
Programming in Java 5.0 R2 James P Cohoon, Jack W Davidson
Tata McGraw Hill, 2007
Core Java 2-Volume 1 R3 Cay S Horstmann,
Gary Cornell 7th Edition,
Pearson Education, 2005
Core Java 2 – volume 2 R4 Cay S Horstmann,
Gary cornell 8th Edition,
Pearson Education, 2008
Introduction to JAVA Programming R5 Y. Daniel Liang 7th Edition,
Pearson Education, 2007
Test Syllabus Test 1 : Chapter 1, 2 & 3 Test 2 : Chapter 4, 5 & 6 Test 3 : Chapter 7, 8
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
17
Question Bank CHAPTER 1: Introduction to Java Overview: This chapter discusses about the basics of java and its types, variables, array, strings, operators
1. Describe the general structure of a simple JAVA program. 2. Discuss various data types used in JAVA. 3. How java is better than C++? Discuss. 4. What are the advantages of JAVA? Explain. 5. How JAVA is strongly associated with internet? 6. Why is java known as platform-neutral language? 7. Explain the features of JAVA 8. What is a variable? Explain the declaration and rules for variable. 9. Discuss the loop control structures with example. 10. What are the various control structure in Java? Explain with examples? 11. What is array? How are arrays declared and handled in java. 12. How do you define a class in java? 13. Mention different approaches of returning more than nor value from a method? 14. Explain inner classes with an example? 15. Why should main method be static, public and void in java? 16. How are static members different from normal members? what are the restrictions For static members? 16. What are methods? How they are invoked in java? How java does passes parameters to them?
CHAPTER 2: Introducing Classes Overview: This chapter discusses about how the class and objects are created, assigning object reference variables, constructors , access control and a closer look at methods and classes
17. What is an object? Describe the characteristics of object. 18. How an object variable is created? How to assign object reference variables? 19. What is a class? What are the three parts of a simple, empty class?
20. What is a constructor? What are its special properties? 21. Briefly describe: This keyword, Garbage and the Finalize() method?
22. What is a stack class? 23. Explain the method overloading with an example? 24. What is constructor overloading? Explain? 25. Explain how to use objects as parameters? 26. What is static and final? Explain with an example? 27. How to use object as parameters, pass arguments and how to return the objects? Explain? 28. What is recursion? 29. What are command line arguments and how to use it? Explain with an example? 30. Explain nested and inner classes? 31.Explain the String class?
CHAPTER 3: Inheritance, packages, interfaces and Exception handling Overview: This chapter discusses about inheritance, types of inheritance, how to packages and interfaces and handling exceptions
32. What is inheritance? what are various types of inheritance? 33. Explain how to create a multilevel hierarchy using super?
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
18
34. Briefly describe when the constructors are called with an example? 35. Define method overriding and Dynamic method dispatch? 36. What is an abstract class? Difference between abstract class and an interface? 37. Explain how to use final with abstract classes? 38. What is a package? How to create a package? What are the different ways of accessing packages? 39. What is an interface? How to create an interface? How do you extend one interface by the other? 40. How to import packages in java? How to provide access protection using packages with an example? 41. What is exception handling? Explain various exception handling mechanisms in java? 42. What are the types of exceptions? 43. How to handle the uncaught exception with try and catch blocks, multiple catch statements? 44. Explain how to use nested try statements? 45. What are java built in exceptions? 46. How to create your own exception classes? Also explain chained exceptions and using exceptions? 47. How do you implement multiple inheritance using interfaces. 48. What are the uses of the keyword ‘super’ in java? 49. Compare and contrast overloading and overriding methods? 50. What is a package? What its purpose? 51. What is polymorphism?
CHAPTER 4: Multi Threaded Programming Overview: This chapter discusses about multi threaded programming.
52. What is a thread? How to create a thread in JAVA? 53. How to create multiple threads? 54. Describe the significance of isAlive() and join() methods? 55. What is a thread priority and synchronization? 56. How to communicate between threads? Explain briefly? 57. Explain briefly: suspending threads, resuming threads and stopping threads? 58. what are the various states of a thread? Explain? 59. what is multithreaded programming? Explain? 60. what are the Java I/O classes and interfaces? 61. Explain the byte streams and character streams in java? 62. Explain closable and flushable interfaces? 63. What is console class? 64 What are the various benefits of a stream? 65. What is serialization?
CHAPTER 5: Enumeration and Autoboxing Overview: This chapter discusses about the enumeration, autoboxing, type wrappers and string handling mechanisms
66. Explain enumeration? 67. What is type wrapping? Explain? 68. What are generics? Explain general form of a generic class with an example? 69. How to handle strings in JAVA? 70. What are various string operations?
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
19
71. How to perform the following operations on strings, briefly explain: a. String length b. String comparison c.Search string d. Modify a string e. Conversion of data using valueOf() f. Changing the case of characters within a string
72. Explain the addition la string methods? 73. Briefly describe stringbuffer and stringbuilder?
CHAPTER 6: Exploring Java.lang Overview: This chapter discusses about the primitive type wrappers, system, object, class, class loader, math, thread etc.
74. Explain the primitive type wrappers? 75. Explain thread group, runnable and throw able? 76. Explain the collections framework? 77. Write short note list interface and queue interface? 78. What are collections classes? Explain? 79. Explain the arraylist class and linkedlist class? 80. Explain the HashSet class and TreeSet class?
CHAPTER 7: Networking Overview: This chapter discusses about the basics of networking, networking classes and interfaces and Inetaddress.
81. Explain the networking classes and interface? 82. What is Inet address? Explain? 83. Briefly describe the TCP/IP client sockets? 84. What is URL? Explain URL connection? 85. Explain TCP/IP server sockets? 86. What are cookies? Explain? 87. Write a short note on Inet4address and Inet6address? 88. Explain URI class and RMI?
CHAPTER 8: The Applet class Overview: This chapter discusses about the Applet class and Event handling
89. What is applet? Discuss the steps involved in loading and running a applet ? 90. Describe the different stages in the life cycle of an applet. Distinguish
between init () and start() methods. 91. What is the mechanism of event delegation model .give example 92. What are the various Event handling mechanisms? 93. Explain event classes and sources of events? 94. What are Event Listener Interfaces? 95. Briefly describe Adapter classes and inner classes? 96. What is a swing? What are the reasons to choose swing in JAVA? 97. Explain the following with an example.
a. JText Field class b. JText Area class c. JLabel class d. Jlist class
98. What are components? Which are the subclasses of components of abstract window toolkit? Briefly discuss.
99. What is AWT? Explain? 100. How to use the Delegation event model? Explain? 101. How do you extend one interface by the other?
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
20
Database Management Systems
Subject: Code: 10MCA34 Hours/week: 04 Faculty: NEELAM BAWANE Total : 52 Overview Database management systems are now indispensable tool for managing information, and a course on the principles and practice of database systems is now an integral part of computer science. This course covers the fundamentals of modern database management systems, in particular relational database systems.
Class #
Chapter Title/Reference
Literature Topics to be covered
% of portions covered Reference Chapter Cumulative
1
Chapter- 1
Introduction
T1: Page#:3-52
Introduction; An example
13 13
2 Characteristics of Database approach
3 Actors on the screen; Workers behind the scene
4 Advantages of using DBMS approach; A brief history of database applications; when not to use a DBMS
5 Data models, schemas and instances; Three-schema architecture and data independence
6 Database languages and interfaces; The database system environment
7 Centralized and client-server architectures; Classification of Database Management systems
8
Chapter-2
Entity Relationship
Model
T1:Page#:57-90
Using High-Level Conceptual Data Models for Database Design, An Example Of database Application
13 26
9 Entity types, Entity sets, Attributes and Keys
10 Relationships types, Relationship sets, Roles and Structural Constraints
11 Weak Entity Types, Refining the ER Design 12 ER Diagrams 13 ER Diagrams
14 Naming Conventions and Design Issues; Relationship types of degree higher than two
15
Chapter-3
Relational Model and Relational
Algebra
T1:Page#:145-200, 225-233
Relational Model Concepts
15 41
16 Relational Model Constraints and Relational Database Schemas;
17 Update Operations, Transactions and dealing with constraint violations;
18 Unary Relational Operations: SELECT and PROJECT
19 Relational Algebra Operations from Set Theory
20 Binary Relational Operations: JOIN and DIVISION; Additional Relational Operations
21 Examples of Queries in Relational Algebra;
22 Relational database Design Using ER-to-Relational Mapping
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
21
23
Chapter-4
SQL
T1 Page#:243-330
SQL Data Definition and Data Types
33 74
24 Specifying basic constraints in SQL 25 Schema change statements in SQL 26 Basic queries in SQL 27 Basic queries in SQL 28 Basic queries in SQL 29 More complex SQL Queries 30 More complex SQL Queries 31 More complex SQL Queries
32 Insert, Delete and Update statements in SQL
33 Specifying constraints as Assertion and Trigger
34 Views (virtual tables) in SQL 35 Additional features of SQL
36 Database programming issues and techniques
37 Embedded SQL, Dynamic SQL 38 Database stored procedures and SQL/PSM
39
Chapter-5
Database Design T1:Page#:337-409
Informal Design Guidelines for Relation Schemas
15
89
40 Functional Dependencies 41 Functional Dependencies 42 Normal Forms Based on Primary Keys 43 Normal Forms Based on Primary Keys 44 General Definition of 2nd & 3rd Normal forms 45 General Definition of 2nd & 3rd Normal forms 46 Boyce-Codd Normal Form
47
Chapter-6
Overview of Transaction Management
T2:Page#:519-554, 579-596
The ACID Properties; Transactions and Schedules; Concurrent Execution of Transactions
12 100
48 Lock- Based Concurrency Control; Performance of locking; Transaction support in SQL
49 Introduction to crash recovery; 2PL, Serializability and Recoverability; Introduction to Lock Management
50 Introduction to ARIES; The log; Other recovery-related structures; The write-ahead log protocol
51 Checkpointing; Recovering from a System Crash; Media Recovery
52 Other approaches and interaction with concurrency control
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
22
LITERATURE:
Book Type Code Title & Author
Publication Info Edition Publisher Year
Text Book
T1 Fundamentals of Database Systems- Elmasri and Navathe
5th Pearson Education
2007
T2 Database Management Systems- Raghu Ramakrishna & Johannes Gehrke
3rd Tata McGraw-Hill 2003
Reference Book
R1 Database System Concepts-Henry F Korth, Silberscatz & Sudharshan 6th
Tata McGraw-Hill 2010
R2 A Introduction to Database systems – C.J.Date, A Kannan, S. Swamynatham
8th Pearson Education
2006
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
23
Question Bank
Chapter 1: Introduction Objective: This chapter introduces databases, their typical users, and DBMS concepts, terminology and architecture.
1. Define the following terms: 2. a) Database b) DBMS c) Program-Data independent d) DBA e) End
User f) Data Base Schema g) Data Abstraction h) DDL i) external Schema j) conceptual Schema k) DML
3. What is DBMS? Explain database system with a schematic diagram. 4. What is DBMS? Compare DBMS with file processing system. 5. Explain the basic concepts of DBMS and in what way it is advantageous over
conventional file processing. 6. Describe the approach used for handling data in early based system. Discuss the
disadvantages of this approach. 7. What is data independence? Explain the different levels of data independence. 8. What is a Data model? Explain different data models. 9. Explain the 3 levels of data abstraction. 10. Discuss the main characteristics of database approach. 11. With a neat figure of a data base system, explain the different important parts. 12. What are the responsibilities of DBA and the database designer? 13. What are the different types of data base end users? 14. Discuss some type of database utilities and their functions. 15. What is the difference between logical data independence and physical data
independence? Which is easier to accomplish? Why? 16. Explain client-server architecture for DBMS. 17. Describe the classification of database management system. 18. Explain centralized architecture for DBMS. 19. Describe database system utilities.
Chapter 2: Entity-Relational Model Objective: In this chapter, the concepts of the Entity-Relationship (ER) model and ER diagram are presented and used to illustrate conceptual database design. Discuss the high level database design process.
20. Define the following term: a) Entity b) Attribute c) Key Attribute d) Attribute Value e) Stored attributes f) Derived attribute g) Super Key h) Candidate Key i) Partial Key j) Foreign key k) Primary key l) Weak entity m) Cardinality ratio n) Participation constraint o) Generalization p) Composite key q) Recursive relationship
21. Explain the difference between attribute and value set. 22. What is entity type, entity set? Explain the difference between entity, entity type
and entity set. 23. Explain the mapping cardinalities and Existence dependencies in the Entity-
Relationship design. 24. Construct an E-R diagram for a car insurance company with a set of customers,
where each customer owns number of cars. Associated with each car there are number of recorded accidents. For the above E-R diagram develop a relational model.
25. Write the E-R diagram for the automation of various activities of MCA department of your college. The requirement is to maintain the Teachers, Student information, attendance and class marks etc. Design database tasks.
26. Construct an E-R diagram for part of a BANK database. Each bank can have multiple branches and each branch can have multiple accounts.
27. Draw an E-R diagram to model the following description:
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
24
A company operates many departments. Each department has one or more employees and each employee works for one department. A manager controls each department. Many projects are carried out in a department with a team of employees assigned to it. It is required to maintain information about the departments of every employee.
28. Explain strong and weak entity sets with an example. 29. Explain the different types of attributes which occur in ER model. 30. An instructor teaches number of courses. The course uses many text books. Draw
an ER diagram to represent this. Reduce the ER diagrams into set of relations. 31. What is relationship type? Explain the difference between a relationship instance
and a relationship type? 32. What is a participation role? When is it necessary to use role names in description
or relationship type? 33. Explain different cardinalities applied in ER model with an example each. 34. Notown records has decided to store information about musicians who perform on
its albums in a database. Design an E-R diagram on considering the following specifications. Specify properly cardinality constraints and keys.
i) Each musician that records at Notown has an SSN, name, an address and phone number. Phone number can be more than one.
ii) Each instrument used in songs recorded at Notown has a name and a musical key.
iii) Each album recorded on the Notown has a title, a copyright date, a format and an album identifier
iv) Each song recorded at Notown has a title and an author. v) Each musician may play several instruments, and a given instrument
may be played by several musicians. vi) Each album has number of songs on it, but no song may appear on
more than one album. vii) Each song is performed by one or more musicians and a musician may
perform a number of songs. viii) Each album has an excellent musician who acts as its producer. A
musician can produce several albums.
Chapter 3: Relational Model and Relational Algebra Objective: This chapter describes the basic relational model, its integrity constraints and update operations, and the operations of the Relational Algebra.
35. Discuss various update operations on relations and the type integrity constraints that must be checked for each update operation.
36. Define the basic relational algebra operators. Show how natural join, intersection and division can be implemented using basic operators.
37. What are integrity constraints? List different types of integrity constraints and explain any two of them.
38. Describe how the database system will ensure that the modifications to the database will not violate referential integrity constraints.
39. Explain the following terms with suitable examples: a) select b) project c) join d) union e) Cartesian product f) set difference g) natural join h) rename
40. Explain the following extended relational algebra operations: a. Inner joins b. Outer join c. Aggregate functions
41. For each of the following queries, give an expression in the relational algebra. Employee (Fname, Lname,SSN, Bdate, Addr, Salary, Superssn, Dno) Department (Dname, Dno, Mgrssn, Mgrstart) Dependent (ESSn, Dependent name, Bdate, Relationship) Retrieve the names and address of all employees who work for research department. List the names of managers who have at least one dependent.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
25
42. Consider the following relational database. For each of the following queries, give an expression in the relational algebra. Employee (employee_name, street, salary, city) Works (employee_name, company name, salary) Company (company name, city) Manager (employee_name, manager name) Find the names, street address and cities of residence of all employees who workfor First Bank Corporation and earn more than Rs. 10,000 per month. Find the names of all employees in this database who live in the same city as the
company for which they work. 43. Consider the scheme Employee(Id#, name, designation, salary) perform the
following functions using relational algebra: a. sum of salary b. count distinction designations c. maximum salary d. delete records of employee having salary less than 1000 e. insert a record
Chapter 4: SQL-The Relational Database Standard Objective: It gives a detailed overview of the SQL language, covering the SQL2 standard.
44. Explain the following: a) Nested Query b) Correlated nested Query
45. Write short notes on: a) Embedded SQL b) Dynamic SQL c) Database stored procedure d) SQL/PSM
46. Data is stored in the XYZ database which has the following tables: Employees: (Emp-no, name, street, city, zip, telephone-no, date-hired, type,
basic-pay) Customer: (Cust-no, name, street, city, zip, telephone-no, type)
Orders: (Order-no, cust-no, emp-no, received, shipped) Order-specs: (Order-no, item-no, quantity) Inventory: (Item-no, item-name, quantity on hand, price, re-order-level)
Based on these tables, write the queries for the following: i) Obtain the details about all the customers. ii) Obtain max, min, average and sum of basic pay of employees. iii) List all the item names and quantity on hand. iv) Delete an item in inventory for which quantity on hand = 0.
47. Assuming the following entities and attributes, write SQL statements Employee (Name, SSN, Salary, DNO) Dept (Dname, Dnum) Project (Pname, Pnumber, Dnumber)
i) Retrieve all the attributes of employees working for ‘Research” department
ii) Using nested query, retrieve the name of each employee who works on all the projects controlled by dept. number 3.
iii) For each project on which more than two employees work, retrieve the project number, project name and the number of employees who works on the project.
48. Write short notes on the following: i) Data retrieval in SQL ii) SQL iii) Views in SQL
49. Define view with an example. How is it defined in SQL? What are the constraints on update operations of views?
50. Consider the following scheme for the COMPANY database. The primary keys are underlined.
Employee (SSN, Fname, Lname, Bdate, Address, Salary, Dno) Department (Dnumber, Dname, Dlocation)
Perform the following functions:
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
26
i) Insert a record. ii) Delete an employee with SSN equal to 10. iii) Update the deptno. Of the employee tuple having salary greater than
10,000. iv) Retrieve the name and the address of all employees who work with ‘XYZ
department. v) Find all the employees whose birth date is less than “AA-BB-CC”
51. Consider the following relations for a database that keeps track of business trips of sales persons in a sales office:
SALES PERSON (SalespersonID, Name, Start-Year, Dept-No) TRIP(SalespersonID, From,To, Departure-date, Return-date, TripID) EXPENSE (TripID, Account No, Amount)
i) Specify the foreign keys for the above schema. Then specify the following queries in relational algebra.
ii) Give the details (all attributes of TRIP relation) for trip that exceeded Rs. 8,000/- in expenses.
iii) Print the ‘salespersonID’ and ‘Name of the salesman who took trips to “Delhi”
iv) Print the total trip expenses incurred by the salesman with salespersonID = ‘502’
52. Assume there is a relation EMP whose attributes are Emp-No, Name, Degree, places and another relation ALLOCATION whose attributes are Emp-No and Quarter-No. Write SQL statement for the following:
i) Obtain the list of the names of employees whose place is Chennai and who have been allotted quarters.
53. Consider the following database schema: Hotel (Hotelno, name city) Room (Roomno, Hotelno, type, price) Booking (Hotelno, Guestno, datafrom, dateto, Roomno) Guest (Guestno, Guestname, address)
Represent the following using SQL i) List the details of all the guests staying at Grosvenor hotel whose name
begins with the letter C ii) Increase the price of all double rooms by 5% iii) Insert a new guest into the database assuming the values for required
fields suitably. iv) Delete the details of all the guests who have booked single room at
Grosvenor hotel. v) Create a view containing hotel name and names of the guests staying at
the hotel. 54. Consider the following database:
Sailors (sid, name rating, age) Boats (bid, bname, colour) Reserves (sid, bid, date)
Answer the following using SQL i) Find the names of the sailors reserved for the boat number 500 ii) Find the names of the sailors reserved green boat iii) Find the sailor having highest rating iv) Delete all the sailors with rating less than 10 v) Update the rating of sailor with sid = 500 to 900
55. Consider the following database: PERSON (driver-id, name, address) CAR (Regno, model, year) ACCIDENT (report number, date, location) OWNS (driver-id, Regno)
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
27
PARTICIPATED (driver-id, Regno, report number, damageamt) Answer the following using SQL queries
i) Update the damage amount for the car with a specific Regno in the accident with report number 12 to 25000
ii) Find the total number of people who owned cars that were involved in accident in 2002
iii) Find the number of accidents in which cars belonging to a specific model were involved.
56. Consider the following database: Master(Product-number, name, quantity-in-stock, price, re-order level) Customer (Customer-number, name, address, product-number, quantity-bought) Answer the following using SQL
i) Get the names and the quantities in stock of all the products ii) whose quantity bought is more than 100 units iii) List all the products with quantities and prices purchased by iv) particular customer v) List all the customers who have purchased a particular part vi) List of parts whose stock is less than or equal to the reorder level
57. Explain with example, the following SQL commands: i) CREATE – both view and table ii) ALTER – both add and modify iii) SELECT – Group-by, having apart from FROM and WHERE.
58. What are views? Illustrate the problems encountered in modifying the database through views.
59. Consider the following schema Suppliers (Sid, Sname, Saddress, Sphone, Sphone) Parts (Pid, Pname, Pcolor, Price, ) Supplies (Sid, Pid, Qty)
The key fields are underlined. Write the following queries in relational algebra i) Find the names of suppliers who supply part 214. ii) Find the names and addresses of suppliers who supply part “NUTS”. iii) Find the names and phone numbers of suppliers who supply some blue
part. iv) Find the names of suppliers who supply every red part. v) Find the names of suppliers who supply every part.
Chapter 5: Database Design Objective: This chapter encompasses different types of dependencies and normal forms for relations.
60. What is normalization? Discuss the various normal forms with example. 61. What are the objectives of normalization? 62. Why nulls are considered bad in a relation? 63. Define functional dependency. Briefly explain the six rules for functional
dependency. 64. Explain normalization in Relational database design. Define I, II, III and B-C
normal forms. 65. Write short notes on:
a) First Normal Form b) Second Normal Form c) Third Normal Form
Chapter 8: Overview of Transaction Management Objective: Here, the concepts of transactions, concurrency, problems associated with the concurrent execution of the transactions and the various schemes used to resolved them are presented
66. Describe the shadow-paging recovery technique with an example. 67. Describe two phase locking protocol 68. Explain the database recovery technique based on deferred update.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
28
69. Define the terms: a) Serializable schedule b) Recoverable schedule
70. What is a transaction? In what ways is it different from an ordinary program? 71. Describe concurrency control. 72. Describe the anomalies due to interleaved executions in terms of two transactions
T1 and T2. 73. What are the ACID properties? Define each term with example. 74. How is the log used in transaction rollback and crash recovery? 75. What is the phantom problem? What impact does it have on performance? 76. What is thrashing? What should a DBA do if the system thrashes? 77. Explain various types of integrity and security constraints with examples. 78. Discuss: Data protection, Database Security, Integrity in database
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
29
Operating Systems Subject Code: 10MCA35 Hours / Week: 04 Faculty: Dr. D. UMA Total Hours: 52 Overview Operating system (OS) is the most important type of system software in a computer system. Without an operating system, a user cannot run an application program on their computer. Operating systems are found on almost any device that contains a computer – from cellular phones and video game consoles to supercomputers and web servers. Learning Outcome A course on operating system provides an overview which includes Introduction to Operating System, Services provided by an OS, Managing processes in a system, scheduling the process for execution, Synchronization among processes. It also deals with Deadlock situation, Solution to deadlock problems, Storage Management, Memory Management, Virtual Memory, File system, Mass Storage Structure, Protection and Security and a case study about Linux Operating System.
Class # Chapter # Topics to be covered
% of portion covered Reference Chapter Cumulative
1
Chapter-1
Introduction to operating
system, System
Structures
Page #:T1:3-68
What operating systems do, Computer System organization, computer system architecture
12 12
2 Operating System structure; Operating System operations, Process management
3
Memory management; Storage management, Protection and security, Distributed system; Special-purpose systems
4
Computing environments, Operating System Services, User - Operating System interface; System calls, Types of system calls; System programs
5 Operating System design and implementation; Operating System structure
6 Virtual machines; Operating System generation; System boot
7
Chapter-2
Process Manage-ment
Page #:79–99 123-139 149 -170
Process concept, Process Scheduling
17 29
8 Operation on Processes 9 Inter-process Communication
10 Multi-Threaded Programming: Overview, Multithreading models,
11 Thread Libraries, Threading issues
12 Process Scheduling: Basic concepts, Scheduling Criteria
13 Scheduling Algorithms 14 Scheduling Algorithms
15 Multiple Processor Scheduling ,Thread Scheduling
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
30
16
Chapter-3
Process Synchronization
Page #:T1:189-213
Synchronization: The Critical Section Problem, Peterson’s solutions,
13 42
17 Synchronization Hardware, 18 Semaphores
19 Classical Problems of Synchronization
20 Classical Problems of Synchronization
21 Classical Problems of Synchronization 22 Monitors
23
Chapter-4
Deadlocks Page #:T1:237-259
Deadlocks: System model; Deadlock characterization;
10 52 24 Methods for handling deadlocks; Deadlock
Prevention 25 Deadlock Avoidance 26 Deadlock Avoidance
27 Deadlock detection, Recovery from Deadlock
28
Chapter-5
Memory Management
Page #:265-295
303-335
Memory Management strategies: Background,
15 67
29 Swapping, Contiguous Memory Allocation 30 Paging 31 Structure of the page table, Segmentation
32 Virtual Memory Management: Background, Demand Paging
33 Copy on write, Page Replacement 34 Page Replacement (continued) 35 Allocation of Frames, Thrashing 36
Chapter-6
File System, Implementation of File System
Page #:359-391
395-415
File System: File Concept,
12 79
37 Access Methods, Directory Structure
38 File system mounting, File sharing, Protection
39 File system structure, File system implementation
40 Directory Implementation, Allocation Methods
41 Free space management
42 Chapter- 7
Secondary Storage
Structures, Protection
Page #:435-451 595-613
Mass Storage Structures: Disk Structure, Disk Attachment
12 91
43 Disk Scheduling
44 Disk management, Swap space management
45 Protection: Goals of protection, Principles of Protection, Domain of protection
46 Access matrix, Implementation of access matrix
47 Access Control, Revocation of access rights, Capability-Based systems
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
31
48 Chapter-8
Case Study: The Linux Operating
System
Page #: 713-750
Linux History, Design principles, Kernel modules
9 100 49 Process management, Scheduling 50 Memory management 51 File systems
52 Input and Output, Inter-process communication
Literature:
Book Type
Code Title and Author Publication Information
Edition Publisher Year
Text Book T1 Operating System Principles: A. Silberschatz, P. Galvin, G. Gagne 8th Wiley-India 2009
Reference Book
R1 Operating Systems-A Concept based Approach: D.M. Dhamdhere
2nd Tata McGraw-Hill
2002
R2 Introduction to Operating systems- Concepts and Practice: P.C.P Bhatt
2nd PHI 2008
R3 Operating Systems: Harvey M Deital 3rd Pearson
Education 1990
Test Syllabus
Test 1 : Chapters 1, 2, 3 Test 2 : Chapters, 3, 4, 5 Test 3 : Chapters 6, 7, 8
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
32
QUESTION BANK
Chapter 1: Introduction to operating system, System Structures
Objective: This chapter gives an introduction about the operating system, how they are designed and constructed. The common features of an operating system are discussed. 1. What is an operating system? What are the functionalities of an OS? 2. Explain various components of an OS. 3. What are the services provided by an OS? 4. Explain the following types of OS:
(i) Batch (ii) Real–Time (iii) Time–Sharing (iv) Distributed systems (v) Multimedia systems
5. Briefly explain the layered approach to the structuring of an OS. 6. Discuss the need for an operating system. 7. What is Multiprogramming? What are the main advantages of multiprogramming? 8. Differentiate between multiprogramming and time sharing. 9. List the operating system components. 10. What is a thread? Mention the benefits of multithreaded programming. 11. Discuss the microkernel briefly. 12. Explain the following:
i) Tightly coupled system ii) Loosely coupled system 13. Explain the following:
i) Multiprocessor Systems ii) Clustered Systems 14. What are system calls? Explain. 15. What is virtual machine? Explain VMware architecture?
Chapter 2: Process Management Objective: This chapter describes the process concept and concurrency of modern operating systems. Topics under this chapter also cover methods for process scheduling and interprocess communication. 16. What is a process? With the help of a diagram, explain the different states of a
process. 17. Explain the process control block , in detail. 18. What is CPU Scheduling? What is the difference between preemptive and non-
preemptive scheduling? 19. What are the various reasons for allowing concurrent execution of processes? 20. What is thread? Explain the concept of multithreading and their various models. 21. Discuss the benefits of multithreaded programming. 22. What is CPU Scheduling? 23. What is a scheduler? Explain different types of schedulers. 24. Explain the different criteria to select a scheduling algorithm. 25. Explain First Come First Serve Scheduling Algorithm. 26. Explain Shortest Job First Scheduling Algorithm. 27. Explain Round Robin Scheduling Algorithm. 28. Explain Priority Scheduling Algorithm. 29. Explain multilevel queue scheduling and multilevel feedback queue scheduling with
illustration. 30. Differentiate between direct communication and indirect communication. 31. Describe the use of mailboxes in inter process communication 32. Explain the concept of messages with reference to inter process communication. 33. 5 batch jobs A, B, C, D, E arrive at a computer center at almost the same time. They
have estimated running times of 10,6,2,4 and 8 seconds. Their priorities are 3,5,2,1 and 4 respectively. For each of the following draw Gantt Chart and compute turnaround time.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
33
(i) RR (Quantum time 1 sec) (ii) FCFS (iii) Priority (iv) SJF 34. What is context switching? Explain process context switching with process state
diagram. Also discuss short term and long term scheduler. 35. Describe some of the CPU scheduling algorithm evaluation methods. 36. Consider the following set of processes, which have arrived at the ready queue with
the burst time and the arrival time given in milliseconds as shown below:
Processes Burst Time in
milliseconds
Arrival Time in
milliseconds P1 8 0 P2 4 1 P3 9 2 P4 5 3
Draw the Gantt chart and calculate the average waiting time using the following algorithms
(I) First Come First Serve (FCFS) (II) Shortest Job First (SJF - pre-emptive).
37. Consider the following set of processes:
Processes Burst Time Priority P1 8 3 P2 5 1 P3 12 2 P4 4 4
The processes are assumed to have arrived in the order P1, P2, P3, P4 all at time 0. Obtain the Gantt chart, average waiting time using (I) First Come First Serve (II) Non Pre-emptive Shortest Job First (III) Non Pre-emptive priority-scheduling schemes.
38. Consider the following processes which have arrived the ready queue with the burst time and the arrival time given in milliseconds as shown
Process Burst time in milliseconds
Arrival time in milliseconds
P1 8 0 P2 4 1 P3 9 2 P4 5 3
Construct the Gantt chart and calculate the average waiting time using the FCFS and SJF (preemptive).
39. Consider the following set of processes, with the length of the CPU burst given in milliseconds.
Process Burst time
Priority Arrival time
P1 10 4 0 P2 12 3 2 P3 14 5 3 P4 16 1 6 PS 5 1 30
i) Draw a Gantt chart that illustrates the execution of these processes using the preemptive priority scheduling algorithm (a smaller priority number implies a higher priority).
ii) Calculate the average waiting time. 40. Suppose the following jobs arrive for processing at the times indicated, each job will
run the listed amount of time. Job Arrival time Burst time 1 0 10
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
34
2 1 15 3 2 17 4 3 20
i) Give a Gantt chart illustrating the execution of these jobs using the pre-emptive and non-preemptive SJF scheduling algorithms.
ii) What is avg. waiting time of jobs for the above algorithms? What is your conclusion?
41. Consider the following set of processes : Processes Burst Time Priority
P1 6 3 P2 4 1 P3 10 2 P4 3 4
The processes have arrived in the order P1, P3, P2 and P4. Obtain the Gantt chart, waiting time using (i) SJF (ii) Pre-emptive priority-scheduling schemes. Chapter 3: Process Synchronization Objective: This chapter discusses the various mechanisms to ensure the orderly execution of processes that share a logical address space, so that data consistency is maintained. Various methods of process synchronization are discussed. 42. What do you mean by semaphore? How do you access a semaphore? 43. What is a semaphore? Explain the role of semaphores in solving mutual exclusion
problem. 44. Define critical section problem and explain the requirements to be met by a solution to
the critical section problem. 45. Discuss any two classic problems of synchronization. 46. Explain the following terms:
i) Mutex ii) Race condition 47. Explain the Readers-Writers problem in detail. 48. Explain Dining-Philosophers problem and its solution. 49. Define the bounded buffer problem and its solution. 50. List out the properties and characteristics of semaphores. 51. Give a solution to n-process critical section problem using “Test-and-set” and show its
correctness. Chapter 4: Deadlocks Objective: This chapter discusses about the deadlocks, various conditions necessary for deadlock and different methods that an operating system can use to prevent or deal with deadlocks. 52. What is deadlock? Explain four necessary conditions for a deadlock. 53. List different methods for handling deadlock. Explain deadlock prevention in detail.
54. What is a safe state in a system? 55. Explain in detail with neat diagrams the resource allocation graph technique to detect
deadlock in a system. 56. What is a deadlock? Describe the necessary conditions for a dead lock. Explain how
deadlock can be prevented. 57. What is racing and deadlock? Why do they occur? 58. Consider the following snapshot of a system:
Allocation Request Available
A B C A B C A B C
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
35
P0 0 1 0 1 0 1 1 0 2 P1 1 2 1 2 2 1 P2 2 3 0 1 2 3 P3 0 1 1 1 4 3
a. What is the content of need matrix? b. Is the system in SAFE state? If so, give the safe sequence.
59. Consider the following snapshot of a system: Allocation Max Available
A B C A B C A B C
P0 0 1 0 7 5 3 3 3 2 P1 2 0 0 3 2 2 P2 3 0 2 9 0 2 P3 2 1 1 2 2 2 P4 0 0 2 4 3 3
Answer the following questions using Banker’s algorithms a. Construct a need matrix. b. Is the system in SAFE state? If so, give the safe sequence.
60. With an example, illustrate Banker’s Algorithm for Dead lock avoidance. Explain briefly about the deadlock avoidance.
Chapter 5: Memory Management Objective: This chapter deals with main memory management during the execution of a process. The different memory management schemes such as paging and segmentation are discussed. 61. Explain the following with respect to memory management:
i) First Fit ii) Best Fit iii) Worst Fit 62. Bring out the difference between internal and external fragmentation. 63. What is page fault? What action does the operating system take when a page fault
occurs? 64. Explain paging with illustration. 65. Explain paging with demand scheme in handling virtual memory and how it handles
memory requests. 66. Define the structure of a page table. 67. Explain the following:
i) Hierarchical paging ii) Inverted page table 68. Explain segmentation illustrating segmentation hardware. 69. Explain the concept of virtual memory. 70. Explain an implementation of LRU replacement policy. 71. When do page faults occur? 72. Discuss the steps in handling a page fault with the help of a neat diagram. 73. Explain the following page replacement algorithms.
(i) FIFO page replacement (ii) Optimal page replacement 74. Show how Translation Look aside Buffer (TLB) improves the performance of paged
system. 75. Discuss demand paging. Explain copy-on-write. 76. For the following reference string
1, 6, 2, 4, 3, 1, 2, 5, 6, 5, 1, 2, 3, 7, 3, 2, 1, 6, 4 How many page faults would occur for the page replacement algorithms: LRU, FIFO and Optimal. Trace these algorithms for 3 frames. What is your comment on these algorithms?
77. Consider following reference string
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
36
7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 How many page faults would occur for the page replacement algorithms LRU, FIFO and Optimal. Trace these algorithms for 3 frames. Note that initially all the frames are empty.
78. What is fragmentation? List the schemes for minimizing fragmentation. 79. Write short notes on Thrashing. Chapter 6: File System, Implementation of File System Objective: This chapter describe how the file system, mass storage and I/O are handled in a modern computer system. 80. What is acyclic graph directory structure? Explain with example. Explain the following:
i) File Operations ii) Files Types iii) File attributes
81. Explain different file access method. 82. What is access matrix? How is access matrix implemented? 83. Write a note on:
(i) Sequential Access (ii) Direct Access 84. Write a note on:
(i) Single-level directory (ii) Two-level directory iii) Tree-structured directories iv) Acyclic-Graph directories
85. What is a mount point? How a file is mounted and unmounted? 86. Discuss disk free space management. 87. Discuss directory implementation using:
(i) Linear list (ii) Hash table 88. Describe the variable partition scheme with the allocation policies–first fit, best fit and
worst fit. Mention a disadvantage of best fit. 89. Explain the different disk space allocation methods and compare them. 90. Name the different file allocation methods. Explain the linked allocation method giving
merits and demerits. Chapter 7: Secondary Storage Structures, Protection Objective: This chapter discusses access to data and programs residing on the disks. It also discusses how the processes in an operating system are protected from one another’s activities. It also discusses the mechanism for controlling the access of programs, processes or users to the resources defined by a computer system. 91. What is disk scheduling? Explain FCFS disk scheduling algorithm. 92. Briefly explain the following disk scheduling policies and compare them :
(i) FCFS (II) SSTF (III) SCAN 93. Show that SCAN scheduling is not starvation free. 94. Compare SCAN and C-SCAN disk scheduling policies. 95. Compare LOOK and C-LOOK disk scheduling policies. 96. Write short note on:
i) Rotational Latency ii) Swap Space Management 97. Suppose that a disk drive has 200 cylinders numbered 0 to 199. the disk is currently
serving a request at cylinder 53, and previous request was at cylinder 65. The queue of pending requests in FIFO order is 98, 183, 37, 122, 14, 124, 65, 67. What is the total distance (in cylinders) that the disk arm move to satisfy all the pending requests for each of the below disk scheduling algorithms? Explain each with neat diagram.
i) FCFS ii) SSTF iii) SCAN 98. Explain the following.
i) Boot Block ii) Bad Block
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
37
99. Differentiate between protection and security in the file system, Explain access matrix implementation.
100. What is meant by denial of service? 101. What is authentication? Explain any two approaches for authentication. 102. What are the goals of protection? 103. Explain capability-based system with an example. 104. What is protection concept in OS, explain its Domain & Domain Structure? 105. What is access matrix? Explain with neat figure. Explain any one of the
implementation method of access matrix. 106. Write short notes on the following:
i) Fragmentation ii) Swap space management. iii) Global table implementation of access matrix.
Chapter 8: Case Study: The Linux Operating System Objective: This chapter presents an in-depth examination of the linux operating system. It discuss the internal methods by which Linux implements the interfaces. 107. With a diagram explain the components of the Linux system. 108. Discuss various kernel modules in Linux. 109. Explain process management and process scheduling in Linux operating system. 110. Explain memory management and File systems in Linux operating system. 111. Explain Interprocess communication in Linux operating system. 112. Explain Input-Output in Linux operating system.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
38
System Programming Laboratory Sub. Code: 10MCA36 Hours/Week: 03 PART – A
1. Program to count the number of vowels & consonants in a given string.
2. Program to count the number of characters, words, spaces & lines in a given input
file.
3. Program to count number of
a) positive & negative integers
b) positive & negative fractions
4. Program to count the numbers of comment lines in a given C program. Also
eliminate them & copy that program into separate file.
5. Program to count the number of ‘scanf’ and ‘printf’ statements in a C program.
Replace them with ‘readf’ & ‘writef’ statements respectively.
6. Program to recognize a valid arithmetic expression & identify the identifiers &
operators present. Print them separately.
7. Program to recognize & count the number of identifiers in a given input file.
PART-B 1. Program to test the validity of a simple expression involving operators +,-,* and /.
2. Program to recognize nested IF control statements & display the number of levels
of nesting.
3. Program to recognize a valid arithmetic expression that uses operators +,-,* and /.
4. Program to recognize a valid variable, which starts with a letter, followed by any
number of letters or digits.
5. Program to evaluate an arithmetic expression involving operators +,-,* and /.
6. Program to recognize strings ‘aaab’, ‘abbb’, ’ab’ and ‘a’ using the grammar.
(a^nb^n, n>=0).
7. Program to recognize the grammar (a^n b, n>=10).
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
39
Java Programming Laboratory
Subject Code: 10MCA37 Hours/Week: 3 1. 1. a. Write a JAVA Program to demonstrate Constructor Overloading and Method
overloading. 2. b. Write a JAVA Program to implement Inner class and demonstrate its Access
Protections. 3. 2. a. Write a JAVA Program to demonstrate Inheritance. 4. b. Write a JAVA Program to demonstrate Exception Handling (Using Nested try
catch and finally). 5. 3. Write a JAVA program which has 6. i. A Class called Account that creates account with 500Rs minimum balance, a
deposit() method to deposit amount, a withdraw() method to withdraw amount and also throws LessBalanceException if an account holder tries to withdraw money which makes the balance become less than 500Rs.
7. ii. A Class called LessBalanceException which returns the statement that says withdraw amount (___Rs) is not valid.
8. iii. A Class which creates 2 accounts, both account deposit money and one account tries to withdraw more money which generates a LessBalanceException take appropriate action for the same.
9. 4. Write a JAVA program using Synchronized Threads, which demonstrates Producer Consumer concept.
10. 5. Write a JAVA program which has 11. i. A Interface class for Stack Operations 12. ii. A Class that implements the Stack Interface and creates a fixed length Stack. 13. iii. A Class that implements the Stack Interface and creates a Dynamic length
Stack. 14. iv. A Class that uses both the above Stacks through Interface reference and does
the Stack operations that demonstrates the runtime binding. 15. 6. Write a JAVA program which has 16. i. 2 classes which initializes a String in its constructor 17. ii. A Generic class with 2 type Parameters 18. iii. Create a Generic Class reference for t he above 2 Class and try to print the
message inside the constructor (Use to string method). 19. 7. Write JAVA programs which demonstrates utilities of LinkedList Class 20. 8. Write a JAVA Program which uses FileInputStream / FileOutPutStream Classes. 21. 9. Write a JAVA Program which writes a object to a file (use transient variable
also). 22. 10. Write a JAVA program which uses Datagram Socket for Client Server
Communication. 23. 11. Write JAVA Applet programs which handles MouseEvent 24. 12. Write JAVA Applet programs which handles KeyBoardEvent 25. 13. Write a JAVA program which implements RMI. 26. 14. Write a Swing Application which uses 27. i. JTabbed Pane 28. ii. Each Tab should use JPanel, which includes any one component given below in
each Panel 29. iii. ComboBox / List / Tree / Radiobutton 30. Note: 31. All the above Components should Listen to any one of their respective events and
print appropriate message.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
40
DBMS Laboratory
Subject Code: 10MCA38 Hours/Week: 03 I. Consider the following relations: Student (snum: integer, sname: string, major: string, level: string, age: integer) Class (name: string, meets at: string, room: string, d: integer) Enrolled (snum: integer, cname: string) Faculty (fid: integer, fname: string, deptid: integer) The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class. Level is a two character code with 4 different values (example: Junior: JR etc) Write the following queries in SQL. No duplicates should be printed in any of the answers.
i. Find the names of all Juniors (level = JR) who are enrolled in a class taught by Prof. Harshith
ii. Find the names of all classes that either meet in room R128 or have five or more Students enrolled.
iii. Find the names of all students who are enrolled in two classes that meet at the same time.
iv. Find the names of faculty members who teach in every room in which some class is taught.
v. Find the names of faculty members for whom the combined enrollment of the courses that they teach is less than five.
II. The following relations keep track of airline flight information: Flights (no: integer, from: string, to: string, distance: integer, Departs: time, arrives: time, price: real) Aircraft (aid: integer, aname: string, cruisingrange: integer) Certified (eid: integer, aid: integer) Employees (eid: integer, ename: string, salary: integer)
Note that the Employees relation describes pilots and other kinds of employees as well; Every pilot is certified for some aircraft, and only pilots are certified to fly. Write each of the following queries in SQL.
i. Find the names of aircraft such that all pilots certified to operate them have salaries more than Rs.80,000.
ii. For each pilot who is certified for more than three aircrafts, find the eid and the maximum cruisingrange of the aircraft for which she or he is certified.
iii. Find the names of pilots whose salary is less than the price of the cheapest route from Bengaluru to Frankfurt.
iv. For all aircraft with cruisingrange over 1000 Kms, Find the name of the aircraft and the average salary of all pilots certified for this aircraft.
v. Find the names of pilots certified for some Boeing aircraft. vi. Find the aids of all aircraft that can be used on routes from Bengaluru to New
Delhi
III. Consider the following database of student enrollment in courses & books adopted for each course. STUDENT (regno: string, name: string, major: string, bdate: date) COURSE (course#: int, cname: string, dept: string) ENROLL (regno: string, course#: int, sem: int, marks: int) BOOK_ADOPTION (course#: int, sem: int, book-ISBN: int) TEXT (book-ISBN: int, book-title: string, publisher: string, author: string)
i. Create the above tables by properly specifying the primary keys and the foreign keys.
Course Outline Semester: III Session: Aug-Nov 2012
________________________________________________________________________ Perseverance Excellence Service
41
ii. Enter at least five tuples for each relation. iii. Demonstrate how you add a new text book to the database and make this book
be adopted by some department. iv. Produce a list of text books (include course#, book-ISBN, book-title) in the
alphabetical order for courses offered by the ‘CS’ department that use more than two books.
v. List any department that has all its adopted books published by a specific publisher.
vi. Generate suitable reports vii. Create suitable front ends for querying and displaying the results.
IV. The following tables are maintained by a book dealer. AUTHOR (author-id: int, name: string, city: string, country: string) PUBLISHER (publisher-id: int, name: string, city: string, country: string) CATALOG (book-id: int, title: string, author-id: int, publisher-id: int, category-id: int, year: int, price: int) CATEGORY (category-id: int, description: string) ORDER-DETAILS (order-no: int, book-id: int, quantity: int)
i. Create the above tables by properly specifying the primary keys and the foreign keys.
ii. Enter at least five tuples for each relation. iii. Give the details of the authors who have two or more books in the catalog and
the price of the books is greater than the average price of the books in the catalog and the year of publication is after 2000.
iv. Find the author of the book which has maximum sales. v. Demonstrate how you increase the price of books published by a specific
publisher by 10%. vi. Generate suitable reports vii. Create suitable front ends for querying and displaying the results.
V. Consider the following database for a banking enterprise. BRANCH (branch-name: string, branch-city: string, assets: real) ACCOUNT (accno: int, branch-name: string, balance: real) DEPOSITOR (customer-name: string, accno: int) CUSTOMER (customer-name: string, customer-street: string, customer-city: string) LOAN (loan-number: int, branch-name: string, amount: real) BORROWER (customer-name: string, loan-number: int)
(i) Create the above tables by properly specifying the primary keys and the foreign keys.
(ii) Enter at least five tuples for each relation. (iii) Find all the customers who have at least two accounts at the main branch. (iv) Find all the customers who have an account at all the branches located in a
specific city. (v) Demonstrate how you delete all account tuples at every branch located in a
specific city. (vi) Generate suitable reports (vii) Create suitable front ends for querying and displaying the results.
Instructions: 1. The exercises are to be solved in an RDBMS environment like Oracle or DB2. 2. Suitable tuples have to be entered so that queries are executed correctly. 3. Front end may be created using either VB or VJ or any other similar tool. 4. The student need not create the front end in the examination. The results of the
queries may be displayed directly. 5. Relevant queries other than the ones listed along with the exercises may be asked
in the examination. 6. Questions must be asked based on lots.