Anda di halaman 1dari 3

Home / My courses / 1FDBR171542K - FUNDAMENTAL DBMS / PERTEMUAN 5 / Post Test 5

Started on Friday, 19 November 2021, 2:40 PM


State Finished
Completed on Friday, 19 November 2021, 2:47 PM
Time taken 6 mins 36 secs
Marks 15.00/15.00
Grade 10.00 out of 10.00 (100%)

Question 1 Perintah untuk membuat Primary Key ketika tabel telah terbentuk adalah :
Complete

Mark 1.00 out of Select one:


1.00
a. ALTER nama_tabel ADD CONSTRAINT nama_constraint PRIMARY KEY(nama_kolom)

b. ALTER TABLE nama_tabel ADD nama_constraint PRIMARY KEY(nama_kolom)

c. ALTER TABLE nama_tabel ADD CONSTRAINT nama_constraint PRIMARY KEY(nama_kolom)

d. CREATE PRIMARY KEY nama_primary_key

Question 2 Perintah untuk menambahkan kolom KD_POS dengan tipe data NVARCHAR dan ukuran 5 serta data spesification not null
Complete pada tabel PENDUDUK adalah :
Mark 1.00 out of
1.00 Select one:
a. ALTER TABLE Penduduk ALTER COLUMN kd_pos nvarchar(5) not null

b. ALTER Penduduk ALTER COLUMn kd_pos

c. ALTER TABLE Penduduk ADD kd_pos nvarchar(5)

d. ALTER Penduduk ADD kd_pos

Question 3 Perintah untuk memodifikasi kolom KD_POS dengan mengubah data spesifikasi menjadi NULL pada tabel Penduduk
Complete adalah :
Mark 1.00 out of
1.00 Select one:
a. ALTER TABLE Penduduk ADD kd_pos nvarchar(5)

b. ALTER Penduduk ALTER COLUMn kd_pos

c. ALTER TABLE Penduduk ALTER COLUMN kd_pos nvarchar(5) null

d. ALTER TABLE Penduduk ALTER COLUMN kd_pos nvarchar(5) not null

Question 4 Perintah untuk memodifikasi kolom pada sebuah tabel adalah :


Complete

Mark 1.00 out of Select one:


1.00
a. ALTER nama_tabel ADD nama_kolom

b. ALTER TABLE nama_tabel ADD nama_kolom tipedata

c. ALTER TABLE nama_tabel ALTER COLUMN nama_kolom tipedata dataspec

d. ALTER nama_tabel ALTER COLUMn nama_kolom

Online

This study source was downloaded by 100000819765043 from CourseHero.com on 11-17-2022 04:42:59 GMT -06:00

https://www.coursehero.com/file/132971349/Post-Test-5-Attempt-reviewpdf/
Question 5 Perintah untuk menghapus kolom KD_POS pada tabel Penduduk adalah :
Complete

Mark 1.00 out of Select one:


1.00
a. DROP TABLE penduduk

b. ALTER TABLE penduduk DROP kd_pos

c. DROP TABLE kd_pos

d. ALTER TABLE penduduk DROP COLUMN kd_pos

Question 6 Setelah membuat Query pada Jendela Query, agar dapat dilihat hasil query tersebut maka apa yang dilakukan :
Complete

Mark 1.00 out of Select one:


1.00
a. Klik tombol Execute

b. Klik tombol Debug

c. Tekan F4

d. Tekan F3

Question 7 Pada SQL Server 2008, perintah-perintah SQL diketikkan pada :


Complete

Mark 1.00 out of Select one:


1.00
a. SQL Server Tools

b. Transact SQL

c. Query Analyzer

d. Management Studio

Question 8 Perintah yang benar untuk membuat tabel Penduduk dengan nama kolom 1 ID_PDDK nvarchar(30) NOT NULL, nama
Complete kolom 2 NAMA nvarchar(30) adalah :
Mark 1.00 out of
1.00 Select one:
a. CREATE TABLE Penduduk

b. CREATE TABLE Penduduk (ID_PDDK nvarchar(30) NOT NULL, NAMA nvarchar(30))

c. CREATE Penduduk

d. CREATE Penduduk (ID_PDDK nvarchar(30) NOT NULL, NAMA nvarchar(30))

Question 9 Untuk membuat tabel pada SQL Server Management Studio dapat dilakukan menggunakan :
Complete

Mark 1.00 out of Select one:


1.00
a. Klik kiri pada Folder tabel lalu pilih New Tabel

b. Klik kanan pada Folder database lalu pilih New Tabel

c. Tidak ada jawaban yang benar

d. Jendela Query

Question 10 Perintah untuk membuat Primary Key dengan nama PDDK_PK untuk kolom ID_PDDK ketika tabel Penduduk telah
Complete terbentuk adalah :
Mark 1.00 out of
1.00 Select one:
a. CREATE PRIMARY KEY pddk_pk Online

b. ALTER penduduk ADD CONSTRAINT pddk_pk PRIMARY KEY(id_pddk)

c. ALTER TABLE penduduk ADD pddk_pk PRIMARY KEY(id_pddk)


This study source was downloaded by 100000819765043 from CourseHero.com on 11-17-2022 04:42:59 GMT -06:00
d. ALTER TABLE penduduk ADD CONSTRAINT pddk_pk PRIMARY KEY(id_pddk)
https://www.coursehero.com/file/132971349/Post-Test-5-Attempt-reviewpdf/
Question 11 Perintah untuk membuat Foreign Key dengan nama KD_POS_FK untuk kolom KD_POS pada tabel PENDUDUK dimana
Complete parent tabel dari KD_POS adalah tabel KDPOSDETAIL ketika tabel PENDUDUK telah terbentuk adalah :
Mark 1.00 out of
1.00 Select one:
a. ALTER TABLE penduduk ADD CONSTRAINT kd_pos_fk FOREIGN KEY (kd_pos)

b. CREATE CONSTRAINT kd_pos_fk FOREIGN KEY (kd_pos)

c. ALTER TABLE penduduk ADD CONSTRAINT kd_pos_fk FOREIGN KEY (kd_pos) REFERENCES kdposdetail(kd_pos)

d. CREATE CONSTRAINT kd_pos_fk FOREIGN KEY (kd_pos) REFERENCES kdposdetail(kd_pos)

Question 12 Perintah untuk menghapus tabel Penduduk adalah :


Complete

Mark 1.00 out of Select one:


1.00
a. DROP TABLE penduduk

b. ALTER TABLE penduduk DROP TABLE penduduk

c. ALTER TABLE penduduk DROP penduduk

d. DROP penduduk

Question 13 Setelah membuat Query pada Jendela Query, agar dapat dilihat hasil query tersebut maka apa yang dilakukan :
Complete

Mark 1.00 out of Select one:


1.00
a. Tekan F4

b. Klik tombol Debug

c. Tekan F3

d. Klik tombol Execute

Question 14 Perintah untuk menghapus sebuah tabel adalah :


Complete

Mark 1.00 out of Select one:


1.00
a. DROP TABLE nama_kolom

b. DROP TABLE nama_tabel

c. ALTER TABLE nama_tabel DROP COLUMN nama_kolom

d. ALTER TABLE nama_tabel DROP nama_kolom

Question 15 Perintah untuk menghapus kolom pada sebuah tabel adalah :


Complete

Mark 1.00 out of Select one:


1.00
a. ALTER TABLE nama_tabel DROP nama_kolom

b. ALTER TABLE nama_tabel DROP COLUMN nama_kolom

c. DROP TABLE nama_tabel

d. DROP TABLE nama_kolom

◄ Pre Test 5 Jump to... Upload Activity Pertemuan 5 ►

Online

This study source was downloaded by 100000819765043 from CourseHero.com on 11-17-2022 04:42:59 GMT -06:00

https://www.coursehero.com/file/132971349/Post-Test-5-Attempt-reviewpdf/

Powered by TCPDF (www.tcpdf.org)

Anda mungkin juga menyukai