0% found this document useful (0 votes)
724 views5 pages

Practical Slips Questions

The document provides assignments for practical work on MongoDB and Neo4j databases. For MongoDB, students are asked to create collections for films and actors, insert documents, and perform queries including updates, deletes, and displays. For Neo4j, students must model a song or employee database as a graph and run queries on the graphs. The document also lists 11 Scala programming problems including calculating factorials, finding max/min, matrix operations, string processing, abstract classes, and Set operations.

Uploaded by

Bharat Saranda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
724 views5 pages

Practical Slips Questions

The document provides assignments for practical work on MongoDB and Neo4j databases. For MongoDB, students are asked to create collections for films and actors, insert documents, and perform queries including updates, deletes, and displays. For Neo4j, students must model a song or employee database as a graph and run queries on the graphs. The document also lists 11 Scala programming problems including calculating factorials, finding max/min, matrix operations, string processing, abstract classes, and Set operations.

Uploaded by

Bharat Saranda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Core Compulsory Practical Paper CSUP115 PPL and Database

Technologies Practical Assignments

MongoDB Practical Assignment

1. Create a database with the name ‘Movie’.

2. A ‘Film’ is a collection of documents with the following fields:

a. Film Id

b. Title of the film

c. Year of release

d. Genre / Category (like adventure, action, sci-fi, romantic etc.) A film


can belong to more than one genre.

e. Actors (First name and Last name) A film can have more than one
actor.

f. Director (First name and Last name) A film can have more than one
director. g. Release details (It consists of places of release, dates of
release and rating of the film.)

3. An ‘Actor’ is a collection of documents with the following fields:

a. Actor Id

b. First name

c. Last Name

d. Address (Street, Country, Pin-code)

e. Contact Details (Email Id and Phone No)

f. Age of an actor
Queries:

1. Insert at least 10 documents in the collection Film –

a. Insert at least one document with film belonging to two genres.

b. Insert at least one document with film that is released at more


than one place and on two different dates.

c. Insert at least three documents with the films released in the


same year. d. Insert at least two documents with the films directed
by one director.

e. Insert at least two documents with films those are acted by a


pair ‘Madhuri Dixit’ and ‘Shahrukh Khan’.

2. Insert at least 10 documents in the collection Actor.

Make sure, you are inserting the names of actors who have acted in
films, given in the ‘Film’ collection.

3. Display all the documents inserted in both the collections.

4. Add a value to the rating of the film whose title starts with ‘T’.

5. Add an actor named " " in the ‘Actor’ collection. Also add the details
of the film in ‘Film’ collection in which this actor has acted in.

6. Delete the film " ".

7. Delete an actor named " ".

8. Delete all actors from an ‘Actor’ collection who have age greater than
“”

9. Update the actor’s address where Actor Id is “ ”.

10. Update the genre of the film directed by “ ”.


Neo4j Practical Assignment No. 1

Choose any One database and solve respective queries in assignment


2

Create the following databases as graph models. Visualize the models


after creation, return properties of nodes, Return the nodes labels, Return
the relationships with its properties.

NB: You may assume and add more labels, relationships, properties to
the graphs

1. Consider a Song database, with labels as Artists, Song,


Recording_company, Recoding_studio, song author etc.

Relationships can be as follows

Artist → [Performs] → Song →[Written by] → Song_author.

Song → [Recorded in ] → Recording Studio →[managed by] → recording


Company Recording Company → [Finances] → Song

You may add more labels and relationship and their properties, as per
assumptions.

2. Consider an Employee database, with a minimal set of labels as follows


Employee: denotes a person as an employee of the organization

Department: denotes the different departments, in which employees work.

Skillset: A list of skills acquired by an employee

Projects: A list of projects in which an employee works.

A minimal set of relationships can be as follows:

Works_in : employee works in a department

Has_acquired: employee has acquired a skill

Assigned_to : employee assigned to a project


Controlled_by: A project is controlled by a department

Project_manager: Employee is a project_manager of a project

Neo4j Practical Assignment No. 2

1. Song Database:

a) List the names of songs written by “:..”

b) List the names of record companies who have financed for the song “….”

c) List the names of artist performing the song “….”

d) Name the songs recorded by the studio “…….”

2. Employee Database:

a) List the names of employees in department “…...................”

b) List the projects along with their properties, controlled by department “……”

c) List the departments along with the count of employees in it

d) List the skillset for an employee “… .............. ”


Paradigm of Programming Language
SCALA PROGRAMS
1. Write a program to calculate factorial of a number.

2. Write a program to find maximum number of given numbers.

3. Write a program to calculate average of all no between n1 and n2(eg 100

to 300 read values of n1 and n2 from user)

4. Write a program to find maximum and minimum of an array.

5. Write a program to calculate transpose of a matrix.

6. Write a program to check if the matrix is upper triangular or not.

7. Write a program To find the number of occurences in given string

8. Scala program to convert the string into uppercase

9. Create abstract class Shape with abstract functions volume() and

display(). Extend two classes Cube and Cylinder from it. Calculate

volume of each and display it.

10.Create Lists using five different methods ( Lisp style , Java style, fill,

range and tabulate methods).

11. Write a program to display largest and smallest element of the Set.

You might also like