If you have any question that is asked in a interview, please post it here.
What is Constraint ?
Define rules for the data that must follow.
Example : For each employee must be associated with a department
What is Primary key ?
Primary key is used to uniquely identify each row in the table, can be defined over one or more column, it can't contain NULL value.
What is Foreign key ?
Foreign key is used to enforce data integrity between tables and parent child relationship.
What is Check constraint ?
Check constraint play some validation around the values in the column on your table, check that value is within a given range.
Example -
1. [column name] BETWEEN 100 AND 200
2. Compare two values in different columns within table only, like (column1> column2)
Why we need constraint ?
By using Constraint we make our data clean , also required for business functions,faster feedback on invalid data,reduce crashes due to invalid data.
What is INDEX ?
It is designed to speed up the retrieval of rows from table. E.g. common type of index in oracle is B-tree, balanced tree index etc.
More added soon...
If you have any questions, post here. Also, provide your valuable suggestions and thoughts in form of comments in the section below.
Thank you !!!
No comments:
Post a Comment