
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4381 Articles for MySQL

5K+ Views
The contents of a distributed database are spread across multiple locations. That means the contents may be stored in different systems that are located in the same place or geographically far away. However, the database still appears uniform to the users i.e the fact that the database is stored at multiple locations is transparent to the users.The different components of a distributed database are −Let us now discuss them one by one −UsersThere are many users who use the distributed database. For them, the fact that the database is spread across multiple locations is transparent and they perceive the database ... Read More

20K+ Views
The distributed database management system contains the data in multiple locations. That can be in different systems in the same place or across different geographical locations.As shown in the below example −The database is divided into multiple locations and stores the data in Site1, Site2, Site3 and Site4.The advantages and disadvantages of Distributed database management systems are as follows −Advantages of DDBMSThe database is easier to expand as it is already spread across multiple systems and it is not too complicated to add a system.The distributed database can have the data arranged according to different levels of transparency i.e data ... Read More

6K+ Views
When there is a relationship between two entities of the same type, it is known as a recursive relationship. This means that the relationship is between different instances of the same entity type.Some examples of recursive relationship can be shown as follows −An employee can supervise multiple employees. Hence, this is a recursive relationship of entity employee with itself. This is a 1 to many recursive relationship as one employee supervises many employees.A person can have many children who are also persons. Hence, this is a recursive relationship of entity person with itself. This is a 1 to many recursive ... Read More

6K+ Views
In 6NF, the relation variable is decomposed into irreducible components. A relation is in 6NF, only if, It is in 5NF, and every join dependency on the relation is trivialLet us see an example −Enrollment_NoNameMarksThe possible join dependencies for the above would be −{Enrollment_No, Marks}{Enrollment_No, Name}In Sixth Normal Form (6NF), it would be decomposed to −Enrollment_NoNameEnrollment_No MarksLet us see another example −Student_IDStudent_FirstNameStudent_LastNameMarksS01TomAlter90S02JacobWatson80S03HarrySmith85Let us decompose the table −Student_IDStudent_FirstNameS01TomS02JacobS03HarryStudent_IDStudent_LastNameS01AlterS02WatsonS03SmithStudent_IDMarksS0190S0280 S03 85Now the above tables are in 6NF, but as you can guess on your know that ... Read More

867 Views
Many users consider Primary Key as Unique Key, since both uniquely identify a table, but Unique Key is different from Primary Key. Unique Key accepts null values and Primary Key cannot have null.Let us compare Primary Key and Unique Key and understand its concept −UsageA Unique Key is used to prevent duplicate values in a column. Primary Key provided uniqueness to a table.NULL ValuesA primary key cannot accept NULL values; this makes Primary Key different from Unique Key, since Unique Key allows one value as NULL value.VolumeA table can only have a single Primary Key, whereas a Unique Key can ... Read More

11K+ Views
RDMS Terminologies include Database, Table, Columns, etc. Let us see them one by one −DatabaseDatabase is a collection of tables like , , etc.TableA table is a collection of rows and columns , for example, StudentIdStudentNameStudentRank052Tom1035David2077John3ColumnColumn is in a table −RowRow is also called a tuple in RDBMS. A relation in a database has rows and columns.Primary KeyEvery table has one Primary key and cannot have null values.For example, ProjectID is a primary key in Project Table, since it uniquely identifies the project:ProjectIDProjectNameP01Cluster Grouping SystemP02Hospital Management SystemForeign KeyIf you want to link two tables, use Foreign Key.For example, Employee table has DEPT_ID ... Read More

3K+ Views
A Foreign Key creates a link between tables. It references the primary key in another table and links it.For example, the DeptID in the Employee table is a foreign key −EmpIDEmpNameEmpAgeDeptIDDeptIDDeptNameDeptZoneThe DeptID in the Department table is a Primary Key in the Department Table.The DeptID in the Employee table is a Foreign Key in the Employee Table.The below figure represents the same −Above, you can see our two tables. The Foreign Key of the Employee table is the Primary Key of the Department table.

5K+ Views
Alternate Key or Secondary Key is the key that has not been selected to be the primary key, but are candidate keys. However, it is considered a candidate key for the primary key.A candidate key not selected as a primary key is called alternate or secondary key. Candidate key is an attribute or set of attributes that you can consider as a Primary key.Let us see an example −Student_IDStudent_EnrollStudent_NameStudent_Email0962717Manishaaa@gmail.com0552655Mananabc@gmail.com0672699Shreyaspqr@gmail.comAbove, Student_ID, Student_Enroll and Student_Email are the candidate keys. They are considered candidate keys since they can uniquely identify the student record. Select any one of the candidate key as the primary. Rest ... Read More

2K+ Views
Each table has only a single primary key. Each relation may have one or more candidate key. One of these candidate key is called Primary Key. Each candidate key qualifies for Primary Key. Therefore candidates for Primary Key is called Candidate Key.Candidate key can be a single column or combination of more than one column. A minimal super key is called a candidate key.ExampleEmployeeID and EmployeeEmail, both can be a Primary key; therefore both are candidate keys. Select any of the as Primary Key for your table, since a table can have only a single Primary Key.Let us see another example ... Read More

1K+ Views
A Surrogate Key’s only purpose is to be a unique identifier in a database, for example, incremental key, GUID, etc. It hasSurrogate Key has no actual meaning and is used to represent existence. It has an existence only for data analysis.ExampleKeyProductIDPrice505_921987200698_561256170304_571898250458_661666110Above, the surrogate key is Key in the table.Other ExamplesSome other examples of a Surrogate Key −Counter can also be shown as Surrogate Key.System date/time stampRandom alphanumeric string.