Latihan Soal Basis Data

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Gema Nusantara
G
Gema Nusantara
Community Contributor
Quizzes Created: 1 | Total Attempts: 2,956
Questions: 20 | Attempts: 2,956

SettingsSettingsSettings
Latihan Soal Basis Data - Quiz


Questions and Answers
  • 1. 

    Berguna ketika akan menampilkan data dengan kondisi yang bergantung pada data didalam tabel itu sendiri, adalah...

    • A.

      SQL

    • B.

      Query

    • C.

      Subquery

    • D.

      MySQL

    • E.

      RDBMS

    Correct Answer
    C. Subquery
    Explanation
    A subquery is useful when displaying data with conditions that depend on data within the table itself. It allows for more complex and dynamic queries by nesting one query inside another. This can be helpful in situations where you need to retrieve data based on certain criteria that cannot be achieved with a simple query. Subqueries are commonly used in SQL to filter, sort, or aggregate data from multiple tables.

    Rate this question:

  • 2. 

    Tidak termasuk sebutan atau nama lain dari subquery adalah...

    • A.

      Inner-select

    • B.

      Outer-query

    • C.

      Subselect

    • D.

      Nested select

    • E.

      Nested query

    Correct Answer
    B. Outer-query
    Explanation
    The correct answer is "outer-query" because the question is asking for a term or another name for a subquery that is not included in the given options. An outer query refers to the main query that contains the subquery, which is a query nested within another query. The other options provided, such as inner-select, subselect, nested select, and nested query, all refer to different ways of describing a subquery.

    Rate this question:

  • 3. 

    Tidak termasuk query SELECT yang ada didalam perintah SQL lain yaitu...

    • A.

      CREATE

    • B.

      INSERT

    • C.

      DELETE

    • D.

      SELECT

    • E.

      UPDATE

    Correct Answer
    A. CREATE
    Explanation
    The given correct answer is "CREATE". In SQL, the CREATE statement is used to create a new table, view, index, or other database objects. It is not a query that is used to retrieve data from the database. The other options mentioned (INSERT, DELETE, SELECT, UPDATE) are all query statements used to manipulate or retrieve data from the database.

    Rate this question:

  • 4. 

    Akan dikerjakan terlebih dahulu dan hasilnya akan digunakan sebagai pembanding pada pencarian data di klausa where adalah kegunaan dari...

    • A.

      Query

    • B.

      Subquery

    • C.

      Inner query

    • D.

      Outer query

    • E.

      Nested query

    Correct Answer
    C. Inner query
    Explanation
    The given correct answer is "Inner query". An inner query is used to perform a separate query within the main query and its results are then used for comparison or filtering in the WHERE clause. In this case, the inner query is being performed first to obtain some results, which will then be used for comparison in the WHERE clause to search for specific data.

    Rate this question:

  • 5. 

    Perhatikan pernyataan berikut ini! 1. Meng-copy data dari satu tabel ke tabel lain 2. Untuk mengirimkan dan menyediakan keperluan dari client 3. Menerima data dari inline view 4. Digunakan untuk menghasilkan baris data dengan menggabungkan 2 buah tabel atau lebih Mana yang merupakan kegunaan subquery?

    • A.

      1 dan 2

    • B.

      1 dan 3

    • C.

      2 dan 3

    • D.

      2 dan 4

    • E.

      3 dan 4

    Correct Answer
    B. 1 dan 3
    Explanation
    The correct answer is 1 and 3. The first statement mentions copying data from one table to another, which is not a typical use case for a subquery. The second statement talks about sending and providing client needs, which is not related to subqueries. The third statement mentions receiving data from an inline view, which is a common use of subqueries. The fourth statement talks about generating rows by combining multiple tables, which is also a common use of subqueries. Therefore, the correct answer is 1 and 3, as they both describe the uses of subqueries.

    Rate this question:

  • 6. 

    Subquery yang hanya menghasilkan satu baris data adalah...

    • A.

      Scalar subquery

    • B.

      Multiple-row subquery

    • C.

      Multiple-column subquery

    • D.

      Inline view

    • E.

      Query view

    Correct Answer
    A. Scalar subquery
    Explanation
    A scalar subquery is a subquery that returns only a single value or row of data. It is used to retrieve a single value from a subquery and can be used in expressions or conditions. In this case, the question is asking for the type of subquery that produces only one row of data, and the correct answer is scalar subquery.

    Rate this question:

  • 7. 

    Subquery yang dapat menghasilkan lebih dari satu baris dan lebih dari satu kolom data adalah...

    • A.

      Scalar subquery

    • B.

      Multiple-row subquery

    • C.

      Multiple-column subquery

    • D.

      Inline view

    • E.

      Query view

    Correct Answer
    C. Multiple-column subquery
    Explanation
    A multiple-column subquery is a subquery that can return multiple rows and multiple columns of data. This means that the subquery can retrieve and process multiple pieces of information from a table or multiple tables. It can be used in the WHERE clause or the SELECT clause of a SQL statement to filter or retrieve data based on multiple conditions or criteria.

    Rate this question:

  • 8. 

    Contoh operator perbandingan yang dapat digunakan pada klausa WHERE adalah...

    • A.

      +

    • B.

      -

    • C.

      *

    • D.

      #

    • E.

      =

    Correct Answer
    E. =
    Explanation
    The correct answer is "=" because the question is asking for a comparison operator that can be used in a WHERE clause. The "=" operator is used to check for equality between two values. In a WHERE clause, it is commonly used to filter rows based on a specific condition where a column value is equal to a specified value.

    Rate this question:

  • 9. 

    Digunakan untuk mengurutkan hasil seleksi adalah fungsi dari klausa...

    • A.

      FROM

    • B.

      SELECT

    • C.

      WHERE

    • D.

      UPDATE

    • E.

      ORDER BY

    Correct Answer
    E. ORDER BY
    Explanation
    The correct answer is "ORDER BY". This clause is used to sort the results of a selection in a specific order. It allows you to specify the column(s) by which you want to sort the data and the order in which you want them to be sorted (ascending or descending). By using the "ORDER BY" clause, you can organize the output of your query in a meaningful way, making it easier to analyze and understand the data.

    Rate this question:

  • 10. 

    Perhatikan perintah SQL berikut. INSERT INTO mahasiswa2 (NIM,Nama) SELECT NIM, Nama FROM mahasiswa; Merupakan contoh dari...

    • A.

      Subquery

    • B.

      Inline view

    • C.

      Scalar subquery

    • D.

      View join

    • E.

      Multiple

    Correct Answer
    A. Subquery
    Explanation
    The given SQL command is an example of a subquery. A subquery is a query nested within another query. In this case, the subquery is selecting the NIM and Nama columns from the mahasiswa table, and then the selected values are being inserted into the mahasiswa2 table.

    Rate this question:

  • 11. 

    Perintah SQL yang disediakan oleh semua program RDBMS untuk melakukan hubungan (relasi) multi-tabel yang memiliki pola hubungan tertentu disebut...

    • A.

      ADD

    • B.

      JOIN

    • C.

      ALTER

    • D.

      SELECT

    • E.

      CONSTRAIN

    Correct Answer
    B. JOIN
    Explanation
    The correct answer is JOIN. In SQL, the JOIN command is used to combine rows from two or more tables based on a related column between them. It allows us to retrieve data from multiple tables by specifying the relationship between them. By using JOIN, we can create a connection between tables and retrieve data that is related to each other based on the specified join condition.

    Rate this question:

  • 12. 

    Pengambilan data pada Inner Join bersifat...

    • A.

      Simetris

    • B.

      Asimetris

    • C.

      Absolut

    • D.

      Full join

    • E.

      Outer join

    Correct Answer
    A. Simetris
    Explanation
    The correct answer is "simetris". In an Inner Join, data is retrieved from both tables based on a matching condition. It is called "simetris" because it returns only the matching rows from both tables, creating a symmetrical result set.

    Rate this question:

  • 13. 

    Perintah SQL: Nama varchar(30) NOT NULL, arti perintah SQL yang bergaris bawah adalah...

    • A.

      Otomatis terisi

    • B.

      Boleh kosong

    • C.

      Tidak harus terisi

    • D.

      Tidak boleh kosong

    • E.

      Boleh terisi boleh kosong

    Correct Answer
    D. Tidak boleh kosong
    Explanation
    The SQL command "NOT NULL" indicates that the field "Nama" cannot be left empty or null. It means that a value must be provided for the "Nama" field when inserting or updating data in the table.

    Rate this question:

  • 14. 

    Query yang mendapatkan semua baris dalam tabel yang ada di sebelah kanan adalah pengertian dari...

    • A.

      Left join

    • B.

      Inner join

    • C.

      Full join

    • D.

      Self join

    • E.

      Right join

    Correct Answer
    E. Right join
    Explanation
    A right join is a type of join that retrieves all the rows from the table on the right side of the join and only the matching rows from the table on the left side. This means that if there are any unmatched rows in the table on the right side, they will still be included in the result set. In other words, a right join ensures that all the rows from the table on the right side are included in the query result, regardless of whether there is a match with the table on the left side.

    Rate this question:

  • 15. 

    Diagram Venn berikut merupakan penggambaran dari...

    • A.

      Full join

    • B.

      Inner join

    • C.

      Left join

    • D.

      Outer join

    • E.

      Right join

    Correct Answer
    B. Inner join
    Explanation
    The Venn diagram represents different types of joins in a database. The inner join is a type of join that returns only the matching records from both tables involved in the join. It excludes any non-matching records from the result set.

    Rate this question:

  • 16. 

    Seluruh data pada tabel A dan tabel B akan ditampilkan, terlepas apakah ada kecocokan data antara kedua tabel tersebut atau tidak, merupakan ciri dari...

    • A.

      Inner join

    • B.

      Left join

    • C.

      Full join

    • D.

      Outer join

    • E.

      Right join

    Correct Answer
    C. Full join
    Explanation
    A full join is a type of join where all the data from both tables, regardless of whether there is a match between the tables or not, will be displayed. This means that even if there is no matching data between the two tables, the data from both tables will still be included in the result.

    Rate this question:

  • 17. 

    Diagram Venn berikut merupakan penggambaran dari...

    • A.

      Inner join

    • B.

      Full join

    • C.

      Left join

    • D.

      Outer join

    • E.

      Right join

    Correct Answer
    E. Right join
    Explanation
    The diagram Venn represents different types of joins used in database management systems. The given answer, "right join," refers to a type of join where all the records from the right table and the matching records from the left table are included in the result set. This means that if there are unmatched records in the right table, they will still be included in the result set.

    Rate this question:

  • 18. 

    Hanya menampilkan seluruh data pada tabel kiri dan menampilkan sebagian data dari tabel kanan yang memiliki kecocokan dengan data pada tabel kiri, merupakan ciri dari...

    • A.

      Inner join

    • B.

      Full join

    • C.

      Left join

    • D.

      Outer join

    • E.

      Right join

    Correct Answer
    C. Left join
    Explanation
    A left join is a type of join in which all the data from the left table is displayed, and only the matching data from the right table is included. This means that if there is no match in the right table, the result will still include the data from the left table. In this case, the given explanation suggests that the characteristic of displaying all the data from the left table and only the matching data from the right table is a feature of a left join.

    Rate this question:

  • 19. 

    Perintah SELECT yang digunakan untuk menampilkan data semua kolom menggunakan...

    • A.

      &

    • B.

      @

    • C.

      %

    • D.

      *

    • E.

      #

    Correct Answer
    D. *
    Explanation
    The correct answer is "*". In SQL, the asterisk (*) is used in the SELECT statement to retrieve all columns from a table. It is a shorthand notation that eliminates the need to list out each individual column name. By using "*", the query will return all the data from every column in the specified table.

    Rate this question:

  • 20. 

    Klausa pada SQL yang digunakan untuk membatasi data yang memenuhi kondisi tertentu yaitu...

    • A.

      ASCENDING

    • B.

      DESCENDING

    • C.

      WHERE

    • D.

      ORDER BY

    • E.

      FROM

    Correct Answer
    C. WHERE
    Explanation
    The clause used in SQL to restrict data that meets certain conditions is the WHERE clause. This clause allows us to specify conditions that must be met for the data to be included in the result set. It acts as a filter for the data and allows us to retrieve only the rows that satisfy the specified conditions.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 18, 2019
    Quiz Created by
    Gema Nusantara
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.