what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / kiran chandra sarkar
PRIMARY KEY: A table can contain only one PRIMARY KEY. It
doesn’t allow null values; it is used as Foreign Key in
another Table (like Reference Key).
UNIQUE KEY: A Table may contain one or more UNIQUE
constraints. It’s allowing only one null value. Use this
key we maintain unique vales in the table.
FOREIGN KEY: A key used in one table to represent the value
of a primary key in a related table. While primary keys
must contain unique values, foreign keys may have
duplicates. For instance, if we use student ID as the
primary key in a Students table (each student has a unique
ID), we could use student ID as a foreign key in a Courses
table: as each student may do more than one course, the
student ID field in the Courses table (often shortened to
Courses. student ID) Will hold duplicate values.
Is This Answer Correct ? | 92 Yes | 29 No |
Post New Answer View All Answers
What is aws documentdb?
What is the relationship that exists inside in E-R diagram?
How do I manually create a database?
How to do performance tunning a database in DB2 V8.2 UDB in linux
Differentiate between unique key and foreign key?
What is the concept of Virtual field?
You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
london school of science and technology has a software development unit,known as lsst solutions,which is responsible for developing and implementing software throughout the collegejames tristan keeps a record of all student details in the college including student id,name,and start date and phone number.There are many courses offered by LSST. For example MBA, MSc, BSc, BABS, DF, English etc. Each course id identified by course id, description, duration. Each course has many semesters. Each semester takes place during a particular term. Semester details and term details are required to be stored in the database. Each course has many subjects and same subject may be offered in many courses. For each subject many details such as Subject code, name, result and attendance are required to be stored. Every subject has mainly two assessments; one assignment and one exam. Assignment is worth of 30% and exam 70% respectively. You have been appointed as a database designer. Your job is to provide ERD with all possible entities and relationships. Note: Feel free to make necessary assumptions 3: Assignment Tasks. 1. Create an ERD for the above problem 2. Translate the ERD to Relational Data model (RDM) 3. Implement the RDM by creating the tables 4. Populate the database with your own data. 5. SQL Queries for the following tasks a. List all student details in each course along with course details b. Count and display number of students in each course. c. List student name, course name, assessment description, marks for all students.
what is tkprof tool and how it is used???
Please post the scenerois for writing the complex sql queries , for my practice.Can be any query if you cannot solve.
what is the full procedure for using store procedure in informatica7.1?
query to Compare data of two tables between two different Databases(Oracle and SQL Server) Eg., Source Database: Oracle Table: Employee Target Database : SQL Server Table : emp
What is dialect in database?
On startup, the transaction log of a database has filled and recovery has suspended, what can I do?
Explain the various types of normalization.