Tuesday 30 November 2021

Explain column constraints with example.कॉलम प्रतिबंध को उदाहरण सहित समझाइए।


 

Column Constraints

Constraints are the part of the table definition that limit the values entered into its column.


Coloum प्रतिबंध



कॉलम प्रतिबंध Table की परिभाषा का हिस्सा हैं जो Table के कॉलमों में दर्ज डाटा को सीमित करता हैं। जिससे गलत या unwanted डाटा डाले जाने की समस्या का हल हो जाता हैं

यदि हम नीचे लिखी गयी प्रोपर्टी को Table के किसी भी कॉलम पर apply कर देते है तो फिर Table मे एंट्री करते समय

(i) Not Null - Prevent a column from permitting NULL values.

कॉलम को खाली नहीं छोड़ सकते कोई न कोई value डालनी ही चाहिये|

 

(ii) UNIQUE - Ensures uniqueness of the values in a column.

जो value डाल रहे हैं अगर उस पहले भी डाल चुके है तो एंट्री नही होगी अतः कोई unique value ही होनी चाहिए

 

(iii) PRIMARY KEY - Same as UNIQUE and NotNull, but only one column per table.

यह भी unique और NotNull दोनों के गुण रखती है

 

(iv) CHECK - Controls the value of a column(s) being inserted.

कॉलम की value को टिक मार्क द्वारा नियंत्रित करता है।



(v) DEFAULT - Assign a default value for column(s) at the time of insertion when no value is given for that column.

इससे किसी कॉलम की value को ऑटो सेट कर सकते है फिर उसे बार बार डालने की जरूरत नहीं रहती एंट्री करते समय अपने आप value डल जाती है.

(vi) REFERENCES - Assigns a foreign key constraint to maintain "Referential Integrity".

दूसरी Table के किसी कॉलम का रेफेरेंस देने के लिए इसका प्रयोग किया जाता है

Examples:–

1. CREATE TABLE ITEMMAST(

ITNO NUMBER(4) PRIMARY KEY,

NAME VARCHAR2(20) NOT NULL UNIQUE,

UOM CHAR(4),

RATE NUMBER(8,2) NOT NULL

);


Differentiate between Datasheet View and Design View. डेटाशीट व्यू और डिज़ाइन व्यू के बीच अंतर करें।


In MS-Access two types of views are available to create a table as follows:

MS-Access 2007 में Table बनाने के लिए दो प्रकार के View इस प्रकार उपलब्ध हैं:

 1. Datasheet View It provides a visual way to create a table. It is a simple view which arranges the data in rows and columns and allows to edit the data but not allows to change the format of the database other than minor changes such as insert or delete columns.

डेटाशीट व्यू यह Table बनाने का एक विसुअल्( दिखाई देने वाला) तरीका प्रदान करता है। यह एक साधारण view है जो डेटा को पंक्तियों और कोलम् में व्यवस्थित करता है और डेटा को संपादित करने की अनुमति देता है लेकिन कॉलम डालने या हटाने जैसे मामूली परिवर्तनों के अलावा डेटाबेस के प्रारूप को बदलने की अनुमति नहीं देता है

2. Design View It allows you to create or change the table. You can set or change every available properties for each field and can open existing tables in Design View add remove or change fields.

डिज़ाइन व्यू यह आपको Table बनाने या बदलने की अनुमति देता है। आप प्रत्येक फ़ील्ड के लिए प्रत्येक उपलब्ध property को सेट या परिवर्तित कर सकते हैं और डिज़ाइन view में मौजूदा टेबल्स को खोल सकते हैं फ़ील्ड बदलें सकते है या ही भी सकते हैं l

Design view for queries:– This is the manual means of creating a query. The Design view method provides you both a QBE Design Grid (known, confusing as it is, as the “Design view” on the View menu and toolbar button) and a SQL View. The Design Grid is a graphical tool for creating queries. The SQL View enables you to fine tune the SQL code that underlies the query.

डिज़ाइन view for queries:- यह क्वेरी बनाने का मैन्युअल तरीका है। यह आपको QBE डिज़ाइन ग्रिड और SQL view दोनों प्रदान करती है। डिज़ाइन ग्रिड query(इक्चित data प्राप्त करने के लिए लिखा जाने वाला कोड) बनाने के लिए एक ग्राफिकल टूल है। SQL व्यू आपको क्वेरी के अंतर्गत आने वाले SQL कोड को उपलब्ध करती है जिसमे आप changes भी कर सकते हैं।

3. Database View:- The primary display in Access is the Database view. This is where you can see all the objects within your database. The Database view has an object bar allowing views of other types of objects and a toolbar (below the title bar) allowing you to take actions on the selected objects. There are seven types of Access objects grouped within the Database view: tables, queries, forms, reports, pages, macros, and modules. Tables hold data. The other objects either display or manipulate that data.

3. डेटाबेस व्यू:- एक्सेस में प्राइमरी डिस्प्ले डेटाबेस व्यू होता है। यह वह जगह है जहां आप अपने डेटाबेस के भीतर की सभी वस्तुओं(ऑब्जेक्ट) को देख सकते हैं। डेटाबेस व्यू में एक ऑब्जेक्ट बार होती है जो अन्य प्रकार की वस्तुओं को देखने की अनुमति देता है और एक टूलबार (Title बार के नीचे) आपको चयनित वस्तुओं पर कार्रवाई करने की अनुमति देता है| डेटाबेस view में सात प्रकार के एक्सेस ऑब्जेक्ट हैं: टेबल, क्वेरीज़, फॉर्म, रिपोर्ट, पेज, मैक्रोज़ और मॉड्यूल। Tables डेटा को रखती हैं। अन्य ऑब्जेक्ट या तो उस डेटा को प्रदर्शित करते हैं या उसमें बदलाब करने मे सक्षम हैं।


(5) Explain followings i) Just in Time ii) Events:-

Dec-2019(5) Explain followings

i) Just in Time

Short answer 

The JIT complier converts MSIL into native code on a demand basis as each part of the program is needed.

JIT Compiler प्रोग्राम पार्टस की डिमांड के हिसाब से एमएसआईएल कोड को मशीन कोड में परिवर्तित करता है।

 

Long answer

Just-In-Time compiler(JIT) is a part of Common Language Runtime (CLR) in .NET which is responsible for managing the execution of .NET programs regardless of any .NET programming language.

JIT Compiler CLR का ही हिस्‍सा है। जो किसी भी .NET प्रोग्रामिंग भाषा की परवाह किए बिना .NET प्रोग्राम को चलाने/Execustion के प्रबंधन के लिए जिम्मेदार है।

  

 

The JIT compiler converts the Microsoft Intermediate Language(MSIL) or Common Intermediate Language(CIL) into the machine code.


the JIT compiler compiles the MSIL or CIL as required rather than the whole of it.

JIT Compiler एमएसआईएल कोड या सीआईएल को मशीन कोड में परिवर्तित करता है। JIT संपूर्ण कोड को एक साथ परिवर्तित नहीं करता है, आवश्‍यकतानुसार परिवर्तित करता है।

ii) Events:- 


Event: An event can be thought of as an occurrence of some user-generated action applied on an object. For example, click event is triggered when an object is clicked using a mouse.

 किसी ऑब्‍जेक्‍ट पर यूजर जब कोई एक्‍शन/एक्‍टिविटी करता है तो उसे इवेन्‍ट/घटना का घटित होना कहा जाता है और उस एक्‍शन को इवेन्‍ट/घटना के नाम से जानते है। जैसे जब यूजर द्वारा माउस का बटन दबाया जाता है तो उसे माउस क्लिक एक इवेन्‍ट है तथा माउस दबने के बाद इवेन्‍ट के साथ लिखे गया कोड स्‍वत: रन हो जाता है।


Common Events are:

DoubleClick: This event is triggered whenever a user double clicks on that control.

जब भी कोई उपयोगकर्ता माउस पर डबल क्लिक करता है तो घटना शुरू हो जाती है।

MouseMove: When a user passes the mouse over a control this event is triggered.

जब कोई उपयोगकर्ता माउस को चलाता है तो यह घटना चालू हो जाती है।

GetFocus: This event is triggered when you first give focus to a control either by clicking on it or by tabbing to it.

यह घटना तब शुरू होती है जब कर्सर टैब अथवा माउस द्वारा किसी आब्‍जेक्‍ट पर जाता है।

 

LostFocus: This event is triggered when you have had focus on a control and then attempt tomove focus from that control.

यह घटना तब शुरू होती है जब कर्सर किसी आब्‍जेक्‍ट को छोडकर दूसरे ऑब्‍जेट पर जाता है।

Load: This event is only in the form control and it is initiated when the form is first loaded.

फार्म के लोड होने पर यह घटना शुरू होती है ।

Mouse Events 

Click

DblClick

MouseDown

MouseUp

MouseMove


Keyboard Events

KeyDown

KeyUp

KeyPress

Change

Focus

GotFocus

LostFocus


Learn it also important


Event-oriented language :- is a computer programming paradigm in which the flow of the program is determined by user actions (mouse clicks, key presses) or messages from other programs.Example:- Visual basic

एक प्रकार की कंप्यूटर प्रोग्रामिंग है जिसमें प्रोग्राम का प्रवाह उपयोगकर्ता क्रियाओं (माउस क्लिक, की प्रेस) या अन्य प्रोग्रामों के संदेशों द्वारा निर्धारित किया जाता है। उदाहरण:- विजुअल बेसिक

Procedural languages:-  are based upon the concept of the procedure call.

प्रक्रिया कॉल की अवधारणा पर आधारित हैं।