Database Concept Class 12 Notes for Computer Science includes DBMS, RDBMS Concepts, Needs, Keys and Other RDBMS terminologies. All students looking for CBSE Computer Science Class 12 Notes can take reference of it and score highest marks.
What is database?
Collection of logically related data that has been recorded, organized and made available for searching is called Database.
Use of database in real life applications
- Online shopping
- Inventory management
- Loan and investment
- Reservation system And many more
What are the needs for a database?
- To manage large amount of data without redundancy (repetition).
- To manage large amount of data with lucidity (without complexity)
- To maintain data uniformly in different places or file
- Easy and convenient retrieval of data from any place or file
- Controlled data sharing at different user level
What is DBMS?
- DBMS stands for Database Management System.
- It is application software that can be used to create and manage database efficiently.
- it enable user or application to create, store, update, delete and retrieve data from database itself.
- It allows search and retrieve specific records from database
- It checks and ensures that only valid and accurate data is stored in database.
- Examples of DBMS are MySQL, Oracle, MongoDB, MS Access, MS SQL Server etc.
What are the advantages of DBMS?
- Reduction in Redundancy: Data in a DBMS is more concise because of the central repository of data. All the data is stored at one place. There is no repetition of the same data. This also reduces the cost of storing data on hard disks or other memory devices.
- Improved Consistency: The chances of data inconsistencies in a database are also reduced as there is a single copy of data that is accessed or updated by all the users.
- Improved Availability: Same information is made available to different users. This helps sharing of information by various users of the database.
- Improved Security: Though there is improvement in the availability of information to users, it may also be required to restrict the access to confidential information. By making use of passwords and controlling users’ database access rights, the DBA can provide security to the database.
- User Friendly: Using a DBMS, it becomes very easy to access, modify and delete data. It reduces the dependency of users on computer specialists to perform various data related operations in a DBMS because of its user friendly interface.
What is RDBMS?
Stands for Relational Database Management System. It was developed by E.F. Codd at IBM 1970. It is used to organize collection of data as a collection of relations where each relation corresponds to a table of values. Each row in the table corresponds to a unique instance of data and each column name is used to interpret the meaning of that data in each row.
What are different RDBMS Terminologies? Explain.
Relation: a table is called relation. Another way we can say that collection of tuple is called relation.
Tuple: A row of table is called tuple. In another way we can say that a single record is called tuple
Attribute: a column of table is called attribute.
Domain: the data type of values in each column is called the Domain.
Column or a combination of columns which can be used to identify one or more rows (tuples) in a table is called a key of the table. There are 3 key constraints defined below:
- A column (attribute) or a group of columns which can be used as the primary key of a relation is called a Candidate key because it is one of the candidates available to be the primary key of the relation.
- A Candidate key is an attribute (or set of attributes) that uniquely identifies a row.
- A Primary Key is one of the candidate keys.
- One of the candidate key is designated as primary key.
- Primary key uniquely identifies tuples in relation.
- Only one candidate key can become primary key.
A candidate key of a table which is not selected as the primary key is called its Alternate Key.
What is Foreign Key?
- The key which is Primary key in another related table (relation) is called Foreign Key.
- A relation can have more than foreign keys.
What is MySQL?
- MySQL is one of the most popular Relational Database Management System (RDBMS).
- MySQL was originally founded and developed in Sweden by David Axmark, Allan Larsson and Michael Widenius, who had worked together since the 1980s.
Characteristics of MySQL
- It is free and Open Source software which does not require to pay for its usage.
- It is easy to use, quick and reliable.
- It is platform independent software which works on many operating systems like
- Windows, UNIX, LINUX etc.
- It is compatible with many programming languages including JAVA, C++, PHP, PERL, etc.
- It can handle large amount of data very efficiently and accurately.
What is SQL?
SQL stands for Structured Query Language. It is developed to manage database. SQL enable us to create database, insert data, and update data as per requirement and retrieve data.
What are the Categories of SQL Commands?
All SQL commands are categorized in two types:
- Data Definition Language (DDL)
- Data Manipulation language (DML)
Data Definition Language (DDL)
- DDL is used to define structure and constraints of data
- It also defines key constraints, relationships between tables, and other data validation constraints.
- Example of DDL commands are:
- CREATE DATABASE – creates a new database
- CREATE TABLE – creates a new table
- ALTER TABLE – modifies a table
- DROP TABLE – deletes a table
Data Manipulation language (DML)
- DML is used to insert, modify and delete data in a database.
- Example of DML commands are:
- SELECT – extracts data from a table
- UPDATE – updates data in a table
- DELETE – deletes data from a table
- INSERT INTO – inserts new data into a table