Showing posts with label computer gk. Show all posts
Showing posts with label computer gk. Show all posts

Friday, November 17, 2017

Database Normalization

Database Normalization


A badly designed relational schema has a number of redundancies and therefore it is less efficient. These relation schemas have improper redundancies that lead to a number of problems as Redundancy, insertion anomalies, update anomalies and delete anomalies.
Normalization is a database design technique where database is analyzed to organize the tables in a manner that reduces redundancy and Data dependency. Practically, it is not possible to make redundancy ZERO even in BCNF but it can be reduced with higher normal form.

Normal Forms

Basically, there are 4 most important normal forms that are:

First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)

There is also a relationship in different normal forms. The degree of normalization goes on increasing from 1 NF to BCNF. A relation present in 1 NF is less normalized than a relation in BCNF. Also, if a relation is present in higher normal form, of course it will be in lower normal forms. For example, if a table is in BCNF then of course, it is in 1 NF , 2NF and 3 NF also.
Redundancy in Normal forms
1NF>2NF>3NF>BCNF

First Normal Form
First normal form states that all the attributes in a table must have atomic values and there should be no repeating groups i.e each cell should have only 1 value.
Consider the following example of table DEPARTMENT

DEPARTMENT

DNAME DNUMBER DLOCATION
Research 1 Boston
Marketing 2 {Boston, NewYork,Sugarland}
Administration 3 {Sugarland,Houston}

{Violates 1 NF}

This relation violates 1 NF because there are multiple values for DLOCATION in last two tuples.

DNAME DNUMBER DLOCATION
Research 1 Boston
Marketing 2 Boston
Marketing 2 NewYork
Marketing 2 Sugarland
Administration 3 Sugarland
Administration 3 Houston

{ 1NF}

Second Normal Form(2NF)
For a relation schema to be in second normal form (2NF), every non-prime attribute A in R must be fully functionally dependent on the primary key.
Prime attributes are the attributes that are part of any candidate key and rest of attributes are non-prime attributes.
Note: A relation Schema having non-composite key is always in 2 NF because there can be no partial dependency.

Third Normal Form (3NF)
For a relation schema R to be in third normal form (3NF), two conditions are needed to be satisfied : 1) must be in 2NF and no non-prime attribute A in R is transitively dependent on the primary key.
In simple terms, if there is a functional dependency X-> Y then either X should be super key or Y should be a Prime attribute.
Practically a relational Schema is considered normalized if it is in 3NF because most of the 3NF relations are free of any type of anomalies. Also, Lossless and dependency-preserving decomposition into 3NF is always possible

Boyce-Codd Normal Form (BCNF)
BCNF is stricter than 3NF. In BCNF, if there is a functional dependency X-> Y then X must be a super key.
Note: Any relation with two attributes is always in BCNF.

GATE-2005 (IT)

A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
F1->F3
F2->F4
(F1,F2)->F5
We need to find the normal form for this table.
Sol: Normal form for a table is the highest normal form for which conditions are satisfied in the table.

First we need to find out the keys as not given. For finding keys, you can switch to blog- “Determining keys using functional dependencies”. It is very easy to find here that key is composite (F1,F2).


Now start from 1 NF. As nothing is given about atomic values we will consider it is in 1NF.


Now check for 2NF. Since key for this table is composite, it becomes mandatory to check for full dependencies. Form first two dependencies, it is easy to find out that 2NF is violated. F3 and F4 are non-prime attributes and they are partial dependent on key i.e dependent on a part of key. Therefore the given table is not in 2 NF.
Table is in 1 NF.


GATE-2004 The relation schema Student_Performance (name, courseNo, rollNo, grade) has the following FDs:
name,courseNo->grade
rollNo,courseNo->grade
name->rollNo
rollNo->name
The highest normal form of this relation scheme is
(a) 2NF (b) 3NF (c) BCNF (d) 4NF

Solution:

Find keys
Here two composite keys are : (name,courseNo) and (rollNo,courseNo)


Check for 2NF. There is only 1 non-prime attribute that is grade. Grade is fully dependent on all the keys, so in 2 NF.


Check for 3 NF
First consider FD1 : name,courseNo->grade here L.H.S has key so satisfy 3NF.
Consider FD2 : rollNo,courseNo->grade here also L.H.S has key so satisfy 3NF.
Consider FD3 : name->rollNo here R.H.S has prime attribute so satisfy 3NF.
Consider FD4 : rollNo->name here also R.H.S has prime attribute so satisfy 3NF.


Check for BCNF
FD1 and FD2 satisfy BCNF also because both having key in L.H.S. FD3 and FD4 not satisfying BCNF condition because no key on L.H.S


Therefore given relation schema is in 3NF

Thursday, January 26, 2017

UGC NET DECEMBER 2009 PAPER II SOLVED



1. If she is my friend and you are her friend, then we are friends. Given this, the friend relationship in this context is ________________.
(i) Commutative (ii) transitive (iii) implicative (iv) equivalence
(A) (i) and (ii) (B) (iii) (C) (i),(ii),(iii) and (iv) (D) None of these
Ans:- D

2. Circle has ________ 
(A) No vertices (B) only 1 vertex (C) vertices (D) None of these
Ans :- A

8. The highest noise margin is offered by
(A) BICMOS (B) TTL (C) ECL (D) CMOS
Ans:- B

9. The answer of the operation (10111)2 * (1110)2 in hex equivalence is
(A) 150 (B) 241 (C) 142 (D) 101011110
Ans:- C

10. How many ‘1’ are present in the binary representation of 
3 X 512 + 7 X 64 + 5 X 8 + 3
(A) 8 (B) 9 (C) 10 (D) 11
Ans:- B

11. Recursive functions are executed in a 
(A) First in first out order (B) Last in first out order
(C ) Parallel fashion (D) Load Balancing
Ans: B

12. What would be the output of the following program, if run from the commandline as “myprog 1 2 3”?
main(int argc,char *argv[])
{
int i;
i=argv[1]+argv[2]+argv[3];
printf(“%d”,i);
}
(A) 123 (B) 6 (C) Error (D) “123”
Ans:- C

13. A ________________ is a special method used to initialize the instance variable of a class.
(A) Member function (B) Destructor (C) Constructor (D) structure
Ans:- C

14. Encapsulation is
(A) Dynamic binding
(B) A mechanism to associate the code and data
(C ) Data abstraction
(D ) Creating new class
Ans:- B

15. Which of the statements are true?
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of a derived class.
III. A derived class inherits constructors and destructors
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
(A) I,II,III (B) II,III,V (C) III,IV,V (D) I,II,IV
Ans:- D

16. The E-R model is expressed in terms of 
I. Entities
II. The relationship among entitites
III. The attributes of the entities.
IV. Functional relationship.
(A) I,II (B) I,II, IV (C) II,II,IV (D) I,II,IV
Ans:- D

17. Specialization is ________________process.
(A) top-down (B) bottom up
(C ) both (A) and (B) (D) none of these
Ans:- A

18. Match the following:
(1) Determinants (a) No attributes
(2) Candidate key (b) Uniquely identified a row
(3) Non-redundancy (c ) A constraint between two attributes
(4) Functional dependency (d) Group of attributes on the left hand side of arrow 
of function dependency
(A) 1 – d, 2 – b, 3 – a, 4 – c
(B) 2 – d, 3 – a, 1- b, 4 – c
(C) 4 – a, 3 – b, 2 – c, 1 – d
(D) 3 – a, 4 – b, 1 – c, 2 – d
Ans:- A. 

19. A function that has no partial functional dependencies is in _____________ form.
(A) 3 NF (B) 2 NF (C) 4 NF (D) BCNF
Ans:- B

20. Which of the following statement is wrong?
I. 2-phase locking protocol suffer from dead lock.
II. Time stamp protocol suffer from more aborts.
III. A block hole in a DFD is a data store with only inbound flows.
IV. Multivalued dependency among attribute is checked at 3 NF level.
V. An entity-relationship diagram is a tool to represent event model.
(A) I ,II,III (B) II,III,IV (C) III,IV,V (D) II,IV,V
Ans:- A

21. If the number of leaves in a strictly binary tree is an odd number, then what can you say with full conviction about total number of nodes in a tree? 
(A) It is an odd number.
(B) It is an even number.
(C ) It cannot be equal to the number of leaves.
(D ) It is always greater than twice the number of leaves.
Ans:- A. Strictly binary tree with N leaves contains 2N-1 nodes. So when the number of leaves is odd number then the total number of nodes in the tree also will be odd if we apply the above formula.

22. The number of edges in a complete graph of n vertices is
(A) n (B) n(n-1)/2 (C ) n(n+1)/2 (D) n2/2
Ans:- B. The complete graph on n vertices has n(n-1)/2 edges. 

23. At a hill station, the parking lot is one long drive way snaking up a hill side. Cars drive in and park right behind the car in front of them, one behind another. A car can’t leave until all the cars in front of it have left. Is the parking lot more like 
(A) An array (B) A stack (C) A queue (D) A linked list
Ans:- C. 

24. With regard to linked list, which of the following statement is false ?
(A) An algorithm to search for an element in a singly linked list requires O(n) operations in the worst case. 
(B) An algorithm for deleting the first element in a singly linked list requires o(n) operations in the worst case.
(C ). An algorithm for finding the maximum value in a circular linked list requires o(n) operations.
(D ). An algorithm for deleting the middle node of a circular linked list requires o(n) operations. 
Ans:- B

25. A hash function f defined as f(key)=key mod 7, with linear probing used to resolve collisions. Insert the keys 37,38,72,48,98 and 11 into the table indexed from 0 to 6. What will be the location of 11?
(A) 3 (B) 4 (C ) 5 (D) 6
Ans:- C

26. Device on one network can communicate with devices on another network via a 
(A) Hub/switch (B) Utility server
( C) File server (D) Gateway
Ans:- D

27. What is the maximum window size in sliding window protocol used in a computer network?
(A) 4 (B) 8 (C ) 15 (D) 16
Ans:- A

28. Which of the following are Data Link Layer standard?
1. Ethernet 2. HSSI 3. Frame Relay
4. 10-Base T 5. Token Ring
(A) 1,2,3 (B) 1,3,5 (C) 1,3,4,5 (D) 1,2,3,4,5
Ans:- C

29. In case of Bus/Tree topology signal balancing issue is overcome by
(A) Modulation (B) Polling
(C ) Segmentation (D) Strong transmitter
Ans:- C

30. Match the following:
(i) Ethernet (a) Deterministic
(ii) Token Ring (b) Utilize the full wire speed
(iii) Cut-through switch (c ) Prevent Looping
(iv) Spanning tree (d) Checking valid address
Codes:
(A) i-d,ii-a,iii-b,iv-c (B) i-a,ii-d,iii-b,iv-c
(C ) i-d,ii-d,iii-c,iv-b (D) i-d,ii-c,iii-b,iv-a
Ans:- A

31. In an absolute loading scheme which loader function is accomplished by assembler?
(A) re-allocation (B) allocation (C ) linking (D) loading
Ans:- A. Implementation of Absolute loader: The four loader functions are performed as following: 1.Allocation- By programmer 2.Linking- By programmer 3.Relocation- By assembler 4.Loading- By loader

32. Which of the following grammar is LR(1)?
(A) A->aAb, A->bAb,A->a,A->b
(B) A->aAa,A->aAb,A->c
(C ) A->A+A,A->a
(D)Both (A) and (B)

33. A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.
S->xxW[ print “1” ]
S->y [ print “2” ]
W->S2 [ print “3” }, what is the translation of “x x x x y z z”?
(A) 1 1 2 3 1 (B) 1 1 2 3 3 (C) 2 3 1 3 1 (D) 2 3 3 2 1
Ans:- C

34. Context-free Grammar(CFG) can be recognized by
(A) Finite state automata
(B) 2-way linear bounded automata
(C ) push down automata
(D ) Both (B) and (C)
Ans:- D

35. Synthesized attribute can be easily simulated by a 
(A) LL grammar (B) Ambiguous grammar
(C ) LR grammar (D) None of the above
Ans:- C

36. In the process management Round-robin method is essentially the pre-emptive version of _______________.
(A) FILO (B) FIFO
(C ) SSF (D) Longest time first
Ans:- B

37. A page fault
(A) is an error specific page
(B) is an access to the page not currently in memory
(C ) occur when a page program occur in a page memory.
(D ) page used in the previous page reference.
Ans:- B

38. A semaphore count of negative n means (s=-n) that the queue contains ___n__________ waiting processes.
(A) n + 1 (B) n (C) n – 1 (D) 0
Ans:- B

39. A program is located in the smallest available hole in the memory is ______________
(A) best-fit (B) first-bit (C ) worst-fit (D ) buddy
Ans:- A

40. The unix command used to find out the number of characters in a file is
(A) nc (B) wc (C ) chcnt (D) lc
Ans:- B

41. Software Engineering is a discipline that integrates __________ for the development of computer software.
(A) Process (B) Methods (C ) Tools (D) All
Ans:- D

42. Any error whose cause cannot be identified anywhere within the software system is called _________________.
(A) Internal error (B) External error
(C ) Inherent error (D) Logic error
Ans:- B

43. Recorded software attributes can be used in the following endeavours:
(i) Cost and schedule estimates.
(ii) Software product reliability predictions
(iii )Managing development process
(iv). No where
Codes:
(A) (i) (ii) (iv)
(B) (ii) (iii) (iv)
(C) (i) (ii) (iii)
(D) (i) (ii) (iii) (iv)
Ans :- C

44. Black box testing is done
(A) To show that s/w is operational at its interfaces i.e. input and output.
(B) To examine internal details of code
(C) At client side
(D) None of the above
Ans:- A

45. The name of the transaction file shall be provided by the operator and the file that contains the edited transactions ready for execution shall be called
(A) Batch.exe (B) Trans.exe (C ) Opt.exe (D) Edit.exe
Ans:- C

46. The single stage network is also called
(A) One sided network (B) two sided network (C ) recirculating network
(E) pipeline network
Ans:- C. The single stage network is also called a recirculating network. 

47. Analysis of large database to retrieve information is called
(A) OLTP (B) OLAP (C ) OLDP (D) OLPP
Ans:- B
48. Which technology is sometime referred to as wireless cable?
(A) MMDS (B) ATM (C ) LMDS (D) CDMA
Ans:- A. MMDS stands for multipoint multichannel distribution system. MMDS is a broadband wireless technology. 

49. Another name of IEEE 802.11 a is ______________
(A) Wi-Max (B) Fast Ethernet (C) Wi-fi (D) 802.11 g
Ans:- C. IEEE 802.11 standards provide the basis for Wi-fi networks. 

50. The unlicensed National Information Infrastructure band operates at the ____________frequency
(A) 2.4 GHz (B) 5 GHz (C ) 33 MHz (D) 5 MHz
Ans:- B

Thursday, December 22, 2016

मानव शरीर से संबंधित and Important gk

मानव शरीर से संबंधित संख्यात्मक तथ्य

1. वस्यक व्यक्तियों में अस्थियों की संख्या : → 206
2. खोपड़ी में अस्थियां : → 28
3. कशेरुकाओ की संख्या: →33
4. पसलियों की संख्या: →24
5. गर्दन में कशेरुकाएं : →7
6. श्वसन गति : →16 बार प्रति मिनिट
7. हृदय गति : →72 बार प्रति मिनिट
8. दंत सूत्र : → 2:1:2:3
9. रक्तदाव : →120/80
10. शरीर का तापमान : → 37 डीग्री 98.4 फ़ारेनहाइट
11. लाल रक्त कणिकाओं की आयु : → 120 दिन
12. श्वेत रक्त कणिकाओ की आयु : →1 से 3 दिन
13. चेहरे की अस्थियां: → 14
14. जत्रुक की संख्या :→2
15. हथेली की अस्थियां: → 14
16 पंजे की अस्थियां: → 5
17. ह्दय की दो धड़कनों के बीच का समय : → 0.8 से.
18. एक श्वास में खीची गई वायु : →500 मि.मी.
19. सुनने की क्षमता : →20 से १२० डेसीबल
20. कुल दांत : →32
21. दूध के दांतों की संख्या : → 20
22. अक्ल दाढ निकलने की आयु : → 17 से 25 वर्ष
23. शरीर में अमीनों अम्ल की संख्या : → 22
24. शरीर में तत्वों की संखया : → 24
25. शरीर में रक्त की मात्रा : → 5 से 6 लीटर
(शरीर के भार का 7 प्रतिशत)
26. शरीर में पानी की मात्रा : → 70 प्रतिशत
27. रक्त का PH मान : → 7.4
28. ह्दय का भार : → 300 ग्राम
29. महिलाओं के ह्दय का भार → 250 ग्राम
30. रक्त संचारण में लगने वाला समय → 22 से.
31. छोटी आंत की लंबाई → 22 फीट
33. शरीर में पानी की मात्रा → 22 लीटर
34. मष्तिष्क का भार → 1380 ग्राम
35. महिलाओं के मष्तिष्क का भार → 1250 ग्राम
36. गुणसूत्रों की संख्या → 23 जोड़े
37. जीन्स की संख्या →97 अरब

कुंजी (Shortcut Keys)
बहुत अच्छी जानकारी है बस 5 मिनट लगेंगे पढ़ें जरूर !
,
Ctrl + N
नई फ़ाइल बनाने के किए
Ctrl + Shift + A
केपीटलाइज करने के लिए
Ctrl + O
फाइल खोलने के लिए
Alt + Ctrl + M
कमेंट देने के लिए
Ctrl + W
फाइल को बंद करने के लिए
Alt + F10
एप्लिकेशन को मिनीमाइज़ करने के लिए
Ctrl + S
वर्ड डॉकयुमेंट को सेव करने के लिए
Ctrl + F
फ़ाइल में किसी भी अक्षर या शब्द को ढूंढने के लिए
Alt + Ctrl + Y
कर्सर को अगले पेज पर ले जाने के लिए I.G.C.S.M BAJNA
Alt + F5
एप्लिकेशन को रिस्टोर करने के लिए
Alt + Ctrl + 1 - Apply Heading 1
( टेक्स्ट की स्टाइल हेडिंग 1 के लिए )
Alt + Ctrl + 2 - Apply Heading 2
टेक्स्ट की स्टाइल हेडिंग के लिए )
ctrl +H
टेक्स्ट को रिप्लेक्स करने के लिए
Ctrl+ G
दिये गए पेज नंबर पर पाहुचने के लिए
Alt + Ctrl + Home
डॉकयुमेंट को ब्राउज करने के लिए I.G.C.S.M BAJNA
Ctrl + Z
अन्डु करने के लिए
Ctrl + y
रिडु करने के लिए
Ctrl + Shift + L
लिस्ट में बुलेट देने के लिए
Alt + Ctrl + K
ऑटो फॉरमेट के लिए
F3 or Alt + Ctrl + V
ऑटो टेक्स्ट के लिए
Ctrl + B or Ctrl + Shift + B
बोल्ड करने के लिए
Ctrl + Shift + F5
बुकमार्क देने के लिए
Ctrl + Page Down
अगले पेज पर जाने के लिए
Ctrl + Shift + F I.G.C.S.M BAJNA
फॉन्ट को बदलने के लिए
Ctrl + Shift + P
फॉन्ट की साइज को बदलने के लिए
Ctrl + Shift + >l >
फॉन्ट की साइज को 2 प्वाइंट बड़ाने के लिए
Ctrl + Shift + l
फॉन्ट की साइज को 2 प्वाइंट घटाने के लिए
Ctrl + ]
फॉन्ट की साइज को एक-एक प्वाइंट बड़ाने के लिए
Ctrl + [
फॉन्ट की साइज को एक एक प्वाइंट घटाने के लिए I.G.C.S.M BAJNA
Ctrl + I
फॉन्ट को इटालिक करने के लिए
Ctrl + U
फॉन्ट को अंडरलाइन करने के लिए
Ctrl + Shift + D
फॉन्ट को डबल अंडरलाइन करने के लिए
Ctrl + Shift + K
फॉन्ट स्टाइल को बदलने के लिए
Ctrl + = Ctrl + =
सबस्क्रिप्ट करने के लिए
Ctrl + Shift + +Ctrl + Shift + +
सुपर स्क्रिप्ट करने के लिए
Ctrl + 1
एक लाइन स्पेस देने के लिए
Ctrl + 2 Ctrl + 2
दो लाइन स्पेस देने के लिए
Ctrl + 5
1.5 लाइन स्पेस देने के लिए
Ctrl + 0
लाइन के स्पेस को लगाने व हटाने के लिए
Ctrl + E
पेरेग्राफ को सेंटर एलाइन मेंट मे सेट करने के लिए I.G.C.S.M BAJNA
Ctrl + J
पेरेग्राफ को जस्टीफाइ करने के लिए
Ctrl + L
पेरेग्राफ को दायां एलाइन मेंट मे सेट करने के लिए
Ctrl + R
पेरेग्राफ को बायां एलाइन मेंट मे सेट करने के लिए
Ctrl + Shift + Enter
कॉलम को ब्रेक करने के लिए
Ctrl + Shift + F8
कॉलम को सलेक्ट करने के लिए
Ctrl + C
किसी भी फ़ाइल, फोल्डर व टेक्स्ट मेटर को कॉपी करने के लिए
Ctrl + Shift + C
किसी भी टेक्स्ट फारमेट को कॉपी करने के लिए
Alt + Shift + F7
डिस्कनरी को ऑपन करने के लिए
Ctrl + F5
डॉकयुमेंट को रिस्टोर करने के लिए
Ctrl + T
हेन्डिंग इन्डेंन्ट करने के लिए
F1
किसी प्रकार की मदद के लिए
Ctrl + Shift + H
छिपाने (Hidden करने) के लिए
Alt + F8
मेक्रो को ओपेन करने के लिए
Alt + Shift + K
मेल मर्ज को चेक करने के लिए
Alt + Shift + E
मेल मर्ज मे डेटा सोर्स को बदलने के लिए
Alt + Shift + M
मेल मर्ज को प्रिंट करने के लिए
Ctrl + Enter
पेज को ब्रेक करने के लिए
F2
सलेक्टेड फाइल व फोल्डर को रिनेम करने के लिए
F4
लास्ट एक्सन को रिपिट करने के लिए
F9
सलेक्टेड फिल्ड को अपडेट करने के लिए
F10
मीनू बार को एक्टिव करने के लिए
F11
अगली फिल्ड पर जाने के लिए
F12
फाइल को सेव एज करने के लिए
.
जानकारी अच्छी लगी हो तो लाइक और
शेयर अवश्य करें...! 😊