Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
Alternate Key in RDBMS
An Alternate Key (also called Secondary Key) is a candidate key that was not selected as the primary key. Every table may have multiple candidate keys that can uniquely identify each row, but only one is chosen as the primary key. The remaining candidate keys become alternate keys. Example 1: Student Table Consider the following Student table ? Student_ID Student_Enroll Student_Name Student_Email 096 2717 Manish aaa@gmail.com 055 2655 Manan abc@gmail.com 067 2699 Shreyas pqr@gmail.com Student_ID, Student_Enroll, and Student_Email are the candidate keys since each can uniquely ...
Read MoreCandidate Key in RDBMS
A Candidate Key is a minimal set of attributes that can uniquely identify each row in a table. Each table may have one or more candidate keys, and one of them is chosen as the Primary Key. A candidate key is essentially a minimal super key − no attribute can be removed from it without losing uniqueness. Example 1: Employee Table In an Employee table, both EmployeeID and EmployeeEmail can uniquely identify each employee. Therefore both are candidate keys. You select any one of them as the primary key, since a table can have only a single primary ...
Read MoreSurrogate Key in RDBMS
A Surrogate Key is a system-generated unique identifier in a database that has no actual business meaning. Its only purpose is to uniquely identify each row in a table. Common examples include auto-increment integers, GUIDs, and system-generated codes. Surrogate Key vs Natural Key Unlike a natural key (like Student_ID or Email) which has real-world meaning, a surrogate key is purely artificial − it exists only to serve as a unique identifier for data management and analysis purposes. Example In the following ProductPrice table, the Key column is a surrogate key − it has no business meaning ...
Read MoreSuper Key in RDBMS
A Super Key is an attribute (or a set of attributes) that uniquely identifies a tuple (row) in a table. Any combination of columns that can uniquely identify each row is a super key. It is a superset of Candidate Key, since candidate keys are the minimal super keys with no redundant attributes. Example Consider the following Student table ? Student_ID Student_Enroll Student_Name Student_Email S02 4545 Dave ddd@gmail.com S34 4541 Jack jjj@gmail.com S22 4555 Mark mmm@gmail.com Super Keys The following are some of the super ...
Read MoreEntity Integrity Rule in RDBMS
The Entity Integrity Rule in RDBMS states that every table must have a primary key, and the primary key column(s) cannot contain NULL values. This ensures that every row in a table is uniquely identifiable. Example 1: Student Table Consider the following Student table ? Student_ID (PK) Student_Name Student_Awards S001 Alice Gold Medal S002 Bob NULL S003 Charlie Silver Medal Here Student_ID is the primary key. We cannot use Student_Awards as the primary key since not every student would have received an award (it can be ...
Read MoreComposite Key in RDBMS
A composite key is a primary key that consists of two or more columns combined to uniquely identify each row in a table. A single column alone may not be unique, but the combination of multiple columns together forms a unique identifier. Example 1: Order Details In an order details table, a single OrderID can appear in multiple rows (for different products), and a single ProductID can appear in multiple orders. However, the combination of OrderID + ProductID is unique for each row ? OrderDetails ...
Read MoreReferential Integrity Rule in RDBMS
The Referential Integrity Rule in RDBMS is based on the relationship between Primary Keys and Foreign Keys. The rule states that a foreign key in one table must have a matching valid primary key in the referenced table, ensuring that references between tables are always valid. Referential Integrity Rule Referential integrity ensures that relationships between tables remain consistent. Specifically − A foreign key value must either match an existing primary key value in the referenced table, or be NULL. You cannot insert a foreign key value that does not exist in the referenced table. You cannot ...
Read MoreFuture of RDBMS
While Big Data and NoSQL databases have become popular choices for modern data solutions, the crucial features of RDBMS ensure it remains relevant and widely used. RDBMS is designed to handle structured data with ACID compliance, making it indispensable for applications requiring data integrity and consistency. Why RDBMS Still Matters The RDBMS market continues to grow with approximately 9% annual growth, as reported by Gartner. Although a massive volume of the world's data has been produced in recent years, most business-critical data remains structured − financial records, customer information, inventory, and transactions − all of which are best ...
Read MoreDifference between an SAP ERP system and DBMS
A DBMS (Database Management System) and an SAP ERP (Enterprise Resource Planning) system serve different purposes. A DBMS manages data storage and retrieval, while an ERP is a complete business application suite that uses a DBMS as one of its components. What is DBMS? A DBMS is a tool or interface used to create, manage, and query databases. Examples include SQL Server, MySQL, Oracle, and PostgreSQL. A DBMS handles data storage, retrieval, indexing, security, and backup. It is mainly designed for and used by technical people like database administrators and developers. What is ERP? ERP (Enterprise ...
Read MoreHow do you convert an ArrayList to an array in Java?
An ArrayList provides two toArray() methods to convert it into an array − one returns an Object[] array, and the other returns a typed array. Method 1: toArray() (Returns Object[]) Object[] toArray() Returns an array containing all elements in proper sequence. The returned array type is Object[], so casting is needed to use specific types. Method 2: toArray(T[]) (Returns Typed Array) T[] toArray(T[] a) Returns a typed array containing all elements. Pass an empty array of the desired type and Java allocates the correct size. This is the preferred ...
Read More