Anda di halaman 1dari 4

TERA DATA Other RDBMS

Architectures Shared Nothing Shared Every thing

KIPS[Thousands of Instructions
Processes MIPS[Millions of Instructions/sec]
/sec]

Indexes Better Distribution And Retrieval Only FASI Retrieval

Parallelism Un-conditional conditional

Bulk Load Many Limited

Facilities Enterprise wide Data ware housing OLTP More


TERA BYTES[Billions of rows]

In Teradata Even (or) Uniform (or)


Random distribution is Automatic.
GIGA BYTES[Millions of rows]
If increase Number of Node, USERS
(OR) WORK, Teradata Doesn’t In Other RDBMS Sequential
sacrifice any performance and its distribution is Automatic.
scales linearly.
Mature optimizer:
Older Version of Tera data
Older Version of Oracle/SQL
stores
-64 Joins/Queries Server

-64 Sub Queries/Queries -32 Joins/Queries

-Formatting Commands -32 Sub Queries/Queries

-Analytical Commands

-Aggregate Commands etc.


1. Which of the following is Aggregate Function in SQL?

a) UNION b) LIKE c) MAX d) RANK

2. What will be Output of the Below Query?

SELECT A.A FROM (SELECT 1 AS A FROM DUAL UNION SELECT 1 AS FROM DUAL) A

FULL OUTER JOIN (SELECT 1 B FROM DUAL UNION SELECT 2 B FROM DUAL) B ON A.A = B.B

a) A 1 2 b) A 1 c) A 1 1 d) It will error out

3. What will be the Out Put of the below query?

SELECT SUM (a) sum_1, MAX (a) max_1, COUNT (a) count_1 from ( (SELECT 1 a FROM DUAL UNION ALL
SELECT TO_NUMBER ('2011') a FROM DUAL UNION ALL SELECT 1 a FROM DUAL ) union select 2 b from
dual )

a) sum_1 max_1 count_1 b) sum_1 max_1 count_1

2015 2011 4 2013 2011 3

c) sum_1 max_1 count_1 d) none of the above

2014 2011 3

4. What Will the Output of the below statement?

SELECT SUM(A.SALARY)+SUM(B.SALARY) AS TOT SAL FROM ( SELECT LEVEL EMP_ID , LEVEL*100


SALARY, CASE WHEN MOD(LEVEL,2) = 0 THEN 2 ELSE NULL END DEPT_ID FROM DUAL CONNECT BY
LEVEL < 6) A RIGHT OUTER JOIN (SELECT LEVEL EMP_ID , LEVEL*200 SALARY, CASE WHEN
MOD(LEVEL,3)=0 THEN 2 ELSE NULL AND DEPT_ID FROM DUAL CONNECT BY LEVEL < 6) B ON
A.DEPT_ID=B.DEPT_ID AND A.EMP_ID=B.DEPT_ID

a) 0 b) NULL c) 4200 d) 3000

5. Which of the following statements regarding primary key is false?

a). Primary key can't have null values b). Primary key may contain duplicate values

c). Primary key can't be applied for multiple columns d). Primary key column can't exist without Index.
6. Which of the following clauses is used in the CREATE TRIGGER command to create a row level trigger?

a). FOR ROW b). ROW LEVEL c). ROW LEVEL TRIGGER d). None of the above.

7. Where would you look errors from the database engine?

a). In error log b). In the recovery log c). In the alert log d). In the redo log

CUSTOMER

Cust_Id Cust_rating Cust_class Avl_bal

10 5 A 4000

20 5 A 500

30 5 B 2000

40 5 C 1000

CUST_LOAN_DETAILS

Loan_ac_id Loan_amt Loan_start_time penalty Cust_Id

100 4000 1-Dec-1980 Y 20

200 5000 1-Jan-1985 Y 30

400 7000 1-Apr-2000 N 10

8. What will be the output of the below query based on the above tables?

SELECT DISTINCT SUM (B.LOAN_AMT) OVER (PARTITION BY A.CUST_CLASS) SUM_OF_LOAN_CLASS,


A.CUST_CLASS FROM CUSTOMER A LEFT OUTER JOIN CUST_LOAN_DETLS B ON A.CUST_ID=B.CUST_ID
GROUP BY A.CUST_CLASS ORDER BY A.CUST_CLASS NULLS FIRS

a) Sum_of_loan_for_class Cust_class b) Sum_of_loan_for_class Cust_class

11000 A C

5000 B 5000 B

C 11000 A

c) Errors out d) None of the above

9. What will be the output of below query?


WITH T AS (SELECT LEVEL EMP_ID , LEVEL*100 SALARY, CASE WHEN MOD(LEVEL,2)=0 THEN 2 ELSE NULL
END DEPT_ID FROM DUAL CONNECT BY LEVEL < 6) SELECT SUM(SALARY) OVER (PARTITION BY DEPT_ID )
DEPT_TOTAL_SALARY,DEPT_ID FROM T ORDER BY EMP_ID

a) TOT_SAL DEPT_ID b) Error Out c) TOT_SAL DEPT_ID d) TOT_SAL DEPT_ID

600 - 900 2 900 --

900 2 600 - 600 2

600 - 900 2 900 --

900 2 600 2 600 2

600 - 600 2 900

10. What is the Output of the below query?

SELECT DECODE (A.A,NULL,1,0) A, DECODE (A.A,NULL, B.B,1) B FROM (SELECT NULL A FROM DUAL) A
LEFT OUTER JOIN (SELECT 1 B FROM DUAL) B ON A.A=B.B

a) A B b) A B c) A B d) None of the these

1 - 1 1 - 1

Anda mungkin juga menyukai