Skip to main content

SQL Constraints, NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK, DEFAULT, CREATE INDEX

SQL Constraints

SQL Constraints
(Image by - Sharma Guides | Subham232330)



Constraints
  |
  |- CHECK
  |
  |- NOT NULL
  |
  |- UNIQUE
  |
  |- PRIMARY KEY
  |
  |- DEFAULT
  |
  |- FOREIGN KEY
  |
  |- INDEX


* These constraints are also known as Integrity Constraints.




* SQL Constraints:- Constraints are the rules and restrictions applied to the data in a table.

* NOT NULL:- Value cannot be Null in a column.

* UNIQUE:- Value cannot be the same in a column.

* PRIMARY KEY:- Used to uniquely identify a row.

* FOREIGN KEY:- References a row in another table.

* CHECK:- Satisfies a specific condition.

* DEFAULT:- Set default value.

* CREATE INDEX:- Used to speed up the reading process.



Comments

Popular posts from this blog

What is the monitor? How many types and what is it? Details about CRT, LCD and LED monitors.

मॉनिटर क्या है? कितने प्रकार का होता है और क्या होता है? सीआरटी, एलसीडी और एलईडी मॉनिटर के बारे में विवरण। मॉनिटर क्या है? = मॉनिटर वह पार्ट्स है जो कंप्यूटर सिस्टम के साथ टीवी जैसा दिखता है। मॉनिटर कंप्यूटर सिस्टम का एक बहुत ही महत्वपूर्ण आउटपुट डिवाइस है। इसे डिस्प्ले डिवाइस के नाम से भी जाना जाता है। कंप्यूटर पर हम जो भी कार्य करते हैं उन्हें इस मॉनिटर के माध्यम से देखा जा सकता है, इसलिए मॉनिटर को विजुअल डिस्प्ले यूनिट कहा जाता है। मॉनिटर अलग-अलग साइज में आते हैं जैसे- 14 इंच, 15 इंच, 17 इंच, 19 इंच आदि। (Image by - Google Images) मॉनिटर कितने प्रकार के होते हैं? = रंग प्रदर्शन के आधार पर मॉनिटर्स को दो श्रेणियों में विभाजित किया जा सकता है। 1) मोनोक्रोम मॉनिटर (Monochrome Monitor), 2) कलर मॉनिटर (Color Monitor) । *  वर्तमान में मोनोक्रोम मॉनिटर का उपयोग शायद ही ध्यान देने योग्य है। अब हर जगह कलर मॉनिटर का इस्तेमाल किया जाता है। 1) मोनोक्रोम मॉनिटर (Monochrome Monitor) = इस प्रकार का मॉनिटर केवल सादा-काला चित्र प्रदर्शित करता है। वर्तमान में मोनोक्रोम मॉनिटर बहुत कम उपयोग होता ...

Object Oriented and Relational Database

Object Relational and Object-Oriented Database What Is Object Relational Database? An object-relational database (ORD) is a database management system (DBMS) that’s composed of both a relational database (RDBMS) and an object-oriented database (OODBMS). An object-relational database acts as an interface between relational and object-oriented databases because it contains aspects and characteristics from both models. Object-oriented database (ORD) serves two main purposes: It connects the divide between relational databases and the object-oriented modeling techniques that are usually used in programming languages like C#, Java and C++. It bridges the gap between conceptual data modeling techniques for relational and object-oriented databases like entry-relationship diagram (ERD) and object-relational mapping (ORM). What Is Object Oriented Database? An object-oriented database is organized around objects rather than actions and data rather than logic. Therefore, an object database is a d...

MongoDB vs SQL

MongoDB vs SQL (Image by - Sharma Guides | Subham232330) MongoDB MongoDB is used to store both structured and unstructured data Data stored in JSON-like documents MongoDB does not support JOIN and global transactions MongoDB is fast and scalable Schemaless SQL SQL is used to store only structured data Data stored in table form SQL support JOIN and global transactions SQL is slow Require Schema