0% found this document useful (0 votes)
8 views

Database Questions

Ip db questions class 11

Uploaded by

shailkumarsen173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
8 views

Database Questions

Ip db questions class 11

Uploaded by

shailkumarsen173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
, ag 0 hat is a database system ? What is its need ? golution. A database is a collection of inter related data and a database system is basically a computer based recordkeeping system. ‘A typical file processing system suffers from ? gome major limitations like data redundancy : based system has many of the data (duplication of data), data inconsistency, duplicated as data is stored separately for sharable data, unstandardized datn, insecure each application. fata, incorrect data etc. On the other hand, a 2. A DBMS implements standardised formats detabase system overcomes alll these limita- as data is stored at a central location whereas fons and ensures continuous efficiency. The: a file based system has same data stored at © List three significant differences between a file- processing systent and a DBMS. Solution. 1. A DBMS reduces the amount of data redundancy/duplication whereas a file savantages provided by a database system are: | multiple locations in different formats uced data redundan: 3. A database management system is designed ( Red cy) i i: ign {ij Controlled data inconsistency : to coordinate multiple users accessing the same data at the same time. A file- processing system is usually designed to allow one or more programs to access different data files at the same time. {i Shared data (iv) Standardized data (@) Secured data (vi) Integrated data. Therefore, to have the systems with increased deficiency, th : = cy, the database 4 4 database is to contain information about persons systems are P? 3 and skills, Ata particular time the following persons are represented in the database, and their skills are as indicated. = can you think of disadoantages of using a database : aqsten ? What are these ? Solution. With the complex tasks to be Person Skills performed by database systems, certain things © Anuj Programming may crop up that may be termed as disadvan- : Bhawna Operating and Programming tages of using database system. These are: i Chetan Engineering and Programming 4. Security may be compromised without i David Operating and Engineering good controls. F For each person, the database contains various personal a.lntegrity may be compromised without: details, such as address. For ench skill it contains an good controls. : identification of the appropriate basic training 3, Extra hardware may be required. course, an associated job grade code, and other 4 Performance overhead may be significant. = information. The database also contains the date 5, Sysiem is likely to be complex. i each person attended each course, where applicable 288 (he assumption is that attendance at the course is essential before the skill can be said to be acquired). Sketch a relational view for this data, i Solution. Relational view i Person Prame Address Anuj = Bhawna - Chetan = David - Skill { Skitt-Name Course | Jobcode Programming = - Operating, - - Engineering = = Aaa Fecaum Pavol Puame SkiliName | __Date Anuj Programming | — Bhawna Operating - Bhawna Programming | ~ Chetan Engineering - Chetan Programming | - David Operating, - David Engineering = 5. Consider the database of previous question. Write the degree and cardinality of each of the tables. Solution. Person table. Degree 2, Cardinality 4 Skill Table. Degree 3, Cardinality 3 Perskill Table. Degree 3, Cardinality 7. What is data inconsistency ? How is it related to? data redundancy ? Solution. Data inconsistency refers to a situation where multiple copies of same data exist but they do not match either in respect of data or in respect of their format. Data! 19, redundancy occurs when the same piece of data exists in multiple places. Data redundancy can cause data inconsistency. What is Data Isolation ? Give an example, Solution. Data isolation refers to a situation ? where data of one file cannot be mapped to: other related file in the absence of links or! INFORMATICS PRACTICES _ yy mappings or common formats. For example, to prepare a consolidated report about a bank’. performance, data from all department files would be needed. But in file based systems, there is no way to link or map data in different files (no data mapping supported). What is database schema ? Solution. The logical structure and design of 2 database is called the database schema. Its the blueprint or skeleton structure of a database, ©) What is database instance ? Solution. The data stored in database at a particular moment of time (ce, the state of the database at a particular instance of time) is called instance of database. Database schema defines the variable declarations in tables that belong to a particular database; the value of these variables at a moment of time is called the instance of that database. For example, in a table namely student in a database has 100 records today, so we can say that today the database-instance has 100 records. What is metadata and data dictionary ? Solution. Metadata is data about data. A deta dictionary is a centralized repository of metadata, ‘A data dictionary contains information such as, what is in the database (tables, indexes etc.) its properties (table structures, data types, formats, constraints etc.), its users etc. . What is database engine ? Solution. A database engine is the underlying software component (a set of programs) that a DBMS uses to create, read, update and delete data from a database. The database engine has fwo major components : the storage engine and the query processor. The storage engine writes data to and retrieves data from stable media (€g., disks). The query processor accepts, parses, and executes SQL commands. Explain the property of a relation : Values stored must be atomic. Solution. This property of a relation implies that columns and rows in a relational table cannot contain groups or arrays of values 2.,@ row cannot contain multiple values for a phone_number column. Likewise, a column ina table must have exactly one value for a row: chapter 6 DATABASE CONCEPTS stain the property of a relation : A Colurnn’s ex aes must be from same dovnain Values 1 olution. This property of a relation implies that all values ina column come are of the same fund, ie, from the same domain, eg, a Monthly_Salary column contains only specific monthly salaries. It never contains other fnformation Such as comments, stalus fags, or ‘oon weekly salary Define the terms + (i) Relation, (i) Tuple, (ii) atribute, (0) degree, (o) cardinality. Solution. (9 Relation, A relation is a table of a relational 17. database, which has unordered rows and : columns and it contains non-duplicate rows and columns having atomic values. eh (i) Tuple, The rows in a relation are called tuples. called attributes. i) Attribute, ‘The columns in a relation are: (jo) Degree. It refers to the number of columns ; or attributes in a relation (table). () Cardinality. It refers to the number of rows or tuples in a relation (table). 19. © Define the terms + (i) Primary Key, (it) Candidate Key, : (ii) Alternate Key, (iv) Foreign Key, (2) Composite Key. | Solution. () Primary Key. Primary Key is a column or ; group of columns in a table that uniquely identify every row in that table. ® (i) Candidate Key. It is a set of attributes that ; uniquely identifies tuples in a table. The: Primary key should be selected from the candidate keys, (ii) Alternate key. It is a column or group of columns in a table that uniquely identifies every row in that table, All the keys from the candidate keys, which are not primary key are called an Alternate Key. ((®) Foreign Key. Foreign keys are the columns of the table which refer to the primary key of another table. A Foreign key creates a relationship between two tables. (0) Composite Key. When a primary key is made Sf two or more columns, then such a Key is called composite primary key or simply the composite key. — 289 . What is the purpose of using MySQL ? Solution. MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). In a MySQL database, information is stored in Tables, A single MySQL database can contain many tables at once and store thousands of individual records, What do you understand by MySQL server instance ? Solution. MySQL server instance is created from background processes and applications. It stays in memory and listens for client requests coming in over the network and accesses database contents according to those requests and_ provides that to the clients. What do you understand by MySQL client ? Solution. MySQL Clients are programs that connect to the MySQL server and issue queries ina pre-specified format. MySQL is compatible with the standards based SQL (Structured Query Language). The client program may contact the server programmatically or manually. ‘MySQL provides some command line programs and GUI programs. Name some of these. Solution. Command line programms : mysqldump and mysqladmin GUI programs : MySQL Administrator and MySQL QueryBrowser What is SQL ? What are different categories of comands available in SQL? ~ Solution. In order to access data within the Oracle database, all programs and users must use, Structured Query Language (SQL). SQL is the set of commands that is recognised by nearly all RDBMSs. SQL commands can be divided into following categories : 1. Data Definition Language (ODL) Commands, 2. Data Manipulation Language (DML) Commands. 3, Transaction Control Language (TCL) Commands. 4. Session Control Commands. 5. System Control Commands , Differentiate between DDL and DML commands. Solution. The Data Definition Language (DDL) commands, as the name suggests, allow yo perform tasks related to data definition. That is, through these commands, you can a uu to like, create, alter and drop schema objects, grant and revoke privileges etc. as The Data Manipulation Language (DML) commands, as the name su; f iggests, are used to mani data, That is, DML commands query and manipulate data in existing schema objects. mea | ae ar Gee

You might also like