Search Header Logo

DM Revision

Authored by box lem

Computers

University

Used 4+ times

DM Revision
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

36 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

15 mins • 1 pt

You need to list all files in the current directory including hidden files, sorted by size in human-readable format. Which command achieves this?

ls -lSah

ls -aSlh

ls -lsha

ls -lahS

Answer explanation

These commands will all produce the same result: listing all files in the current directory, including hidden files, sorted by size, in a human-readable format.

So, any of the provided options will work correctly. However, typically the order -aSlh (or any permutation of these options) is preferred for readability.

2.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What will be the result of the following command sequence in UNIX?

grep "error" log.txt | sort | uniq -c | tee error_summary.txt | head -5

Finds the first 5 unique error messages in log.txt and saves the output to error_summary.txt

Counts and lists the first 5 unique lines containing "error" from log.txt and saves the output to error_summary.txt

Displays the first 5 unique error messages from log.txt and does not save the output

Finds, counts, sorts unique error messages from log.txt, saves the output to error_summary.txt, and displays the first 5 lines

3.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

You have a directory named project with multiple files. How would you recursively change the permissions so that the owner can read, write, and execute, and everyone else can only read and execute?

chmod -R 755 project

chmod -R 744 project

chmod -R 751 project

chmod -R 711 project

4.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Given the following tables:

  • Employees(emp_id, emp_name, dept_id)

  • Departments(dept_id, dept_name)

  • Salaries(emp_id, salary)

  • Which SQL query retrieves the department name and the total salary for each department?

SELECT d.dept_name, SUM(s.salary) FROM Departments d INNER JOIN Employees e ON d.dept_id = e.dept_id INNER JOIN Salaries s ON e.emp_id = s.emp_id GROUP BY d.dept_name

SELECT dept_name, SUM(salary) FROM Employees e INNER JOIN Departments d ON e.dept_id = d.dept_id INNER JOIN Salaries s ON e.emp_id = s.emp_id

SELECT d.dept_name, s.salary FROM Departments d JOIN Employees e ON d.dept_id = e.dept_id JOIN Salaries s ON e.emp_id = s.emp_id

SELECT d.dept_name, SUM(s.salary) FROM Departments d, Employees e, Salaries s WHERE d.dept_id = e.dept_id AND e.emp_id = s.emp_id GROUP BY d.dept_name

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Media Image

Which XPath expression selects the titles of all books?

//book/title

//library/book[@title]

//book[@title]

//library//title

6.

MULTIPLE SELECT QUESTION

15 mins • 1 pt

In a database, a relation R(A, B, C, D) is in 3NF if it meets which of the following criteria?

(choose up to 2 answers)

For every non-trivial functional dependency A -> B, A is a superkey

  • There are no transitive dependencies in the relation

Every attribute is functionally dependent on the primary key

7.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Which of the following statements about CAP theorem in NoSQL databases is true?

It is possible to achieve all three: Consistency, Availability, and Partition Tolerance simultaneously

In the presence of a network partition, one has to choose between consistency and availability

CAP theorem applies only to SQL databases

CAP theorem ensures that a distributed database is always consistent

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?