Chapter

Database Management

Q1. Define data, data base and information

Data:-

Data are the raw materials for information which are processed to get desired result. Data can be text, audio, video, images or any combination of these. Data describes the attributes of any real world object, which explains the feature behavior of that object. There are many ways to collect data including surveys, interviews, questionnaire, reading documents etc. In its raw form, data may or may not be useful to the decision maker. Quite frequently data must be processed to become useful

Database:-

A collection of data stored in a standardized format designed to be processed, shared by different users is called database

It is also defined as a collection of inter-related relevant data stored together to serve multiple applications .A data may have single table or multiple table .The data in a database are organized in rows and columns

-  Rows are called records

-  -Columns are called field or attributes

Information:-

Information is the output of data processing operation. When we process data and convert it into a form that is useful to the decision-maker, it becomes information

Human beings apply facts, principles, knowledge, experience and intuition to convert data into information .Information is time dependent since its values and usefulness often decrease with time

Q2. Defines database management system? What are the objectives of database management system (DBMS?)

It is software that defines a database, stores the data supports a query language, produce reports and creates data entry form. It provides the data to the users which they ask for

In other words DBMS is an application programs that provides an interface between the operating system and the user in order to make access to the data as simple as possible

Objectives of DBMS

a.  To provide huge storage or space for relevant data

b.  To allow easy access to the data for the user.

c.  To provide quick response to user request for any information or data.

d.  To allow updating with the latest modification in the database.

e.  To remove duplicate data.

f.  To allow multiple users to be active at one time.

g.  To allow the growth of database system.

h.  To provide maximum protection to data from any physical damage and unauthorized access

Q3. Define the term field or record with example in term of database management system (HSEB 2058)

Field: - A field is piece of information of an individual or an object such as person, client, employee, book etc. this is the unit title of data record. Each unique type of information is stored in its own field

For example: - In student_record Rollno, name, class address are called field

Record: - A record is complete information of an individual or an object such as person, client, employee, book etc. A record can have much information under separate headings called fields

For example: - In student _record all the information or complete information of one student is called one record

Q4.Write short notes on:-

Table: - A complete collection of records is called table. A table contains rows and columns. Each column of a table is called field and each row is called record

For example: - Table: Student_record

Rollno / Name / Class / Address / Telephone / Gender
1 / Ram / XI / Baneshwor / 9856454416 / Male
2 / Sita / XI / Maitidevi / 014478493 / Female
3 / Suman / XI / Banasthali / 014356789 / Male
4 / Sunita / XI / Sanepa / 9851045678 / female

In the above table Rollno, names are the field

And 1, ram, XI, baneshwor, 9856454416, male are completely called record

Q5. What is key? Define primary key and foreign key

Ans:-A key is field or column in a table that is used to uniquely identify records

In other words a key is an attribute whose values uniquely identify each entity instance

For example: - An entity student can be uniquely identified by a roll no

An entity person can be uniquely identified by citizenship number

Primary key:-

Primary key is a field or column that uniquely identify records in a table

In other words primary key is that candidate key which will most commonly be used uniquely to identify a single entity instance

For example: - In student record Roll no is the primary key

Alternate Key: An alternate key is any candidate key that is not the part of primary key. Alternate keys are sometimes referred as secondary keys

From Oracle FAJump to: navigation, search

Candidate Key: A candidate key is a key that uniquely identifies record in a table. Any of the identified candidate keys can be used as the table's primary key.

Foreign key: - A field or column in one table that refers to the primary key field in another table is called foreign key In other words foreign key is a primary key of one entity that is contributed to another entity to identify instances of a relationship

Define the following term:-

·  Domain: - Domain is a range of values from which the actual values appearing in a given column are drawn. A domain describes the set of possible values for a given attribute and can be considered a constraint on the value of the attribute.

·  Schema: - A database schema is a logical description of each piece of data and its relationship with other data elements.

·  Entity: - An entity is a class of a person place or an object

·  Attributes: - The characteristics of an entity is called attributes

·  Example: - roll, name address total etc

·  Tuple: A row in a relation (table) is called tuple.

·  Relationship: - A relationship is an association among several entities and represents meaningful dependencies between them

·  Query:-

§  Query is to ask question about the data present in table. Using query facility, we can view records or data, modify the content of table, provide data sources to form and reports and lot more.

Q6. What are the different types of relationship?

Ans: The association among two or more than two entities is called relationship.

There are all together three types of relationship they are fallows:-

a)  One to one relationship:- A single instance of an entity is associated with a single instance of another entity is known as one to one relationship . For example:- one teacher teaching one subject

b)  One to many relationships:-An instance of an entity is associated with several instances of another entity is known as one to many relationships. For example:- teacher and students

c)  Many to many relationship :- Many instances of an entity are associated to many instances of another entity is known as many to many relationship For example:- student and class ( A class may contain many students and a student study in many classes)

Q7. Explain the term data dictionary in relation to database?

Ans: - Data dictionary is a sub- system of DBMS to keep track of the definition of all the data items in the databases and helps the developers and users in finding the necessary data. In other data dictionary is a master table which contains data about all the databases in a database system. It is a valuable source of information for end users and developers to find out what data is available, what the data means and where and how to get it. The data stored in the data dictionary are also called metadata or data about data. An example is MSACCESS holds data dictionary as a set of system table called MSSYS object. Data dictionary contains information such as:-

  1. What table and column are included in the present structure
  2. Name of current table and column
  3. The characteristics of each item of data, such as its length and data type
  4. Any restriction on the values of certain columns.
  5. The relationships between items of data
  6. Which program access which item of data

Q8. What is RDBMS? What is Normalization? Why Normalization is important is RDBMS?

Ans:- It is the DBMS in which relation between different tables can be formed using a common field (which we called a key) Relational database implements data in a series of two dimensional tables (tables having rows and column, rows means record and column means field). RDBMS allows us to enter, store manipulate and retrieve information organized into database table and sometime which we called relation. IT also provides the interface between the user and the data in the database.

Normalization is the process of presenting the database tables without any duplication of information and simplification of tables without loss of information. It can also be said that normalization is the process of organizing data in a database to reduce the redundancies. The process of normalization include both creating tables and establishing relationship between those tables using rules designed to protect the data and to make the database more flexible.

Normalization is important in RDBMS because

1)  It reduces the size of the database by breaking the table into two or more tables to reduce the redundancy in the database

2)  It simplifies and organize the table

3)  It reduce the loss of information

4)  It eliminates the repeating and conflicting data related to the same entity

5)  It improves the performance of the system

6)  It helps RDBMS to provides immediate response to user request of data

Q9. What are the advantage and disadvantage of the Database management system?

Advantage of DBMS

2)  It provides file sharing facilities

3)  It reduced data redundancies and inconsistencies

4)  It provides better service to the user

5)  It improved the flexibility of the system

6)  It provide and increased data Security

7)  It improved data Integrity

8)  It saved a great deal of programming time

9)  It helps to prepare the report for particular requirement

10) It provides the facilities of obtaining information from the database

Disadvantage of DBMS

1)  There is always a threat to confidentiality, privacy and security

2)  It is very complex to understand and implement

3)  It is always a costly matter to keep and maintain DBMS

4)  In this system there are too many rules to follow up and remember

5)  It is a fast changing technology and it is difficult to follow the changing technology

6)  It is difficult to maintain the quality of data

7)  We need to maintain data integrity- as we have to always update our data immediately which is very time consuming work

8)  Lack of trained Manpower

Q10. Write Short notes on:

SQL:-SQL is a popular query language which is used in querying, updating and managing relational databases. In other word SQL is a data access language designed for managing data in relational
database management systems (RDBMS).

SQL is a language designed to store data, but the data stored in an SQL database is not static. It can be modified at any time with the use of several very simple commands. The SQL syntax is pretty much self explanatory, which makes it much easier to read and understand. It was developed by IBM in 1970 AD. It was first standardized in 1986.There are about in SQL.

There are two type of SQL language (structured query language) they are:-

a)  DDL language ( Data definition language)

b)  DML language( Data manipulation language )

In DDL language there are all together three commands they are:-

a)  Create command ( creating table )

b)  Alter command

-  Add ( adding column or field in table )

-  Modify ( modifying the parameter of column)

-  Drop ( dropping column from the table )

c)  Drop command (dropping entire table form the database

In DML language there are all together four commands they are:-

a)  Insert command ( This command is used for entering the data into the table)

b)  Select command( This command is used for select required record for the table )

c)  Update record ( This command is used for calculating and modifying the records in the table )

d)  Delete command ( This command is used for deleting the record form the table )

Data definition language (DDL):-It is the language which defines all attributes and properties of a database, especially record layouts, field definitions, key fields, file locations and storage capacity. Using this language the logical structure and the file within the database may be defined. After compiling DDL statements we get a set of table which is stored in data dictionary. Examples of DDL commands are CREATE, ALTER and DROP.

Data manipulation language (DML):-It is the language which mainly does processing and manipulating the data in the database. Actually the DML provides a comprehensive set of command to allow modification of the data within a database. DML are often capable of performing mathematical and statistical calculation that facilitates generating reports. Example of DML commands are INSERT, SELECT, UPDATE and DELETE.

Q11. What is data security? How it can be implemented?

Ans:- Data security refers to the DBMS which can prevent unauthorized users from viewing or updating the database. The protection of data from unauthorized access, malicious destruction or by any kind of accidents is called data security. DBMS provides data security to prevent the data from the losses or misuse.