¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

database final

Duncan Levings 72 preguntas

Hacer el test

Este test tiene tipos de pregunta que se abren en el reproductor de siempre.

Preguntas del test (72)

  1. 1Create a table with column constraints, two attributes; vendor_id (number, is primary key) and vendor_name (varchar2(50) and not null, is unique):
    CREATE [blank_start]TABLE[blank_end] vendors
    (
    [blank_start]vendor_id NUMBER PRIMARY KEY[blank_end],
    [blank_start]vendor_name VARCHAR2(50) NOT NULL UNIQUE[blank_end]
    )
    1. ATABLE
    2. Bvendor_id NUMBER PRIMARY KEY
    3. Cvendor_name VARCHAR2(50) NOT NULL UNIQUE
  2. 2vendor_id NUMBER PRIMARY KEY - [blank_start]unnamed constraint[blank_end]


    vendor_id NUMBER CONSTRAINT vendors_pk PRIMARY KEY - [blank_start]named constraint[blank_end]
    1. Aunnamed constraint
    2. Bnamed constraint
    3. Cconstraint
  3. 3composite primary key constraints are written as:
    CONSTRAINT value PRIMARY KEY (value1, value2)
    1. AVerdadero
    2. BFalso
  4. 4foreign key constraint is also known as reference constraint
    1. AVerdadero
    2. BFalso
  5. 5create table with foreign key constraint for vendors table (vendor_id value):
    CREATE TABLE invoices(
    invoice_id NUMBER PRIMARY KEY,
    vendor_id NUMBER [blank_start]REFERENCES vendors[blank_end] ([blank_start]vendor_id[blank_end]),
    invoice_number VARCHAR2(50) NOT NULL UNIQUE
    );
    1. AREFERENCES vendors
    2. Bvendor_id
  6. 6table level foreign key constraints are written as:

    CONSTRAINT named_foreign_key FOREIGN KEY (value) REFERENCES table (value)
    1. AVerdadero
    2. BFalso
  7. 7Check constraints are used to restrict values, add two checks to the table, check if invoice_total is >= 0 and payment_total is >= 0

    CREATE TABLE invoices(
    invoice_id NUMBER PRIMARY KEY,
    invoice_total NUMBER(9,2) NOT NULL
    [blank_start]CHECK[blank_end] ([blank_start]invoice_total >= 0[blank_end]),
    payment_total NUMBER(9,2) DEFAULT 0
    CHECK ([blank_start]payment_total >= 0[blank_end])
    )
    1. ACHECK
    2. Binvoice_total >= 0
    3. Cpayment_total >= 0
  8. 8What are the following commands:

    Rename a table: [blank_start]rename[blank_end] vendors to vendor
    delete all data from a table: [blank_start]truncate[blank_end] table vendor
    delete a table from the database: [blank_start]drop[blank_end] table vendor
    check table structure: [blank_start]desc[blank_end] vendor
    1. Arename
    2. Btruncate
    3. Cdrop
    4. Ddesc
  9. 9Insert command is as follows:

    INSERT INTO members (value1, value2, value3)
    VALUES (‘value1', 'value2', 'value3');
    1. AVerdadero
    2. BFalso
  10. 10Update table options to change ocost to 115.00 and olist to 200.00 where the ocode is 'CD2'

    UPDATE options
    [blank_start]SET ocost[blank_end] = 115.00,
    [blank_start]olist[blank_end] = 200.00 [blank_start]WHERE ocode[blank_end] = ‘[blank_start]CD2[blank_end]’;
    (1 rows updated)
    1. ASET ocost
    2. Bolist
    3. CWHERE ocode
    4. DCD2

Información

Descripción
Computer Science Test sobre database final, creado por Duncan Levings el 09/08/2018.
Idioma
English
Visitas
11
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?