seth jai parkash mukand lal institute of...

46
1 SETH JAI PARKASH MUKAND LAL INSTITUTE OF ENGINEERING & TECHNOLOGY, RADAUR Student Hand Book Session 2016-2017 Third Semester Name………………………………………………. Roll No…..…………………………………… Department of Computer Science and Application (MCA Deptt.)

Upload: phungdan

Post on 29-Jul-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

1

SETH JAI PARKASH MUKAND LAL INSTITUTE OF ENGINEERING & TECHNOLOGY, RADAUR

Student Hand Book Session 2016-2017

Third Semester

Name……………………………………………….

Roll No…..……………………………………

Department of Computer Science and Application (MCA Deptt.)

Page 2: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

2

EXAMINATION SCHEME FOR MASTER OF COMPUTER APPLICATIONS (MCA)

(SIX-SEMESTER PROGRAMME)

Semester – III Paper Code Nomenclature of Paper Exam Time

(hrs.) External Marks Internal Marks Total

Marks Max Pass Max Pass

MCA-14-31 Object oriented analysis and design using UML

3 80 32 20 8 100

MCA-14-32 Computer networks and data Communication

3 80 32 20 8 100

MCA-14-33 Design and analysis of algorithms

3 80 32 20 8 100

MCA-14-34 Database management systems

3 80 32 20 8 100

MCA-14-35 Operating systems 3 80 32 20 8 100 MCA-14-36 S/w lab – v based on

MCA-14-31 3 100 40 100

MCA-14-37 S/w lab – vi based on MCA-14-34

3 100 40 100

MCA-14-38 Seminar 20 8 20 Total 600 120 720

Page 3: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

3

MCA-14-31 OBJECT ORIENTED ANALYSIS AND DESIGN USING UML Maximum marks: 100 (External: 80, Internal: 20) Time: 3 hours Note: Examiner will be required to set NINE questions in all. Question Number 1 will consist of objective type/short-answer type questions covering the entire syllabus. In addition to question no. 1, the examiner isrequired to set eight more questions selecting two from each unit. Student will be required to attempt FIVEquestions in all. Question Number 1 will be compulsory. In addition to compulsory question, student willhave to attempt four more questions selecting one question from each Unit. All questions will carry equal marks.

UNIT – I UML: Principles of modeling, UML Things – Structural, Behavioral, Grouping, Annotational. Relationships in UML – Dependency, Association, Generalization, Realization. Overview of diagrams in UML – Classdiagram, Object diagram, Use-Case diagram, Sequence diagram, Collaboration diagram, Statechart diagram,Activity diagram, Component diagram, Deployment diagram. UML Semantic Rules – Names, Scope,Visibility, Integrity, Execution. Mechanisms in the UML – Specifications, Adornments, Common Divisions,Extensibility Mechanisms.

UNIT – II Modeling as a Design Technique: Abstraction, Encapsulation, Modularity, Hierarchy, Typing, Concurrency,Persistence of objects. Purpose of modeling,Class Model – Object & Class, Links & Associations, Generalization & Inheritance, Association Ends -Multiplicity, Role names, Ordering, Qualification, Aggregation, Link attributes & Link class, Abstract class,Metadata, Constraints. Constructing class diagram.

UNIT – III State Modeling: Event, State, Activity, Action, Transitions & Conditions, State diagrams, Nested state diagrams, signal generalization, concurrency, relationships between class and state models. Interaction Modeling: use case models, use case relationships, sequence models, procedural sequence models, activity models, special constructs for activity models.

UNIT – IV System Analysis & design: System development stages, system conception, analysis, domain class model,domain state model, iterating the analysis.Application interaction model, application class model, application state model, adding operations System Design: estimating performance, make a reuse plan, organize the system into subsystem, identifying concurrency, allocating subsystems to processors and tasks, management of data stores, handling global resources, choosing software control strategies, handling boundary conditions, setting trade-off priorities, selecting an architect style. Class Design: bridging gap, realize use cases with operations, designing algorithms, design optimization, adjustment of inheritance, organize classes & associations. Text Books: 1. Grady Booch, James Rumbaugh, Ivar Jacobson, The Unified Modeling Language User Guide, Pearson education, 2007 2. M. Blaha, J. Rumbaugh, Object-Oriented Modeling and Design with UML, Pearson Education-2007 Reference Books: 1. J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, W. Lorensen, Object-Oriented Modeling and Design, Prentice Hall of India-1998 2. Satzinger, Jackson, Burd, Object-Oriented Analysis & Design with the Unified Process, Thomson-2007 3. Grady Booch, Object Oriented Analysis & Design, Addison Wesley-1994

Page 4: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

4

Lecture Plan MCA-14-31

LECTURES TOPICS 1. Principles of modeling, UML basics and its importance 2. UML Things Structural, Behavioral 3. UML things: Grouping, Annotational. 4. Relationships in UML -Dependency, Association, Generalization,Realization. 5. Diagrams in UML ,Common Modeling Techniques 6. Class diagram, 7. Object Diagram 8. Use-Case Diagram 9. Sequence Diagram 10. Collaboration Diagram 11. State chart Diagram 12. Activity Diagram 13. Component Diagram, Deployment Diagram. 14. UML Semantic Rules, Names, Scope, Visibility, Integrity, Execution, UML architecture 15. Mechanisms in the UML ,Specifications, Adornments, 16. Common Divisions, Extensibility Mechanisms 17. Object-Orientation: Object, Class 18. Abstraction, Encapsulation, Modularity, Hierarchy, Typing 19. Concurrency, Persistence of Objects 20. Purpose of modeling, Object Modeling Technique (OMT) Methodology 21. Object Model – Links and Associations, 22. Link attributes & Link class, Multiplicity 23. Role names, Ordering, Qualification 24. Aggregation, Generalization 25. Difference: aggregation vs association vs composition 26. Inheritance, Abstract class, Metadata, Constraints. 27. Constructing Object model 28. Dynamic Modeling: Event, State 29. Activity, Action, guard Conditions 30. Race conditions, Scenario, Event Trace diagram 31. Statechart, Nested state diagrams 32. Event Generalization, Concurrency 33. Entry & Exit Actions ,Internal actions 34. Synchronization of Concurrent Activities. 35. Functional Modeling: Data Flow Diagram (DFD) 36. DFD Levels: context level and others,DFD construction 37. Nested DFD, Control flows. Adding operations 38. Relationships between Object Model,Dynamic Model and Functional Model. 39. System Design: Breaking a system into subsystem,Identifying concurrency 40. Allocating Subsystems To Processors And Tasks,Management of data stores Handling Global Resources,Choosing Software Control Implementation 41. Handling boundary conditions, Setting Trade-Off Priorities. 42. Object Design: Combining object, Dynamic and Functional Models, Designing algorithms, Design Optimization 43. Implementation of control, Adjustment Of Inheritance, Design Of Associations

Page 5: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

5

44. Object presentation, Physical Packaging Object-oriented Style Guidelines – Reusability, Extensibility, Robustness, Programming-In-The-Large

Tutorial Sheet -1

1. Answer the following questions in brief: i) Differentiate between <<include>> and <<extend>> relationships. ii) What is qualified association? Give at least two examples. 2. What is sequence diagram ? Discuss r u l es t o draw a sequence diagram. What is collaboration diagram?

How is it different from sequence diagram? Draw a sequence diagram for a session with an online stockbroker.

Also draw the collaboration diagram for the same.

3. i) what is activity diagram? Draw an activity diagram for an order processing system. ii) What is component diagram? How do you model c ompone nt‟s interfaces? Explain wi t h examples. iii) Differentiate aggregation and composition with suitable examples. 4. Draw the use case diagram for „ONLINE SHOPPING SYSTEM‟ in detail. 5. What is the significance of UML Diagrams? How they are implemented in real life? Design the „ATM Machine‟ with the help of UML diagrams

Tutorial Sheet – 2

1. i) What is object? What are four characteristics of object? Give one suitable Example. ii) Distinguish between aggregation and composition by giving examples. iii) Explain dependency and realization relationship with example. 2. i) what do you mean b y typing? What are different types of programming languages based on typing? Explain e a c h type in b r i e f and give at least two examples in e a c h of the category. ii) What are constraints? Discuss different types of constraints used in object modeling with examples. 5. i) what is object model? Explain different types of generalization relationships used in

object model with examples ii) Identify objects and their classes for classroom teaching system and draw the class d ia g r a m. Show mult iplic it y, role names, aggregation, inheritance etc. 4. What is object model of OMT? What is class diagram? 5. Prepare a class diagram for a graphical document editor that supports grouping. Assume that a document consists of several sheets. Each sheet contains drawing objects- Including text, geometrical objects and groups. A group must contain at least two objects at least two drawing objects. A drawing Object can be a direct member of at most one group. Geometrical objects include circles, ellipses, Rectangles, lines and squares.

Tutorial Sheet – 3

1. (i) Explain concurrency w i t h i n an object by giving suitable example. (ii) Explain the relationship between object model and dynamic model 2. i) What is dy n amic model? Explain the following. Concepts associated with the dynamic model by giving

examples: activity, action, guard, events attributes, event generalization an d composite state. ii) Draw a nested state diagram for automatic transmission of a car.

3. What is functional model? Give three examples of systems wh e r e functional model is more prominent than other models. What are the steps to draw a DFD? Draw the context diagram of Lemonade system and then draw Level 1 and Level2 DFDs t o identify sub processes, data Flows arid data stores.

6. i)Why DFDs are constructed, when you are making a software system? Draw DFDs for a software system? ii) Explain briefly structural things in UML.

5. i)What are aggregation concurrency and concurrency within an object? How these are

Page 6: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

6

supported by a State model? Explain by giving examples. ii) How do you choose software control implementation using system design?

Tutorial Sheet – 4

1. i) What are trade-off priorities in system design? ii) How can you promote reusability? iii) What is Context diagram? Draw the context diagram of library system. 2. i) Explain the following reusable things -libraries, frameworks and patterns. ii) How do you es t i m at e hardware resource requirements and allocate tasks to processors? iii) Distinguish between internal and external software controls. 3. i)Discuss the guidelines to design algorithms.

ii)How do you combine object, dynamic and functional model during object d e s i g n ? 4. Explain the following activities of object design: i) Design of algorithms ii) Design optimization iii) Design of association 5. i) What do you mean by programming –in – the –large? ii) Explain the following 1. Extensibility 2. Robustness 3. Dynamic and Functional Models

Page 7: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

7

Page 8: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

8

Page 9: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

9

MCA-14-32 COMPUTER NETWORKS AND DATA COMMUNICATION Maximum marks: 100 (External: 80, Internal: 20) Time: 3 hours Note: Examiner will be required to set NINE questions in all. Question Number 1 will consist of objective type/short-answer type questions covering the entire syllabus. In addition to question no. 1, the examiner is required to set eight more questions selecting two from each unit. Student will be required to attempt FIVE questions in all. Question Number 1 will be compulsory. In addition to compulsory question, student will have to attempt four more questions selecting one question from each Unit. All questions will carry equal marks.

UNIT – I Introduction to Computer Networks and its uses; Network categorization and Hardware; Topologies; Network Software: Protocols, Services, Network Architecture, Design issues for the layers, OSI Reference model, TCP/IP Reference model, Comparison of OSI and TCP/IP Models. Introduction to Example Networks: Internet, ISDN, X.25, Frame Relay, ATM.

UNIT – II Data Communication Model, Digital and Analog data and signals, Asynchronous and Synchronous transmission; bit rate, baud, bandwidth, Transmission impairment; Channel Capacity; Guided Transmission Media; Wireless transmission; Satellite communication. Switching; Multiplexing; Spread Spectrum; local loop; Modems and ADSL; Encoding: NRZ, NRZ-I,

Page 10: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

10

Manchester and Differential Manchester encoding; Internet over Cable; ADSL Versus Cable; The Mobile Telephone System;

UNIT – III Data Link Layer Design issues; Framing, Error Detection and Correction; Flow Control: Sliding Window Protocols; Medium Access Control: Aloha, CSMA protocols, Collision free protocols, Limited Contention Protocols; Wavelength Division Multiple access protocol, Wireless LAN Protocol: MACA; High Speed LANs; Ethernet LAN, Fast Ethernet, Gigabit Ethernet; Binary Exponential Backoff algorithm; Token Ring and FDDI; Introduction to Wireless LANs;

UNIT – IV Network Layer Design issues , Virtual Circuit and Datagram Subnet, Routing Algorithms: Optimality principle, Shortest path Routing, Flooding , Distance Vector Routing, Link State Routing, Hierarchical Routing, Broadcast and Multi Cast Routing, Routing for Mobile hosts, Congestion Control Algorithms: General Principals; Congestion control in Virtual – Circuit Subnets; Congestion Control in Datagram Subnets: Choke packets, Load Shedding; Random Early Detection, Jitter Control; Quality of Service: Over provisioning, Buffering, Traffic Shaping, Leaky bucket, token bucket, Resource Reservation, Admission Control, Packet Scheduling; Text Books: 1. Andrew S. Tanenbaum, Computer Networks, 4th Edition - PHI. 2. Behrouz A Forouzan, Data Communications and Networking , 5th Edition- Tata Mc-Graw Hill. Reference Books: 1. Michael A. Gallo, William M. Hancock, Computer Communications and Networking Technologies –

CENGAGE learning. 2. William Stallings, Data and Computer Communications, 5th Edition – PHI.

Page 11: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

11

Lecture Plan MCA-14-32

Lectures Topics 1. Introduction to Computer Networks 2. Goals and applications of Computer Networks; Internet works, Point-to-point and broadcast networks 3. Categories of Networks - LAN,MAN,WAN 4. Topologies of Computer Networks 5. Introduction to SMDS, X.25 Networks 6. ISDN, frame relay 7. ATM networks. 8. Concept of protocols & services 9. OSI model and functions of its layers 10. TCP/IP reference model. 11. Components of a data communication system 12. Transmission modes; 13. Transmission media - guided and wireless media; 14. Introduction to switching (circuit, message and packet) 15. Multiplexing (frequency division and time division) 16. Modems, Manchester & differential Manchester coding 17. ADSL versus cable 18. Framing techniques; 19. Error control- error detection & correction. 20. flow control 21. Data Link Control : Acknowledgments 22. Elementary data-link protocols 23. Automatic Repeat Request; Sliding Window protocols. 24. medium access control 25. Multiple Access protocols of MAC sub layer - ALOHA 26. 1-persistent, p-persistent and non-persistent CSMA 27. CSMA/CD 28. Collision free protocols, Limited contention protocols 29. Wavelength Division Multiple Access, MACA 30. GSM, CDPD, CDMA 31. Ethernet, token bus, token ring 32. DQDB, Logical Link Control; High-Speed LANs. 33. Routing: Deterministic and Adaptive routing 34. Centralized and distributed Routing 35. virtual circuit and datagram subnet 36. Shortest-path; flooding 37. Flow based; optimal 38. Distance vector, link-state 39. routing , routing in adhoc network 40. Hierarchical; routing for mobile hosts 41. Broadcast and multicast routing; 42. Principles of congestion control 43. Traffic shaping; choke packets 44. leaky Bucket token bucket 45. Load shedding; RSVP. 46. Virtual Circuit and Datagram Subnet

Page 12: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

12

47. Routing Algorithms, Optimality principle 48. Digital Cellular, Radio: Global System for Mobile Communication (GSM) 49. Fiber Distributed Data Interface, Distributed Queue Dual Bus (DQDB).

TUTORIAL SHEET – 1

1 (a) what is OSI reference model? Explain the model by detailing out all important features.

(b) What is network software? How are network protocols and architecture related ? How

are network protocols relevant in context of network software? Illustrate.

2. (a)Connection-less and connection-oriented protocols.

(b)Point-to-point and Broadcast networks.

3. (a)what is frame relay? Discuss its signH1cance.

(b)What is Load Shedding? Explain. 4. Compare „Network topology „? Which one is best and where? Explain with suitable practical examples. 5. i) Explain the following: (a) X. 25 (b) ATM

ii) How routing and congestion are linked together. Explain with examples.. TUTORIAL SHEET – 2

1. (a) Differentiate between ADSL and Cable.

(b) What do you understand by limited Contention Protocols? Discuss their role.

(c) What is distance vector routing? Explain.

2 (a) what do you mean by wireless transmission? What makes this transmission more

challenging? Illustrate.

(b) What is encoding? Illustrate different types of Manchester encoding techniques.

3 Differentiate between the following:-

(a) Circuit switching and packet switching

(b) FDM and TDM. 4. a) Compare circuit switching and packet switching with practical examples. Which one is best and Why? b) Compare different sliding protocols. How are they linked to each other? Explain with examples 5. Explain the following: (a) Satellite communication (b) Transmission impairments .

TUTORIAL SHEET – 3

1. (a) What do you understand by transmission impairments? How are these signiticant ?

(b) What is Nyquist theorem? State its significance.

(c) What is FDDI? Discuss its role.

2 (a) What are the main responsibilities of data link layer? How does this layer address error and flow control related issues Explain?

(b) Data link protocols almost always put the CRC in a trailer rather than in a header. Why?

3 Explain the following:-

Page 13: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

13

(a) DQDB

(b) Sliding window protocols. 4. Explain the following: (a) IEEE 802.3 (b) Collision free protocols

5.i) What is the advantage of selective repeat sliding window protocol over go back and sliding window Protocol? ii) A bit stream 10011101 is transmitted using the standard CRC method. The generator Polynomial is x3+1. Show the actual bit stream transmitted.

TUTORIAL SHEET – 4

1. What is routing? Compare various routing algorithms‟. Which algo gives you best optimal result? Illustrate its working and justify its acceptability. 2. Explain the following: (a) Load shedding (b) Routing in adhoc Networks 3 Distinguish between the virtual circuit and datagram services of the network layer. Also write their applications in real world.

4. a )What are Adhoc networks? How routing takes place in Adhoc networks? Illustrate.

b)What is routing? What are routing algorithms? How is optimality principle relevant in this context? Illustrate.

5 Explain the following:-

(a) Link state routing.

(b) Traffic shaping

Page 14: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

14

Page 15: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

15

Page 16: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

16

MCA-14-33 DESIGN AND ANALYSIS OF ALGORITHMS

Maximum marks: 100 (External: 80, Internal: 20) Time: 3 hours Note: Examiner will be required to set NINE questions in all. Question Number 1 will consist of objective type/short-answer type questions covering the entire syllabus. In addition to question no. 1, the examiner is required to set eight more questions selecting two from each unit. Student will be required to attempt FIVE questions in all. Question Number 1 will be compulsory. In addition to compulsory question, student will have to attempt four more questions selecting one question from each Unit. All questions will carry equal marks.

UNIT – I

Introduction: Algorithms, Role of algorithms in computing, Complexity of algorithms, Analyzing algorithms,designing algorithms, asymptotic notations. Divide and Conquer: Complexity of iterative programs and recursive programs, solving recurrence equations: back substitution method, recursion tree method, masters theorem. Analysis of heap sort and quick sort; Counting sort, Radix sort, Bucket sort, Lower bounds for sorting.

UNIT – II Hash Tables, Hash functions, Collision handling in hashing, analyzing various operations on Binary search tree. Introduction to Red-black trees. Dynamic Programming (DP): Elements of DP, Matrix chain multiplication, Longest common subsequence, optimal binary search trees.

UNIT – III

Greedy Techniques (GT): Elements of GT, Activity selection problem, Huffman codes, Knapsack Problem. Graph Algorithms: Single source shortest path: Analysis of Dijkstra‟s Algorithm, Limitations of Dijkstra‟s Algorithm, Negative weight cycle, Bellman-Ford algorithm. All Pairs Shortest Path: Relation of Shortest path and matrix multiplication, Analysis of Floyd Warshall algorithm. Maximum Flow: Flow network, Ford- Fulkerson method.

UNIT – IV

Strings: Storage of strings, naive string-matching algorithm, Rabin-Karp string matching algorithm. Computational complexity: Notion of Polynomial time algorithms, Complexity classes: P, NP, NP-Hard and NP-Complete, Polynomial time verification, Reducibility, NP-Completeness, Examples of NP-Complete and NP-Hard problems: Traveling Salesman Problem, Knapsack, Bin Packing, Satisfiability, Vertex Cover, Clique, Independent Set. Introduction to approximation algorithms. Text Books: 1. Cormen, Leiserson, Rivest, “Introduction to Algorithms”, PHI India. 2. Neapolitan R., “Foundations of Algorithms”, Jones and Bartlett Learning. Reference Books: 1. Cooper A., “Computability Theory”, Chapman and Hall/ CRC Press. 2. Robert Sedgewick, “Algorithms in C”, Pearson Education India. 3. Steven Skiena, “The Algorithm Design Manual”, Springer India. 4. Reiter, Johnson, “Limits of Computation”, Chapman and Hall/ CRC Press.

Page 17: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

17

LECTURE PLAN MCA-14-33

Lectures Topics 1 Review of important data structures 2 programming techniques 3 analyzing algorithms 4 asymptotic notation 5 recurrence relations 6 introductory concepts in program verification and testing 7 structured design methodology 8 Outline of the general method 9 Divide & Conquer 10 Divide & Conquer methods 11 Binary search, 12 quick sort 13 finding out maxima and minima of an element. 14 Analysis of divide and conquer run time recurence relations 15 Overview of Greedy paradigm 16 Greedy algorithms 17 Examples of exact optimization solution(Minimum cost spanning tree) 18 Overview of Dynamic Programming 19 Difference b/w Dynamic Programming and Divide & Conquer 20 Applications of Dynamic programming 21 Basic search techniques 22 traversal Techniques 23 Basic tracking 24 8-queen problem and 4-queen problem 25 knap sack problem 26 FIFO Branch and Bound 27 LC Branch and Bound 28 Travelling salesman problem 29 Review of trees 30 Binary search tree 31 Traversal insertion and B-trees 32 Oracles and adversary arguments 33 Techniques for algebraic problems 34 Lower bounds on parallel computation. 35 NP-Hard and NP-Complete Problems 36 Cook's theorem 37 Examples of NP-Hard problems 38 Graph coloring 39 Approximation algorithms. 40 Approximation algorithm and methods

TUTORIAL SHEET – 1

1. a) What do you mean by Structured Design Methodology ? Explain with example b) Compute the complexity terms in respect of Quick Sort technique. 2 a) What is the criterion for analyzing an Algorithm ? How can you verify and test a program ?

b) Describe Recurrence Relation with an example. 3. a) fractional knapsack problem

b) Define Asymptotic Notation 4. Explain FIFO branch and Bound. 5. Solve knapsack problem using branch and bound.

Page 18: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

18

TUTORIAL SHEET – 2

1. a) Give an account of the following algorithm design strategies : i) Greedy Method ii) Divide and Conquer. b) What is the need of Dynamic Programming ? 2. a) Write an algorithm for Binary Search. Illustrate with an example. b) Write algorithms for Breadth Firth and Depth First traversal techniques. 3. a) What do you mean by Traversal technique ? b) How can you use a Structure for designing an Algorithm ? 4. Write the algorithm to find Hamiltonian cycle for graph using backtracking. 5. a) Explain Cook theorem.

b) What is binary tree? Explain insertion operation in case of binary search tree.

TUTORIAL SHEET – 3

1 a) Find the number of comparisions required for a comparison based algorithm that arranges a set of N given unordered elements in descending order. b) What do you mean by the term Lower Bound on Parallel Computation ? Illustrate with example. 2 a) Explain any one technique used for the solution of an algebraic problem. b) Explain the terms : Oracle and Adversary arguments. 3. a) Differentiate between Lower Bound and Upper Bound. b) What are the comparison Trees ? 4. Write the algorithm to find Hamiltonian cycle for graph using backtracking. 5. What are the basic operations on B-trees?

TUTORIAL SHEET – 4 1 a) Explain Cook‟s Theorem with an example. b) Explain any one NP-Complete problem in detail by choosing an appropriate example. 2 a) What do you mean by Chromatic Number ? b) Explain Approximation algorithm in detail. 3. a) When a problem becomes NP-Hard. b) What should be the requirements for a problem to be NP-Complete ? 4. (a) Can depth first search be applied to directed graphics as well? (b) Compare B-tree and B++ tree with respect to their efficiency. 5. (a) Write an algorithm to compute roots of optimal sub tree. (b) Give an algorithm to count the no of leaf nodes in a binary tree.

Page 19: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

19

Page 20: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

20

Page 21: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

21

Page 22: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

22

MCA-14-34 DATABASE MANAGEMENT SYSTEMS

Maximum marks: 100 (External: 80, Internal: 20) Time: 3 hours Note: Examiner will be required to set NINE questions in all. Question Number 1 will consist of objective type/short-answer type questions covering the entire syllabus. In addition to question no. 1, the examiner is required to set eight more questions selecting two from each unit. Student will be required to attempt FIVE questions in all. Question Number 1 will be compulsory. In addition to compulsory question, student will have to attempt four more questions selecting one question from each Unit. All questions will carry equal marks.

UNIT – I

Basic Concepts: File Systems vs. DMBS, Characteristics of the Data Base Approach, Abstraction and Data Integration, Database users, Advantages and Disadvantages of a DBMS. Data Base Systems Concepts and Architecture: Schema and Instances, DBMS architecture and Data Independence, Data Base languages and Interfaces, DBMS functions and component modules. Entity Relationship Model: Entity Types, Entity Sets, Attributes & keys, Relationships, Relationships Types,Roles and Structural Constraints, Design issues, E-R Diagrams, Design of an E-R Database Schema, Reduction of an E-R schema to Tables. Relational Data Model: Relational model concepts, Integrity constraints over Relations, Relational Algebra – Basic Operations.

UNIT – II SQL: Data Definition and Data Types, Components of SQL: DDL, DML, and DCL, Schema Change Statement in SQL, Views& Queries in SQL, Specifying Constraints & Indexes in SQL, Additional Features of SQL. Relational Data Base Management System: ORACLE/MySQL, Basic structure, Date Base Structure & its manipulation in ORACLE/MySQL, Storage Organization in ORACLE/MySQL. Conventional Data Models: An overview of Network and Hierarchical Data Models.

UNIT – III Relational Data Base Design: Functional Dependencies, Decomposition, Normal forms based on primary keys (1 NF, 2 NF, 3 NF, & BCNF), Multi-valued Dependencies, 4 NF, Join dependencies, 5 NF, Domain key normal form. Practical Data Base Design: Role of Information systems in Organizations, Database design process, physical database design in Relational Database.

UNIT – IV

Transaction Processing Concepts: Introduction to Transaction Processing, Transaction & System Concepts, Properties of Transaction, Schedules and Recoverability, Serializability of Schedules. Concurrency Control Techniques: Locking Techniques, Time stamp ordering, Multi-version Techniques, Optimistic Techniques, Granularity of Data items. Recovery Techniques: Recovery concepts, Recovery Techniques in centralized DBMS. Data Base Security: Introduction to Data base Security issues. Text Books: 1. Elmasri & Navathe: Fundamentals of Database systems, 5th edition, Pearson Education. 2. Thomas Connolly Carolyn Begg: Database Systems, 3/e, Pearson Education. Reference Books: 1. Korth & Silberschatz: Database System Concept, 4th Edition, McGraw Hill International Edition. 2. Raghu Ramakrishnan & Johannes Gehrke: Database Management Systems, 2nd edition, Mcgraw Hill International Edition.

Page 23: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

23

3. Peter Rob, Carlos Colonel: Database system Design, Implementation, and Measurement, Cengage Learning, 2nd Ed. 4. Database Systems: A practical Approach to Design, Implementation and Management, Pearson Education- 3e 5. C.J. Date: An Introduction to Data Bases Systems 7th Edition, Addison Wesley N. Delhi. 6. Bipin C. Desai: An Introduction to Database System, Galgotia Publication, N. Delhi. 7. Abbey, Abramson & Corey: Oracle 8i-A Beginner‟s Guide, Tata McGraw Hill. 8. Ivan Bayross: SQL, PL/SQL- The Program Language of ORACLE, BPB Publication. 9. RUSSELL DYER, MYSQL IN A NUTSHELL Lecture Plan

MCA-14-34

Lectures Topics 1. A Historical perspective, File Systems vs. DBMS & Introductory concept of DBMS 2. Characteristics of the Data Base Approach 3. Data Abstraction and Data Integration 4. Database users, Advantages and Disadvantages of a DBMS 5. Implication of Data Base approach 6. Data Models, Schemas and Instances 7. DBMS architecture and Data Independence 8. Data base languages & Interfaces, DBMS functions and component modules 9. Entity Types, Entity Sets, Attributes & Keys 10. Relationships, Relationship Types, Roles and Structural Constraints 11. Design issues, weak entity types, E-R Diagrams 12. Design of an E-R Database Schema, Reduction of an E-R Schema to Tables 13. The Unified Modeling Language (UML) 14. Relational model concepts, Integrity constraints over Relations 15. Relational Algebra - Basic Operations 16. Structured Query Language, Data Definition, Constraints, & Schema Changes in SQL, Insert, Delete & update statements in SQL 17. View in SQL, Specifying Constraints and Indexes in SQL, Queries in SQL 18. Storage Organization in ORACLE Programming & ORACLE Applications 19. Network Model 20. Hierarchical Model 21. Functional Dependencies 22. Decomposition & Desirable properties of decomposition 23. Concept of Normalization & Normal forms (1 NF, 2 NF, 3 NF) 24. Normal form continued & BCNF 25. Information System & its Role in Organizations 26. Database design process 27. Physical database design in Relational Databases 28. Transaction Processing & System Concepts 29. Properties of Transaction 30. Schedules and Recoverability 31. Serializability of Schedules 32. Concurrency Control: Locking Techniques 33. Time stamp ordering 34. Multiversion Techniques 35. Optimistic Techniques & Granularity of Data Items 36. Recovery concepts & Recovery Techniques 37. Recovery Techniques in centralized DBMS 38. Data Base Security

Page 24: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

24

TUTORIAL SHEET – 1

1. Explain the ANSI-SPARC architecture of DBMS. Explain how this architecture helps to architecture helps to achieve the following:

a) Logical Data Independence b) Physical Data Independence

2. a) What do you understand by ER Model? How does an ER diagram help in analyzing a problem? b) Create an ER diagram showing following relationships. Indicate what kind of relationships they are: i) The STUDENT may be taught by one and only one TEACHER. The TEACHER may be the instructor of one or more STUDENTS. ii) The TEACHER may be responsible for one and only one CLASS. The CLASS may be the responsibility of one and only one TEACHER. iii) The CLASS may be made up of one or more STUDENTS. The STUDENT may be the member of one and only one CLASS.

3. (a) Discuss the main characteristics of database approach and contrast it with the file oriented approach. (b) Explain the difference between conceptual, logical and physical database design. Why might these tasks be carried out by different people?

4. (a) discuss the concept of data independence and explain its importance in a database environment. (b) Why is a DBMS divided into three layers namely, conceptual, logical and internal model? 5. Differentiate between the following: a) Cardinality and Degree of a Relation. b) Conceptual, Logical and Physical Schema c) Draw an ER diagram for airlines reservation system.

TUTORIAL SHEET – 2

1. a) Describe various SQL statements that can be used to specify views, constraints and indexes. b) Discuss the major modeling constructs used in Network and Hierarchical data models.

2. a) Describe the Storage Organization in ORACLE. b) What is the difference between a view and a base relation? c) Trace the history and development of SQL.

3. (a) Describe the differences between the join operations:- Theta joins, equi join, natural join. Give examples to illustrate your answer.

(b)Describe the relationship b/w mathematical relations & relations in the relational data model 4. (a) Illustrate redundancy and the problems that it can cause. (b)How functional dependencies can be used to group attributes into relations that are in a known normal form?

5. (a) Describe the purpose of normalizing data. (b) What is demoralization?

(c) What is the motivation for putting a relation in BCNF?

TUTORIAL SHEET – 3

1. a) what is Normalization? Why normalization is necessary in relational database design? b) A relation R is in 2 NF but not in 3 NF. Discuss the problems that will occur with each of the three basic operations: Insertion, Deletion and Updation. Use suitable examples.

2. a) what is Functional Dependency? Distinguish between trivial and non-trivial functional dependencies. b) Define candidate keys in terms of functional dependencies. c) What is the criterion for a good database design? Explain the desired properties of decomposition for this system explaining all the assumptions made. 3. (a) what is the purpose of check pointing during transaction logging? (b)Explain the meaning of serializability and how it applies to concurrency control. 4. (a) How locks can be used to ensure serializability? (b) How different levels of locking may affect concurrency? 5 (a) What are the guidelines for developing oracle applications? (b) Differentiate between the following: 1) Theta-Join, Equi-Join and Natural-Join.

Page 25: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

25

11) BCNF and 3 NF 111) Relation, Table and File.

TUTORIAL SHEET – 4

1. What do you understand by Concurrent Processing? Describe in detail various concurrency control techniques. 2. a) How does the recovery manager ensure atomicity and durability of transactions?

b) Differentiate between immediate update and deferred update recovery techniques. c) How does DBMS ensure that transactions are executed property?

3. (a) what is a view? Discuss the difference between a view and a base relation. (b)Identify the entities and attributes of a hospital system. Develop a logical database model (relational) 4. Write short notes on the following:- (i) Role of information systems in organizations. (ii) An overview of network data model. 5 Differentiate between the following: a) Before Image and After Image b) Serial Schedule, Non-Serial Schedule, Recoverable Schedule. c) Atomicity Property and Isolation Property.

Page 26: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

26

Page 27: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

27

Page 28: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

28

MCA-14-35 OPERATING SYSTEMS

Maximum marks: 100 (External: 80, Internal: 20) Time: 3 hours Note: Examiner will be required to set NINE questions in all. Question Number 1 will consist of objective type/short-answer type questions covering the entire syllabus. In addition to question no. 1, the examiner is required to set eight more questions selecting two from each unit. Student will be required to attempt FIVE questions in all. Question Number 1 will be compulsory. In addition to compulsory question, student will have to attempt four more questions selecting one question from each Unit. All questions will carry equal marks.

UNIT – I Introductory Concepts: Operating system functions, structure, types viz. distributed systems, special-purpose systems, open-source operating systems; Operating system services, system calls, system programs. CPU Scheduling: Process concepts, process operations, inter-process communication, scheduling criteria, scheduling algorithms, Comparative study of scheduling algorithms, Multiple processor scheduling.

UNIT – II

Concurrent Processes: Critical section problem, Semaphores, Classical process co-ordination problems and their solutions, monitors, synchronization examples. Deadlocks: Deadlock characterization, Deadlock prevention and avoidance, Deadlock detection and recovery.

UNIT – III

Memory Management: Swapping, Paging, Segmentation, Virtual memory concepts: Demand Paging, Page replacement Algorithms, Thrashing. Storage Management: File concepts, File access and allocation methods, File-system mounting, sharing, protection, structure and implementation. Directory Systems: Structured Organizations, directory protection mechanisms, recovery. Disk scheduling.

UNIT – IV

Protection & Security: Goals & principles of protection, domains of protection, access matrix, access controls. Security: Security problem, threats, security tools, classification. Distributed Systems: Types of network-based OS, Network structure and topologies, Communication structure & Protocol, design issues. Distributed File-system: Remote file access, File replication, examples. Distributed synchronization: Mutual exclusion, Concurrency control, deadlock handling. Text Books: 1. Silberschatz A., Galvin P.B.,and Gagne G., Operating System Concepts, Wiley India Pvt. Ltd. 2. Godbole, A.S. Operating Systems, Tata McGraw-Hill, New Delhi. 3. Tanenbaum, A.S., Operating System- Design and Implementation, Prentice Hall of India. Reference Books: 1. Deitel, H.M., Operating Systems, Addison- Wesley Publishing Company, New York. 2. Stalings William, Operating System, Prentice Hall of India, New Delhi.

LECTURE PLAN MCA-14-35

Lecture Topic 1. Introductory Concepts: Operating system functions

Page 29: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

29

2. Characteristics OF Operating system 3. Historical evolution of operating systems 4. Real time systems 5. Distributed systems 6. Methodologies for implementation of O/S service system calls 7. File Systems: Functions of the system 8. File access and allocation methods 9. Directory Systems: Structured Organizations 10. Directory and file protection mechanisms 11. Implementation issues: hierarchy of file 12. Device management 13. CPU Scheduling: Levels of Scheduling 14. Various kind of Preemptive and Non Preemptive Scheduling 15. Comparative study of scheduling algorithms 16. Multiple processor scheduling 17. Storage Management: Storage allocation methods 18. Single contiguous allocation 19. Multiple contiguous allocation 20. Paging 21. Segmentation 22. Combination of Paging and Segmentation 23. Virtual memory concepts 24. Demand Paging, Page replacement Algorithms 25. Thrashing 26. Hardware Management: Hardware Organization 27. Device scheduling policies 28. Deadlocks: Deadlock characterization 29. Deadlock prevention 30. Deadlock avoidance 31. Deadlock detection and recovery 32. practical considerations 33. Concurrent Processes: Critical section problem 34. Semaphores 35. Classical process co-ordination problems and their solutions 36. Interprocess Communications 37. Protection, Goals of protection 38. Mechanism & policies implementation dynamic protection structures 39. Revocation protection schemes in UNIX / MULTICS 40. DOS 41. WINDOW 42. UNIX & LINUX system 43. Comparative Study of DOS, Unix, Windows and Linux

TUTORIAL SHEET – 1

1 a) Describe the need of an Operating System. What are the functional sections of WINDOWS- Operating system ? b) Compare and contrast Multiprogramming, Multitasking and Multithreading. What are the key motivations of the development of each ? 2. Given :

Process Arrival Time Processing Time A 0.0.0 3 B 1.001 6 C 4.001 4

Page 30: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

30

D 6.002 2

a) Draw a Chart illustrating their execution, and b) Find the Average waiting time (rounding to the nearest tenth), using

i) FCFS, ii) SJF, iii) SRT, AND iv) RR(Time Quantum=2) Scheduling algorithms

3 (a) What is an operating system and why is it required? Discuss the characteristics of “real time system” and Distributed systems” (b) Discuss the role of „system calls‟ in the operation of a computer system. 4. (a) what do you mean by „processes? Discuss the various states of a process. Describe the „process state transition diagram. (b) Write short notes on any two of following (i) Schedulers. (ii) Process control block and its importance. (iii) Proper mix of I/O –bound and CPU – bound processes. 5. (a) differentiate between preemptive and non-preemptive scheduling. With the help of a diagram, explain „process scheduling ‟. (b) Give argument in support of followings (not more then 5lines for each) (i) The dispatcher should be as fast as possible. (ii) Shortest – job –first (SJF) scheduling algorithm is a special case of „priority‟ scheduling incurs a cost. (iii) SJF scheduling algorithm is difficult to implement. Why? (iv) Preemptive scheduling incurs a cost.

TUTORIAL SHEET – 2

1. (a) Define the term „deadlock‟ .state the necessary conditions for happening of a deadlock in a system. (b) Mention three strategies which can be adopted to deal with deadlocks. Give the core idea of any one strategy (c) When is a state called a „safe state‟? How is the concept of „safe state‟ helpful in avoiding deadlocks in the system? (d) What are the difficulties that may arise when a process is rolled back as the result of handling the deadlock that has occurred in the system? 2. (a) Give the precise meaning of the following terms:

i. demand paging ii. swapping iii. working set iv. storage compaction v. thrashing vi. storage management

(b) What do you understand by „internal fragmentation‟ and „external fragmentation‟? How can one tackle them? 3. (a) compare any two of the following

(i) Contiguous and non –contiguous memory management schemes. (ii) Fixed and variable partitioned memory management schemes. (iii) Paging and segmentation.

(b) Suppose memory partitions of 120K, 450K, 200K, 325K and 590K (in order) are available for user Processes. How would each of the: (i) First –fit (ii) Best –fit (iii)Worst –fit

Places processes of 202K, 420K, 95K, and 110K, (entering the system in order) ? Which algorithm makes the best memory in this case?

4. a) Explain any two classical problems of synchronization. Discuss solution of one of them.

Page 31: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

31

b) What is Critical section problem ? how can it be solved ? Explain any one method for solving this. 5. Explain the difference between Deedlock and Starvation by choosing appropriate examples. Suggest suitable actions to resolve the following : i) Deadlock prevention ii) Deedlock avoidance and

iii) Deedlock detection.

TUTORIAL SHEET – 3

1. (a) For UNIX environment, discuss any two of following. (i) The shell (ii) The kernel (iii) File management. (b) What do you understand by “resource Protection”? How does this differ from “security”? (c) Define „protection domain ‟and „access matrix‟ and give their utility in implementing protection mechanism of the system 2. (a) explain the ways in which the processes that want to communicate can refer to each other. (b) Discuss the critical section problem. Give three requirements for the solution to the critical section problem. 3 a) Discuss the following file allocation methods with their merits and demerits : i) Contiguous allocation ii) linked allocation,

iii) indexed allocation. b) Explain the difference between Tree Structured Directory and Acyclic Graph Directory . 4 a) Compare and contrast each of the following terms with the help of suitable examples diagrammatically : i) Compaction. ii) Paging and

iii) Segmentation b) Describe Belady‟s anomaly and provide an example that illustrates the anomalous behaviour of FIFO. 5. a) Explain briefly the role of Operating system as „Resource Manager‟. b) What is PCB ? Why is it needed ? c) What is a message-passing mechanism in inter-process communication ? d) What are four necessary conditions for Deedlock ?

TUTORIAL SHEET – 4

1 a) On a disk with 1000 cylinders, numbers 0 to 999, compute the number of tracks the disk arm must move to satisfy all the rquests in a disk queue. Assume the last request serviced was at track 348 and the head is moving towards zero. The queue in FIFO order contains requests for the following tracks : 126,877,695, 478, 108, and 379. Perform the computations for the following scheduling algorithms :

i) SSTF ii) C-SCAN iii) C-LOOK

b) What do you understand by Domains of protection ? Explaiin with examples from UNIX and MULTICS. 2 Write short notes on any three of the following : a) Dynamic Protection Structures. b) Use of DDE and OLE in Windows. c) Booting process in UNIX d) Comparision of Windows and Linux.

Page 32: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

32

3 (a) explain the „linked allocation „method for files. Give the merits and demerits of this method. Explain how “indexed allocation” method removes the drawbacks of “linked allocation „scheme? (b) Name the various methods for accessing files and explain any one of them. 4. (a) What do you, mean by „hardware management‟? Briefly discuss the various device scheduling Policies. (b) Write short notes on any one of following (i) Historical evolution of operating systems. (ii) Semaphores. 5. a) What is thrashing? When does it occur ? How can one avoid it ? b) Distinguish between user and dynamically allocated file space c) What are the goals of protection ? d) Discuss the concept of polling in I/O devices.

Page 33: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

33

LECTURE PLAN MCA-305

Page 34: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

34

Lectures Topics

1. Language paradigms 2. Language Evaluation criteria 3. Language design trade-offs 4. Influences on language design 5. Bindings 6. Type checking and scopes 7. Primitive Data Types 8. Variables 9. Structured Data Types 10. Data abstraction, control abstraction, procedural abstraction. 11. The Chomsky hierarchy of formal languages 12. Regular Grammars 13. Regular Expressions 14. Finite Automata 15. Context-free grammars: pushdown automata, ambiguous grammars. 16. Structured Programming 17. Parameter Passing Methods 18. Scope Rules, And Activation Records 19. Object Oriented Programming 20. Messages, Methods And Encapsulation 21. Classes And Polymorphism 22. Inheritance And Object Orientation 23. Design Issues For Object Oriented Languages 24. Features Of Functional Languages 25. Implementing Functional Languages 26. Applications Of Functional Languages 27. Formal logical systems 28. Implementations and applications. 29. Introduction to PROLOG 30. Languages for databases 31. Manipulating relational databases using SQL. 32. Language constructs for parallel processing 33. The Paradigm 34. Multiple Processes 35. Synchronization of cooperating processes.

TUTORIAL SHEET – 1

1. i) Write a regular grammar to identify a string consisting of characters a-z and 0-9. The first character of the string is to be a letter only. ii) Define orthogonality principle. 2 What do you understand by Binding ? Explain the name, address, value and type binding using suitable examples. 3 What do you understand by Type-equivalence ? Differentiate between Name equivalence and Structural equivalence. Also discuss their advantages and disadvantages. 4. a) Discuss type checking and type conversion with examples.

b) Explain different elementary data types, their specifications and implementations. 5. a) What is binding with its data types? b) Define Orthogonality principle?

TUTORIAL SHEET – 2

1 a) What do you understand by Call by name parameter passing technique ? Explain using suitable example.

Page 35: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

35

b) What do you understand by Chomsky hierarchy of formal langauges ? Explain 2. Write a Context free grammar that can recognize the string anbn. Also design the Push Down Automata(PDA) for the same. 3. i) What do you understand by strong and weak typing ? What are their merits and demerits ?

11) Show that following gamma ris ambiguous : <E> -> <E> + <E> | <E> * <E> | <N> <N> -> 0|1|2|3|4|5|6|7|8|9

4. a) What are the language design trades offs? Explain in detail. b) Describe method of syntax and semantics.

5. a) What are primitive data types? Explain with examples. b) What are structured data types and objects?

TUTORIAL SHEET – 3

1 a) What is inheritance ? What types of inheritance are supported by C++ ? Explain can how you pass parameters to the constructor of base class. b) Discuss the scope of public, private and protected members of a class using suitable examples. 2. What is Referential transparency ? What is Lazy evaluation ? Explain. 3. a) Differentiate between implicit and explicity type conversion. b) Compare struct in C and C++ 4. a) Explain contexts free grammar and pushdown automata with example. b) What is procedure activation? Explain all parameter passing methods. 5. a) What is scope? Explain it with activation record. b) Chomsky hierarchy of formal languages.

TUTORIAL SHEET – 4

1. a) What is Refutation system ? Show that Horn clause logic with resolution is a refutation system. b) Describe how the busy-wait implementation of semaphore can cause starvation. 2 a) What are the different problems that should be avaoided when scheduling cooperating processes ? Explain b) What is Rendezvous ? What is its use in Remote Procedure Calls(RPC) ? Explain. 3 a) What is a destructor ? b) What is anonymous variable in PROLOG ? 4. a) What is Relational database? How you manipulate RDBMS? b) Explain Classes and objects with C++ example. 5. a) What is logical programming? Explain it with formal logical system. b) Explain all language constructs for parallel processing

Page 36: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

36

Page 37: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

37

Page 38: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

38

Page 39: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

39

Page 40: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

40

Page 41: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

41

Page 42: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

42

Software Laboratory – MCA-14-37 based on MCA-14-34 Examination: 100 Total: 100

List of programs to be implemented in Oracle

1. Create the following tables:

1. List out first name, last name, salary for all employees 2. List out employee_id, last_name, department _id for all employees and rename employee id as “ID_ of_

employee”, last name as “Name of the employee”, department id as “ID_ of_ department”. 3. List out the employees who are earning salary between 3000 and 4500. 4. List out the employees who are working in department 10 and draw the salaries more than 3500. 5. List out the employee_ id, first_name in descending order based on salary column. 6. List out the employee details according to their last_name in ascending order and then on department_id in

descending order. 7. List out the department wise maximum salary, minimum salary, and average salary of the employees. 8. Delete the employees who are working in accounting department. 9. Display the second highest salary drawing employee details. 10. List out the employees who earn more than the lowest salary in department 30. 11. Find out the employees who earn greater than the average salary for their department. 12. Display the employees with their department name and regional groups. 13. Display the employee details with their manager names. 14. List out the distinct jobs in sales and accounting departments. 15. List out the common jobs in Research and accounting departments in ascending order.

2. Given an Employee table which has 3 fields - Id (Primary key), Salary and Manager Id, where manager id is the id of the employee that manages the current employee. Find all employees that make more than their manager in terms of salary 3. Design a database consisting of 2 tables with the following fields: One table with UserID as primary key and give name as UserDetails UserID UserName FirstName LastName

1 SureshDasari Suresh Dasari 2 PrasanthiDonthi Prasanthi Donthi 3 MaheshDasari Mahesh Dasari Another table with OrderID as Primary key and UserID as Foreign Key and give name as OrderDetails OrderID OrderNo UserID 1 543224 1 2 213424 2 3 977776 3 4 323233 3 5 998756 1 a) Perform join operations in order to get the following 8 tables as a result. b) Display the UserName from the second resultant table in ascending order.

Page 43: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

43

UserName LastName OrderNo SureshDasari Dasari 543224 PrasanthiDonthi Donthi 213424 MaheshDasari Dasari 977776 MaheshDasari Dasari 323233 SureshDasari Dasari 998756 UserID UserName FirstName LastName OrderID OrderNo UserID 1 SureshDasari Suresh Dasari 1 543224 1 2 PrasanthiDonthi Prasanthi Donthi 2 213424 2

3 MaheshDasari Mahesh Dasari 3 977776 3 3 MaheshDasari Mahesh Dasari 4 323233 3 1 SureshDasari Suresh Dasari 5 998756 1 UserID UserName FirstName LastName OrderID OrderNo UserID 1 SureshDasari Suresh Dasari 1 543224 1 1 SureshDasari Suresh Dasari 2 213424 2

1 SureshDasari Suresh Dasari 3 977776 3 1 SureshDasari Suresh Dasari 4 323233 3 1 SureshDasari Suresh Dasari 5 998756 1 2 PrasanthiDonthi Prasanthi Donthi 1 543224 1 2 PrasanthiDonthi Prasanthi Donthi 2 213424 2 2 PrasanthiDonthi Prasanthi Donthi 3 977776 3 2 PrasanthiDonthi Prasanthi Donthi 4 323233 3 2 PrasanthiDonthi Prasanthi Donthi 5 998756 1 3 MaheshDasari Mahesh Dasari 1 543224 1 3 MaheshDasari Mahesh Dasari 2 213424 2 3 MaheshDasari Mahesh Dasari 3 977776 3 3 MaheshDasari Mahesh Dasari 4 323233 3 3 MaheshDasari Mahesh Dasari 5 998756 1 UserID UserName OrderNo 1 SureshDasari 543224 1 SureshDasari 998756

2 PrasanthiDonthi 213424 3 MaheshDasari 977776 3 MaheshDasari 323233 UserID UserName OrderNo 1 SureshDasari 543224 2 PrasanthiDonthi 213424

3 MaheshDasari 977776 3 MaheshDasari 323233 1 SureshDasari 998756 UserID UserName FirstName LastName OrderID OrderNo UserID 1 SureshDasari Suresh Dasari 1 543224 1 1 SureshDasari Suresh Dasari 5 998756 1

2 PrasanthiDonthi Prasanthi Donthi 2 213424 2 3 MaheshDasari Mahesh Dasari 3 977776 3 3 MaheshDasari Mahesh Dasari 4 323233 3 EmpID EmpName EmpMgrID 1 Suresh 2 2 Prasanthi 4

3 Mahesh 2 4 Sai 1 5 Nagaraju 1 6 Mahendra 3 7 Sanjay 3 EmpName Manger Sai Suresh

Page 44: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

44

Nagaraju Suresh

Suresh Prasanthi Mahesh Prasanthi Mahendra Mahesh Sanjay Mahesh Prasanthi Sai 4. Create a table EMPLOYEE (e_id, dept, salary, Designation) a) From the salary column, show the average of all the values which are less than 25000. b) From the salary column, show the average of all the values which are less than 25000 and distinct. c) Use count function to return the name of the department and the number of employees in the associated department that makes over $25ooo / year. 5. Create 2 tables Orders and Salesperson as Salesperson (ID, Name, Age, Salary) and Orders (Number, Order_date, Cust_id, Salesperson_id, Amount) Apply the following constraints on these tables.

Primary key constraint (Defined at column level). Foreign Key Constraint (Defined at table level). UNIQUE key constraint. NOT NULL key constraint. CHECK constraint.

6. The price of a product changes constantly. It is important to maintain the history of the prices of the products. We can create a trigger to update the 'product_price_history' table when the price of the product is updated in the 'product' table. Create the 'product' table and 'product_price_history' table as

Product (product_id number(5), product_name varchar2(32), supplier_name varchar2(32), unit_price number (7, 2) ); product_price_history (product_id number(5), product_name varchar2(32), supplier_name varchar2 (32), unit_price number (7, 2)

i) Create the price_history_trigger and execute it. ii) Lets update the price of a product.

7. Design queries to create “composite unique index”, “bitmap index”, “reverse index” & “key Compressed index”. Also write query to drop the index. 8. ./*use of trigger*/ Log and audit data change by using employee and audit table

Create table Employee( ID VARCHAR2(4 BYTE) NOT NULL, First_Name VARCHAR2(10 BYTE), Last_Name VARCHAR2(10 BYTE), Start_Date DATE, End_Date DATE, Salary Number(8,2), City VARCHAR2(10 BYTE), Description VARCHAR2(15 BYTE) ) Create table employee_audit ( id VARCHAR2 (4 BYTE), salary Number (8,2), delete_date Date, deleted_by VARCHAR2(15 BYTE) ) Find username of person performing the DELETE on the table and then insert record into audit table.

9. Table name Areas (radius, area)

Write a Pl / sql program to calculate the area of the circle for a value of radius varying from 3 to 7. Store the radius and the corresponding values of calculated area in a table.

10. Table name EMP (emp_no, emp _ name, sal) Write a Pl / Sql program that first insert a record in an emp table. Update the salary of the employees by 2000 and check if the sum of sal exceeds 20000 then undo the changes made to the salaries.

Page 45: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

45

11. /* use of cursor*/ Employee (emp_code, ename, dept_no, job, salary) Emp_raise (emp_code, raise _ date, raise_amt) Emp_code and raise _date together form a composite primary key. A HRD Manager has decided to raise the salary for all the employees in the Department no 20 by 0.05. Whenever any such raise is given to the employees, an audit trail of same is maintained in the Emp_raise table. The Emp_raise table holds the employee no, the date when the raise was given and the raise amount. Write a PL/SQL block to update the salary of each employee of the dept_no 20 appropriately and insert a record in the emp_raise table as well.

12. Embedded C program to do the following: Starting with a station name (Denver, in this example), look up the station ID. Print the station ID. List all rows for that station ID.

shows single-row select and use of cursor note that all C-language variables used in SQL statements are declared in the DECLARE SECTION. note that all SQL statements begin with the syntax EXEC SQL and terminate with a semicolon.

13. Create a table Customer with the following fields: TABLE Customer (First_Name char(50),Last_Name char(50),Address char(50),City char(50), Country char(25), Birth_Date date) Create a view called V_Customer that contains only the First_Name, Last_Name, and Country columns from this table 14. Use a view to apply joins to the following two tables in order to display a view that has sales by region information.

Table Store_Information

Table Geography

store_name Sales Date

Los Angeles $1500 Jan-05-1999

San Diego $250 Jan-07-1999

Los Angeles

$300 Jan-08-1999

Boston $700 Jan-08-1999

region_name store_name

East Boston

East New York

West Los Angeles

West San Diego

Page 46: SETH JAI PARKASH MUKAND LAL INSTITUTE OF …jmit.ac.in/wp-content/uploads/2016/09/AC-MCA-III-sem-odd-semester... · model,domain state model, iterating the analysis.Application interaction

46

TIME – TABLE

DAY I II III IV V VI VII

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

SATURDAY