DB SEQ

A vibrant and engaging image of a computer screen displaying SQL code, surrounded by books on database management, and a person thinking thoughtfully next to it.

Database Mastery Quiz

Test your knowledge of database management systems, SQL statements, and JDBC connections with our comprehensive quiz! Designed for database enthusiasts, this quiz challenges your understanding of fundamental concepts, practical applications, and advanced features.

Key Features:

  • 84 carefully crafted questions
  • Multiple choice format with instant scoring
  • Ideal for students, professionals, and anyone interested in databases
84 Questions21 MinutesCreated by QueryMaster347
Which of the following is not a valid JDBC url:
Jdbc:mysql://nowhere.net:3306/acm e
Jdbc://nowhere.net:3306/acme
Jdbc:odbc:x
Which of the following SQL functions is not an aggregate function:
COUNT
AVG
TRIM
The JDBC driver for MySql can be loaded through
The command line
Loading the class in the class loader
C. registering a Driver instance with the DriverManager
All of the above
Given the following code sequence, what will happen if the file cannot be opened: try { conn = DriverManager.getConnection(url, user, password); BufferedReader reader = new BufferedReader(new FileReader("/path/to/file.csv")); //read from file and write to database } catch (Exception ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } finally{ if (conn!=null) conn.close(); }
An exception will be thrown, but the connection to the database will be created and remain open
An exception will be thrown, but the connection to the database will be created and be closed
The connection will never be created
Given the following code ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM employees"); which is not a way to retrieve the total number of records from the result set:
Rs.getInt(1)
B. rs.getInt(0)
Rs.getInt("COUNT(*)")
Given the following code sequence: PreparedStatement stmt = null; stmt = conn.prepareStatement("UPDATE employees SET type = ? WHERE idemployees = ?"); stmt.setInt(2, 3); stmt.executeUpdate(); What will happen?
An exception will be thrown
A warning will be thrown
The "employees" table will be updated
What does the column encpass contain after an insert, given the following trigger: CREATE TRIGGER upd_enc BEFORE INSERT ON ism_passwords FOR EACH ROW SET NEW.encpass = encpassword(NEW.encpass);
The value contained in encpass
The value returned by the function encpassword
An insert would raise an error
What does the following command SELECT category,AVG(budget) FROM projects HAVING budget > 1000 return:
All the project categories with an average budget over 1000
All the project categories
The command contains a logical error
What does the following sequence return: aes_decrypt(aes_encrypt(entity,key1),key2)
The original content of entity
The content of entity encripted with key2
Something else
The current host has the ip 10.2.3.4 After the following commands GRANT select,insert,update on examples.* TO 'andrei'@'localhost'; REVOKE insert,update on examples.* TO 'andrei'@'10.2.3.4'; FLUSH PRIVILEGES; the user can:
Select data from the "examples" table
Insert data into the "examples" table
Drop the examples table
What does the integer array produced by the following statement contain: int[] results = stmt.executeBatch();
Return codes for all executed operations
The number of affected rows for each operation
­1 for an operation if it did not succeed
A user can search for books stored in the database through a web interface. The actual query should be implemented as a:
PreparedStatement
Statement
CallableStatement
In the sequence cStmt = conn.prepareCall("call ismtest(?)"); the "?" symbol can represent:
Only an input parameter
Only an output parameter
Both an input and an output parameter
A table in FN2 is also in FN:
1
3
3.5
The following command CREATE USER 'andrei'@'localhost' IDENTIFIED BY 'ism'; allows connections from:
Only a remote computer
Only localhost
Any computer
A ResultSet object contains:
A connection
An SQL command
The result of the execution of an SQL command
In case of multiple attributes, how will they be displayed in LDIF?
One line for all values separated by double whitespaces
In a separate file LDIFMV(LDIF for multi value attributes)
All values on a single line separated by whitespace
One line for each value
What is a privilege?
A. Not a right to execute a SQL command over an object from a different schema
A right to execute a SQL command over an object from the schema
A right to execute a SQL command over an object from a different schema
Not a right to execute a SQL command over an object from the schema
What is a “dn” made of?
A. Only cn of the entry which is unique in the Directory Services
The entire address of the entry which is unique in the Directory Services
Only uid of the entry which is unique in the Directory Services
None is correct
For what is used “/” in LDIF?
For files attributes
For protoattrybutes
For binary attributes
For clone attributes
Care dintre cele de mai jos nu sunt privilegii SYSDBA
Startup
Shutdown
Hibernate
Niciunul
Cine poate interoga v$pwfile_users
Scott
Hr
Student
Sys
Ce este v$pwfile_users
Tabela virtuala
Partitie
Tabela
Niciun raspuns nu e correct
Care comanda este corecta?
Select * from v$pwfiles_users;
Select count(*) from v$pwfile_users
Select * from v$$pwfile_users
Select * from v$pwfile_end_users
Ce reprezinta optiunea with admin option in comanda grant
Privilegiu ce poate fi transmis altui utilizator, de catre cel ce a primit respectivul privilegiu
Privilegiu ce poate fi transmis altui utilizator, de catre toti utilizatorii, cu sau fara privilegii
Nu este o optiune in comanda grant
Niciun raspuns nu e corect
Ce reprezinta optiunea with nonadmin option in comanda grant
Privilegiu ce poate fi transmis altui utilizator, de catre cel ce a primit respectivul privilegiu
Privilegiu ce poate fi transmis altui utilizator, de catre toti utilizatorii, cu sau fara privilegii
Nu este o optiune in comanda grant
Niciun raspuns nu e corect
Care comanda este corecta
REVOKE DELETE ON orders FROM hr;
REVOKE DROP ANY TABLES FROM hr;
REVOKE DROP ON ANY TABLES FROM hr;
REVOKE NOTHING FROM hr;
Care din privilegiile de mai jos nu se mai regaseste din Oracle 9i, in sus:10g, 11g
Create table
Create view
Create session
Create procedure
Ce tabele virtuala poate sa fie folosita pentru vizualizarea privilegiilor
All_tab_privs_made si user_tab_privs_made
All_tab_privs_grated si user_tab_privs_granted
All_tab_privs_made si user_tab_privs_made
All_tabs_priv_made si user_tabs_priv_made
PrivilegiuCaba nu poate fi atribuit rolului
Niciun raspuns nu e correct
PRIVATE
EXTENDED
ADVANCED
Rolul PUBLIC
Este creat de scriptul sql.bsg care se ruleaza cand o baza de date se creaza
Este creat de scriptul sql.bsq care se ruleaza cand o baza de date se creaza
Este creat de scriptul sql.dsq care se ruleaza cand o baza de date se creaza
Nu exista rolul PUBLIC
La nivel fizic, organizarea ORACLE este:
Database ->tablespace->segment->datablock
Database ->tablespaces->segments->datablock
Database ->tablespaces->segment->datablock
Database ->tablespaces->segment->datablocks
Tablespaces-urile temporare
Nu exista tablespaces-uri temporare
N- au tempfiles si au datafiles
N-au decat datafiles
Au tempfiles si nu datafiles
Create table sales (year number(4), product varchar2(10), val number(10,2)) partition by range (year) partition p1 values less than (1992) tablespace u1, partition p2 values less than (1993) tablespace u2, partition p3 values less than (1994) tablespace u3, partition p4 values less than (1995) tablespace u4, partition p5 values less than (MAXVALUE) tablespace u5
Partitia nu e bine definita
Partitia nu are definita MINVALUE
Nu se pot introduce date in tabela partitionata mai mari decat MAXVALUE., unde MAXVALUE e max(coloana)
Partitia nu are definit MAXVALUE corect
Care este relatia intre cluster si partition, la nivel fizic
Nu exista nicio relatie
De incluziune
De excluziune
Niciun raspuns nu e correct
EUS vine de la
Enterprise Users Security
Enterprise User Security
Enterprises Unregistered Security
Enterprise Unified Security
Securitatea bazei de date, este asigurata la nivelul intregritatii datelor prin intermediul
DDL: grant/priv
DML: grant/insert/delete
DML grant/revoke
DDL: grant/revoke
DES sau:
Database encryption standard
Data encryption support
Data encryption standard
Data encoded standard
Comanda idabindentry este folosita
Pentru autentificare anonima
Pentru autentificarfe cu un entry(user) folosit ca atribut
Nu este o comanda LDAP
Poate fi folosita pentru mai multe autentificari anonime
Autentificare cu un user specific se face folosind urmatoarea comanda
Ldapbind –h host –p port –D “” –W userpassword
Ldapbind –h host -p port -D “userdn” –w userpassword
Ldapbind –h host –p port –G “” –W userpassword
Ldapbind –h host –p port –G “userdn” –W userpassword
In JDBC, comenzile Sql simple se utilizeaza prin obiecte
Statement
PreperedStatement
CallableStatement
ResaultSet
Pentru evitarea atacurilor prin acces direct la serverul de baze de date nu este utila
Criptarea conexiunii
Criptarea la nivelul de linie
Criptarea la nivel de tabela
Criptarea la nivel de coloana
In JDBC un obiect CallableStatement se utilizeaza pentru
Executarea unei proceduri stocare
Executarea unei comenzi parametrizabile
Conectarea la o baza de date
Niciun raspuns corect
Care comanda returneaza toti clientii care au cumparat cel putin un produs
Select * from clienti where id=any(select cust_id from comenzi)
Select * from clienti where id= select cust_id from comenzi
Select * from clienti having id=(select cust_id from comenzi)
Select * from clienti having id=any(slelect cust_id from comenzi)
Care dintre afirmatii este adevarata
In FN1 pot exista campuri redudante
N FN2 este nu exista dependente tranzitive
In FN3 pot exista dependente tranzitive
In FN3 nu exista dependente partiale
Care afrimatie este adevarata in modelul relational
Atributul este o tabele
Atributul este o linie a unei tabele
Atributul este o coloana a unei relatii
Atributul este un tip de date
Este o comanda DML
INSERT
CREATE
ALTER TABLE
DROP TABLE
Este posibil un atac prin Sql injection daca se utilizeaza
Obiect Statement
Obiecte PreparedStatement
Proceduri stocate
Obiecte CallableStatement
Cheile primare
Pot avea valori nedefinite
Identifica unic un tuplu
Identifica unic o coloana
Pot avea valori duplicate
Nu este o comanda MySql de management al rolurilor
CREATE USER
REVOKE
GRANT
DELETE USER
DIT inseamna
Directory Information Terminal
Direction Intersection Terminology
Directory Informational Technique
Directory Information Tree
In structura de mai sus: care este root-ul “radacina” OID-ului de mai sus:
Cn=users
Dc=com,dc=erednic
Dc=erednic,dc=com
Cn=users,dc=erednic,dc=com
Cati useri sunt in containerul cn=userr,dc=erednic,dc=com
3
2
1,doar cel selectat
Nici unul
Comanda ldabindentry este folosita
A.pentru autentificare anonima
Pentru autentificarea cu un entry(user) folosit ca atribut
Nu este o comanda LDAP
Poate fi folosita pentru mai multe autentificari anonime
Pentru ce tip de operatie LDAP este folosit
Ldapadd
Ldapadddn
Ldappdn
Ldapdnp
Ce objectclass ar mai trebui adaugat
Person
InetOrgPerson, organisationalPerson, orcluser
Person, orcluserv2
Person, inetOrgPerson, organisationalPerson, orcluser, orcluserv2
Autentificare cu un user specific se face folosind urmatoarea comanda
Ldapbind –h host –p port –D “” –w userpassword
Ldapbind –h host –p port –D “userdn” –w userpassword
Ldapbind –h host –p port –G “” –w userpassword
Ldapbind –h host –p port - G “userdn” –w userpassword
Care comanda de mai jos returneaza primul user din containerul Users Din realmul: dc=erednic,dc=com
A.ldapsearch –h host –p port –D “cn=orcladmin” –w password –z 1-b “cn=users”
B. ldapsearch –h host –p port –D “cn=orcladmin” –w password -b “cn=users” –s one
C. ldapsearch –h host –p port –D “cn=orcladmin” –w password –z 1-b “cn=users,dc=erednic,dc=com” –s one “objectclass=*” dn
D. ldapsearch –h host –p port –D “cn=orcladmin” –w password –t 1-b “cn=users”
Ldapcreate
E folosit pentru crearea unui nou entry in LDAP
E utilizat pentru crearea a uneia sau mai multe entry-uri in LDAP
Ajuta la stergerea unui entry sau mai multor
Nu este comanda LDAP
When an entry in the LDIF has a multi value attribute, values are written
All values on a single line separated by whitespace
One line for all values separated by double whitespaces
One line for each value
In a separate file LDMFMV(LDIF for multi value attributes)
While using JDBC a parametrized statement can be created with the method
PrepareCall
CreateStatement
PrepareStatement
ExecuteStatement
Which of the following statements is true?
Primary keys uniquely identify a tuple
Primary keys can have duplicate values
Primary keys can have undefined values
Primary keys uniquely identify a column
One privilege is
Not a right to execute a SQL command over an object from the schema
A right to execute a SQL command over an object from the schema
A right to execute a SQL command over an object from a different schema
Not a right to execute a SQL command over an object from a different schema
In a LDIF file for an entry, DN contains
None is correct
Only uid of the entry which is unique in the Directory Services
Only cn of the entry which is unique in the Directory Services
The entire address of the entry which is unique in the Directory Services
For what attributes the following reference is used "/"
For clone attributes
For binary attributes
For files attributes
For protoattrybutes
In JDBC a ResultSet object represents:
The result of the execution of an SQL command
A batch of sql Commands
A connection
An Sql command
The oracladmin user selected is
The superuser of the installed OID
Is a fresh user created in the realm
None is correct
Is a simple user in the realm
Which of the following is not a component relational model?
Information about the physical allocation of the data
The name of the attributes
The name of the table
Columns with values for each attribute
In a ldif file, the lines in an entry continues on the next row using
Enter
Tab
Shift
Ctrl
Which users are installed directly with OID in cn=Users
Oracladmin and PUBLIC
Oracladmin, Public and private, which is deleted in the installation
None are correct
Oracladmin, oidadmin users
Which of the following is a DDL command:
Truncate
Delete
Insert
Update
Given a table with the structure : students(student_id,student_name,course_name) can anomalies appear on an update to student_name?
YEs
No
Which of the following statements is true?
In FN2 there are no transitive dependencies
In fn1 redundant fields are accepted
In fn3 there are no partial dependencies
In fn3 transitive dependencies are accepted
What does the following code sequence return in mysql aes_decrypt(aes_encrypt(s,key),key)
The character string"key"
A character string differnet from"s" or "key"
An error
The character string"s"
In jdbc a callablestatement object is used for:
The execution of a stored procedure
The execution of a parametrized command
None of the above
Establishing a connection of the database server
Which of the following is true in the relational model?
An attribute is a column of a table
An attribute is at able
An attribute is a line of a table
An attribute is a data type
Which command is correct
Sqlplus / as system
Sqlplus / as sysdbadmin
Sqlplus /as sysadmin
Sqlplus /as sysdba
Which of the following commands returns all client who have bought at least a product?
Select * from clients where id=any(select cust_id from orders)
Select * from clients having id=any(select cust_id from orders)
Select * from clients where id = select cust_id from orders
Select * from clients having id=(select cust_id from orders)
Which of the following is true?
In fn2 there are redundant fields
In fn2 there are transitive dependencies
In fn3 there are redundant fields
In fn3 there are transitive dependencies
Any priviledge given to public become a priviledge
To any user from the database
To the dropped users
To nobody
Only to sysdba and sysoper users
Which of the following is a DML command?
Insert
Create
Drop table
Alter table
When logging to SSo with orcladmin user
None is correct
The realm oracladmin user
The superuser
The clone superuser
LDAP (lightweight directory acces protocol) is
None is correct
Not a relational database
A model of distributed database
A lite relational database
COD ... Telephone number is
Mandatory attribute
None is correct
Protoattribute
Optional attribute
{"name":"DB SEQ", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of database management systems, SQL statements, and JDBC connections with our comprehensive quiz! Designed for database enthusiasts, this quiz challenges your understanding of fundamental concepts, practical applications, and advanced features.Key Features:84 carefully crafted questionsMultiple choice format with instant scoringIdeal for students, professionals, and anyone interested in databases","img":"https:/images/course8.png"}
Powered by: Quiz Maker