Database Management System (DBMS)
Important Terms Related To DBMS:
Let we understand the concept of database management system by some points that given below.
1. Database is a collection of related data.
For example collection of student information.
2. DBMS is a software which is used to manage database and access the database in efficient way.
3. Flat files [operating system files] are failed to manage database if database size is too large.
such as KB MB → GB → TB
Limitation of flat file system:
a. Difficult to access, required data from huge database.
b. More I/O cost to access the required data from database.I/O cost means how many blocks required to transfer from secondary memory to main memory in order to access required data.
Here indexing is used fro solving I/O problem.
c. Flat files have less degree of concurrency. Degree of concurrency mans number of users using database simultaneously.
4. Concurrent Execution: It is a simultaneous access of database by two or more user.
5. Concurrency Control: It is used to avoid inconsistency error because of simultaneous users using database.
6. Operating system Concurrency control perform over file level. Here less Concurrency control over file level (using flat file)
7. DBMS Concurrency control perform over record level.
More degree of concurrency because control over record level using DBMS file system.
8. Integrity constraints in relational database management system (RDBMS):It is a conditions to maintain correctness.
9. Relational DBMS: In relational DBMS data should be in tabular form. like
10. Arity means number of columns of database table.
11. Cardinality means number of records of database table.
12. Relational schema means structure of database table.
13. Relational Instance is a set of records of database table or snapshot.
14. RDBMS Rules
a. No two record of database table should be same.
b. Candidate key : It is minimal set of attributes used to differentiate records uniquely.
Example: stud(sid , sname , age)
# here sid is candidate key
# sid,sname is not a candidate key because not a minimal set of attributes.
Example:
here Sid , Cid is a candidate key and it is called as compound candidate key.
c. Compound candidate key is a key having at least two key attributes.
d. Simple candidate key is a key having only one key attribute.
Example : Emp (Eid , Ename , PPno , Panid , Bank , Acct)
here Assume no two records with same bank and Acct
{Eid , PPno , Panid , Bank , Acct} is candidate key
15. Primary Key: One of the candidate key whose field values always Not NULL.
Null : unknown / unexcited value
Primary key field not allows NULL.
At most one primary key for any relation. Example Eid is a primary key of relation.
16. Alternate Key: All candidate key of relation except primary key.
Example : {PPno , Panid , Bank , Acct} , here Panid is alternate key.
17. Table Creation:
CREATE TABLE EMP (Eid varchar(10) primary key,Ename varchar(30) Not Null,PPno varchar(15) unique, Panid varchar(10) unique,Unique (bank,Acct);
18. Super Key: It is a set of attributes used to differentiate records of relation uniquely.
Example: stud ( Sid , Sname , age)
Minimal Super key Sid is a candidate key.
Minimal Super key is the candidate key.
Super key ≡ Candidate key + 0 or more attributes.
19. Schema :
The over all structure of a database management system is called database schema.
There are three type of schemas:
1. Physical Level Schema: In physical level schema designs are prepared to deal with storage structure.Here data are physical stored in the disk in file form.
2. Logical Level Schema:Design prepared at logical level behavior a medium between user level schema & physical level schema.
3. User level Schema:At user level design are prepared to interact with user. Such as any interface from which user can interact.
20. Data In-dependency:
If we make changes at lower level of data base schema and upper level remain interact such type of in-dependency is called Data in-dependency.
There are two level of data in-dependency.
1. Physical data in-dependency:If we make changes in the physical level of schema and the logical level and view level are remain intact than such type of data in-dependency is called physical data in-dependency.
2. Logical data in-dependency: If we make changes in the logical level of schema and view level remain intact than such type of in-dependency is called logical data in-dependency.
21. Codd's 12 Rules in DBMS:
1. Information Rules: Information rules states that information stored in table should be represented by its table name and column name.
Example : for salary 4000.0 is valid but for Result 4000.0 is invalid.
2. Granted Excess Rule: Each and every piece of information should accessible using its column name, primary key and table name.
Note: Primary Key: It is an attribute use to distinguish two entities of a given set.
OR
We can say that primary key is a attribute which is used to uniquely identify a given entity in a entity set.
**Primary key is always Not Null and Unique.
3. Systematic treatment of NULL rule: As Null are define specifically in DBMS. So they should need systematic treatment otherwise they could generate inconsistency.
4. Active online catalog based on relational model:
To satisfy online request (Queries) of user database should maintain additional structure other than database like indexes, hash(#) structure etc.
5. Comprehensive data sub language rule: Database may support more than one programming languages. But at least one of them should perform all possible operations.
6. High level insert and delete rule: Insertion and Deletion should possible at all level , at cell level , at column level or row level.
7. View Updating rule: If view are updatable than changes made at views should reflect base table.
8. Physical data independence: If we make changes at physical level and logical and view level remain intact such type of data in-dependency is called physical data dependency.
9. Logical data independence: If we make changes at our logical level and view level remain intact than such type of data in-dependency is called logical data in-dependency.
10. Integrity independence: If we change integrity rule and database schema remain intact than such type of in-dependency is called integrity independence.
11. Distribution Independence: If we physically distribute data on various physical location and database schema remain intact than such type of independence is called data independence.
12. Non subversion rule: Comprehensive(detail) data sub language could perform all the possible operation on database. But without by passing (violate integrity rule).
No comments:
Post a Comment