Loading...
Please wait while we prepare your content
Please wait while we prepare your content
Solutions for Computer Science, Class 12, CBSE
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
A database may be defined as a collection of interrelated data stored together (centrally) to serve multiple applications. A DBMS (Data Base Management System) refers to a software that is responsible for storing, maintaining and utilizing databases. A database along with a DBMS is referred to as a database system.
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
Data redundancy refers to the duplication of data in a database. This may lead to data inconsistency. When redundant data or the multiple copies of data mismatch, it makes the data inconsistent.
(c)
Assertion is true but Reason is false.
Explanation
Data redundancy may lead to many problems. It refers to the duplication of data in a database, which can result in data inconsistencies, increased storage requirements, and difficulties in maintaining data integrity. In RDBMS, data redundancy is minimized but not completely eliminated.
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
A primary key is used to uniquely identify the rows in a data table. It is a set of one or more attributes that can uniquely identify tuples (rows) within the relation.
(c)
Assertion is true but Reason is false.
Explanation
A data table can have only one primary key. There can be more than one attribute in a relation possessing the unique identification property. They are known as candidate keys.
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
There can be more than one attribute in a relation possessing the unique identification property. All attribute combinations inside a relation that can serve as a primary key are candidate keys, as they are candidates for the primary key position.
(d)
Assertion is false but Reason is true.
Explanation
Not all types of keys necessarily contain unique values for each row. While primary keys ensure uniqueness for each row in a table, other types of keys, such as foreign keys and candidate keys, may not guarantee uniqueness. A non-key attribute, whose values are derived from the primary key of some other table, is known as foreign key in its current table.
Assertion. The foreign-keys of tables are used to establish relationships with other tables and must be handled carefully.
Reason. Referential integrity is a system of rules that a DBMS uses to ensure that the relationships between tables remain valid and no accidental change or deletion occurs in the related data.
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
The foreign keys of tables are utilized to establish relationships with other tables, while referential integrity is a system of rules that a DBMS employs to ensure the validity of relationships between records in related tables. This system prevents users from accidentally deleting or changing related data. Therefore, it is crucial to handle foreign keys carefully.
(c)
Assertion is true but Reason is false.
Explanation
A primary key is a set of one or more attributes (columns) that can uniquely identify tuples within the relation. When a primary key is made up of two or more attributes, it is called as composite primary key. Hence, the reason is false.
Relation file | Traditional file |
---|---|
Data organized in tables with rows and columns. | Data stored in unstructured formats. |
Supports structured querying with SQL. | Lacks standardized querying abilities. |
Allows for defining relationships between tables. | No inherent support for relationships. |
Offers flexibility in data storage and retrieval. | Limited flexibility in data organisation. |
Examples : MySQL, PostgreSQL | Examples : Text files, CSV files, Excel spreadsheets |
Duplication of data is known as data redundancy. Data redundancy in a database leads to wasted storage and multiple copies of the same data. When these copies do not match with one another, it leads to data inconsistency. Additionally, data redundancy can result in performance degradation, security risks, and increased complexity.
MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL provides us with a rich set of features that support a secure environment for storing, maintaining and accessing data.
The functions and features of MySQL are as follows :
A database server is the key to solving the problems of database management system (information system). In general, a server must reliably manage a large amount of data in a multi-user environment so that many users can concurrently access the same data. A database server must also prevent unauthorized access and provide efficient solutions for failure recovery.
The key features of MySQL are as follows :
All programs and users accessing data within the MySQL database must utilize Structured Query Language (SQL). MySQL is compatible with standard-based SQL, enabling it to understand and process SQL commands efficiently. Additionally, the MySQL server incorporates built-in support for executing SQL statements, allowing users to perform tasks such as checking, optimizing, and repairing tables.
An ideal DDL should perform the following functions :
Data Definition Language (DDL) | Data Manipulation Language (DML) |
---|---|
DDL provides a set of definitions to specify the storage structure and access methods used by the database system. | DML is a language that enables users to access or manipulate data as organized by the appropriate data model. |
DDL commands are used to perform tasks such as creating, altering, and dropping schema objects. They are also used to grant and revoke privileges and roles, as well as for maintenance commands related to tables. | DML commands are used to retrieve, insert, delete, modify data stored in the database. |
Examples of DDL commands are CREATE, ALTER, DROP, GRANT, ANALYZE etc. | Examples of DML commands are INSERT, UPDATE, DELETE, SELECT etc. |
TCL part of SQL includes commands for specifying the beginning and ending of transactions along with commands to have control over transaction processing. Some examples of TCL commands are COMMIT, ROLLBACK, SET TRANSACTION and SAVEPOINT. These commands manage changes made by DML commands.
A view is a (virtual) table that does not really exist in its own right but is instead derived from one or more underlying base tables. Views are useful to view desired information that is actually stored in a base table and they extend the control we have over our data. They are an excellent way to give people access to some but not all of the information in a table.
The importance of a Primary Key in a table lies in its ability to uniquely identify tuples (or rows) within the table.
Salesman Number | First Name | Surname |
---|---|---|
NO-32 | Sandeep | Sethi |
SO-09 | Subhash | Kumar |
SO-11 | Anand | Swami |
In this table, the "Salesman Number" column can be designated as the primary key. Each "Salesman Number" value uniquely identifies a salesperson in the table, and no two salespersons can have the same number. Additionally, the "Salesman Number" column would not accept null values, ensuring that every salesperson has a valid identifier.
A primary key is a set of one or more attributes that can uniquely identify tuples within the relation. The primary key is non-redundant, meaning it does not have duplicate values in the same relation, and non-null attribute, meaning a null value cannot be inserted into it.
The number of attributes in a relation is called Degree of a relation. A relation having 3 attributes is said to be a relation of degree 3. Similarly, a relation having n attributes is said to be a relation of degree n.
All attribute combinations inside a relation that can serve as primary key are candidate keys as they are candidates for the primary key position.
The number of rows in a relation is known as cardinality of the relation.
Tables
Reason — A relational database consists of a collection of tables, which are used to organize and store data. Each table consists of rows and columns, where rows represent individual records or tuples, and columns represent attributes or fields.
Relations
Reason — A relational database consists of a collection of tables, which are used to organize and store data. These tables are called relations. Each table consists of rows and columns, where rows represent individual records or tuples, and columns represent attributes or fields.
Key
Reason — Within the given relation, a set of one or more attributes having values that are unique within the relation and thus are able to uniquely identify that tuple, is said to be key of the relation.
Street
Reason — Attributes "Id," "License number," and "Dept_id" are unique identifiers and can be suitable choices for a primary key. However, "Street" might not be unique for each tuple, as multiple tuples could have the same street value, making it unsuitable for a primary key.
Primary
Reason — A non-key attribute, whose values are derived from the primary key of some other table, is known as foreign key in its current table.
ID
Reason — The "ID" attribute serves as a unique identifier for each student, making it suitable for use as a primary key.
False
Reason — A common attribute between two tables is not necessarily called a foreign key. Instead, a non-key attribute, whose values are derived from the primary key of some other table, is known as foreign key in its current table. A foreign key is used to represent the relationship between two tables.
True
Reason — DDL (Data Definition Language) commands are used to create and define tables and other database objects in SQL (Structured Query Language). DDL commands such as CREATE, ALTER, and DROP, are used to create, define, change and delete objects like tables, indexes, views, and constraints.
True
Reason — A Data Manipulation Language (DML) is a language that enables users to access or manipulate data as organized by the appropriate data model. Hence, part of SQL which accesses and manipulates data in tables, is called DML. These commands include SELECT, LOCK TABLE, UPDATE, INSERT INTO, DELETE.