Database Fundamentals and Technologies
Covers core database concepts including SQL Server, Oracle, iBATIS persistence framework, and IMS database systems. Topics include triggers, constraints, data types, SQL functions, and database storage.
Questions
maximum number of levels allowed in IMS DB?
- 1
- 15
- 255
- 1000
Can we use PROCOPT on PCB and Segment field (SENSEG)?
- True
- False
Each PSB consists of how many control blocks?
- 15
- 1
- 1 OR MORE
- 255
wHAT defines the types of access to the database?
- PCB
- SENSEG
- SENFLD
- PROCOPT
ALL OCCURENCES OF A SEGMENT TYPE UNDER A PARENT IS CALLED AS
- CHILD
- DEPENDENT
- TWIN
- SIBLINGS
Emp table has 10 rows. How many rows will be fetched against the following query? Select 10 from emp where rownum>=2
- 2
- 8
- 10
- None of the above
Round(159.63,-3) and Trunc(159.63,-3) will have following Outputs respectively:
- 200 and 100
- 100 and 100
- 160 and 150
- none of the above
What will be Output of the following query? select length(to_char('9999','999999.99')) from dual
- 9
- 10
- 4
- 8
If sysdate is ‘17/10/2009’and we run the following query,what will be the Output?
- 01/01/10
- 01/10/10
- 17/10/10
- It will throw an error
Which three SELECT statements displays 2000 in the format "$2,000.00"? (Choose three)
- SELECT TO CHAR(2000, '$#,###.##')
- SELECT TO CHAR(2000, '$0,000.00')
- SELECT TO CHAR(2000, '$9,999.00')
- SELECT TO CHAR(2000, '$2,000.00')
- SELECT TO CHAR(2000, '$N,NNN.NN')
- SELECT TO CHAR(2000, '$9,999.99')
Which three are DATETIME data types that can be used when specifying column definitions? (Choose three.)
- TIMESTAMP
- . INTERVAL MONTH TO DAY
- INTERVAL DAY TO SECOND
- INTERVAL YEAR TO MONTH
- TIMESTAMP WITH DATABASE TIMEZONE
You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?
- ALTER TABLE students ADD PRIMARY KEY student_id;
- ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);
- ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student _ id);
- ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);
- ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);
Which syntax turns an existing constraint on?
- ALTER TABLE table_name ENABLE constraint_name;
- ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint _ name;
- ALTER TABLE table_name ENABLE CONSTRAINT constraint _ name;
- ALTER TABLE table_name TURN ON CONSTRAINT constraint _ name;
A file can be member of only one filegroup.
- True
- False
CREATE TABLE statements are not allowed in a trigger.
- True
- False
A trigger cannot be created on a view.
- True
- False
Which one is correct for the following example shows how a stored procedure would be used with output parameters?
- <procedure id="swapEmailAddresses" parameterName="swapParameters" > {call swap_email_address (?, ?)} </procedure>
- <procedure id="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
- <procedure name="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
- <procedure propertyName="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
What is iBATIS?
- iBATIS is a O/R Mapping tool.
- iBATIS is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings.
- iBATIS is a java development tool.
- iBATIS is a first class persistence framework, and will not support for custom SQL, but will support stored procedures.
Every iBATIS application centers around an instance of SqlSessionFactory. A SqlSessionFactory instance can be acquired by using the ______________________
- SqlSessionFactoryBuilder
- SqlBuilder
- SqlFactoryBuilder
- SqlSessionBuilder
iBATIS does not encourages the direct use fo SQL and ensures that all the benefits of SQL are not overridder by the framework itself.
- True
- False