0% found this document useful (0 votes)
29 views11 pages

Understanding Database Management Systems

Uploaded by

mrneon109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views11 pages

Understanding Database Management Systems

Uploaded by

mrneon109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

8 DBMS ( DATA BASE MANAGEMENT SYSTEM)

(.odb) ( 12-Marks)
What is a database?
Ans. A database is an organized collection of data.
What does DBMS stands for?
Ans : Database Management System
2. What does RDBMS stands for?
Ans: Relational Database Management System.
3. How is data organized in a RDBMS?
Ans: In RDBMS data organized into tables.
Q. What is DBMS? Name DBMS Software.
Ans. DBMS stands for Database Management system.
Well known DBMSs include Oracle, IBM DB2, Microsoft SQL Server, Microsoft Access,
PostgreSQL, MySQL, FoxPro, and SQLite.
Q. What is the difference between Flat file and Relational ?
Flat File: Data is stored in a single table. This is usually suitable for less amount of data.
Relational: Data is stored in multiples tables which are linked by a common field. This is
suitable for medium to large amount of data.
Data and Information
Data. The raw facts constitute data. The facts may be related to any person, place,
activity or things. Examples weights, prices, costs, employee names, product names, etc.
Information is the processed or organized form of data. Example bar charts, invoices,
account returns etc.

THE ADVANTAGES / CHARECTERISTICS OF DBMS:(VVIMP)


• Organised Storage – The data in the database is stored in an organised manner, so that
retrieval of the required data is fast and accurate.
• Data Analysis – A database helps in analysis of data based on certain criteria.
• Data Sharing – If the same data set is required for different applications, then the
database can be shared with other applications.
• Minimal Data Redundancy – In the event of requiring the same data field in several
tables the data field might get repeated in number of tables. This is called as data
redundancy. This can be reduced by using DBMS tools.
• Data Consistency(VIMP) – By minimising data redundancy, chances of inconsistent data
being stored is reduced. For example, it should not happen that the name of the student
is changed in one table and not in another. Such inconsistency is reduced by using a
DBMS.
• Increases Efficiency – Since database tables are properly organised, saving, reading and
searching data can be carried out efficiently.
• Increases Accuracy – Since data redundancy and inconsistency can be minimised in a
database, the data is retrieved accurately from the database.
• Increases Validity – This increases the validity of the database.
• Security – Unauthorised access can be controlled by assigning passwords to the users.

DATA MODELS(VVIMP)
A database can be designed in different ways depending on the data being stored. This
structure of database is known as data model that describes the manner in which data
will be stored and retrieved.

TYPES OF DATA MODELS


1) Hierarchical Data Model
In this model the data is organized into a tree like structure. The data is stored in the
form of records. A record is a collection of fields and its data values. All these records are
linked to each other at various levels, thereby forming a hierarchy.
EXAMPLE:-
2) Network Data Model
In this model, multiple records are linked to same master file. It is also considered as an
inverted tree where master is present in the bottom of the tree and the branches contain
information linked to the master.

Example: -

3) Relational Data Model


This data model is based on the principle of setting relationships between two or more
tables of the same database. The data in different tables are related through the use of
common fields. So, relations are set between tables based on common fields. That is why
this model is termed as relational database model.
* Features of Database
• A database can have one or many tables.
• Each table in database contains information about one type of item.
• Primary key: A primary key is value that identifies a unique row in a table.
• Record uniqueness.
RELATIONAL DATABASE TERMINOLOGY
• Entity – It is a real-world object about which information is to be stored in a database.
The details associated with the entity are called attributes.
• Table – A table is a collection of logically related records. It is organised as a set of
columns, and can have any number of rows.
• Field or Columns or attributes – A field is the smallest entity in the database. A
collection of fields makes a record, a collection of records make a table and a collection of
tables make a database.
• Record or Row – The data values for all the fields related to a person or object is called
a record. It is presented as rows within a table. A record holds the data values of all the
fields for a single person or object in a table.
PRIMARY KEY(VVIMP) –
• A primary key or simply a key is a field that uniquely identifies a row in a table. This
unique field is called the Primary Key (PK).
• Primary key helps the database to quickly search for a record.
• Primary key cannot be null or left empty.
• No duplication of record is found in primary key
• Every database table should have one or more fields designated as key.
FOREIGN KEY –
✓ If a field or a combination of fields of one table can be used to uniquely identify records
of another table, then that particular field is known as the foreign key.
✓ Foreign key helps to build relation between to tables.
✓ foreign key refers to a field in one table that the primary key in of another table. It is used
to link two tables.
Candidate Key – All the field values that are eligible to be the primary key are the
candidate keys for that table. Such fields can neither be left blank nor can have duplicate
values.
Alternate Key – Out of the candidate keys, one or two are made as primary keys. The
others are the alternate keys.
OBJECTS OF AN RDBMS
An object in a database is a structure or a feature that is used to store, represent or
retrieve data. In fact a database is a collection of these objects that work on multiple sets
of data related to each other.
• Table – As mentioned before, a table is the basic unit of any DBMS. The data is first
stored in tables
There are different ways to create a table:
1. Create table in Design View
2. Use Wizard to Create Table
• FORMS –(VVIMP) A form is a feature of a database using which we can enter data in a
table in an easy and user-friendly manner. A form consists of text boxes, labels, radio
buttons, list boxes, check boxes etc. that give a user-friendly interface for entering data.
The data entered through the forms is stored in tables.
There are two ways of creating a form in Open Office Base.
a. Create form in design view
b. Use Wizard to create a form
• Queries – A query is used to retrieve the desired information from the database. In
simple terms, it is a question asked from the database. For example, if we want to view
the names of only those students who have scored more than 50 marks, then we post a
query. (press F5 to run query)
There are three ways you can create query in Open Office Base
✓ Create query in Design view
✓ Create query using Wizard
✓ Create query in SQL view
• REPORTS – (VVIMP)The output of a query may be displayed in the form of reports. The
usual result of the query is in the form of rows and columns. But if we want the report to
be formal and in proper layout, then we can use the Reports feature of RDBMS. Report
helps to display the data in a summarized manner. It is used to generate the overall work
outcome in a clear format.
There are two types of reports created in OpenOffice Base.

a. Static Report:- A report which does not show any change if we make any changes in
the data of the table.
b. Dynamic Report:- A report which shows the corresponding changes which we make in
the data of the table.
Data Types(IMP)
Datatypes are used to identify which type of data (value) we are going to store in the
[Link] themselves can be of different types depending on the data they contain.
• Numeric Types
• Alphanumeric Types: - Varchar, char
• Text data types
• Binary Types
• Date time
• Alphanumeric Types:
• Binary Types: Binary data types are used for storing data in binary formats. Binary data
types in a database can be using for storing photos, music files, etc.
• DATE TIME: Date time data types are used for describing date and time values for the
field used in the table of a database.
• Numeric Types: Numeric data types are used for describing numeric values for the field
used in the table of a database

*Sorting means to arrange the data in either ascending order of descending order.
Referential integrity (VIMP) :- It is used to maintain accuracy and consistency of data in a
relationship.
Referential integrity helps to avoid:
✓ Adding records to a related table if there is no associated record available in the primary
key table.
✓ Changing values in a primary if any dependent records are present in associated table(s).
✓ Deleting records from a primary key table if there are any matching related records
available in associated table(s).
RELATIONSHIPS BETWEEN TABLES(VVIMP)
A relationship refers to an association or connection between two or more tables. When
you relate two tables, you don't need to enter the same data in separate tables.
Relationships between tables helps to:
Save time as there is no need to enter the same data in separate tables.
Reduce data-entry errors.
Summarize data from related tables
One-to-One relationship
In this type of relationship, one specific record of a master table has one and only one
corresponding record in the transaction table. In this relationship, both the tables must
have primary key columns.
One-to-Many relationship
As the name says, in this type of relationship, one specific record of the master table has
more than one corresponding record in the related transaction table. In this relationship,
one of the tables must have primary key column.
Many-to-Many relationship
In this type of relationship, there will be multiple records in the master table that
correspond to multiple records in the transaction table as well. In this relationship, no
table has the primary key column.
Points to be remembered
1. The types of languages used for creating and manipulating the data in the Database are
DDL & DML Commands.
DDL
It stands for Data Definition Language
Example: Create, Alter, Drop
DML
It stands for Data Manipulation Language
Example: Insert, Update, Delete,Select
2. A Select Command is a part of DML involving information retrieval only.
3. A popular data manipulation language is SQL (Structured Query Language).
3. Tables are the basic building blocks of a database.
4. The file extension for databases created using [Link] Base is .odb
[Link] file formats that can be managed using [Link] Base is .odb, .ods, .odp
6. By default, data is arranged in Ascending order using ORDER BY clause.
7. WHERE clause of Select statement helps to display specific data.
8. SELECT statement retrieves zero or more rows from one or more database tables or
database views.
9. UPDATE statement is used for modifying records in a database.
10. DELETE statement is used to remove one or more records in a Database.
11. The relationship option is available in _ the menu.
Ans. Tool
[Link] do you mean by Data Integrity?
Ans. Data integrity means that the data is accurate and consistent in the database.
Q. Write two features of the database.
Ans. Two features of the database are :
✓ A database can have one or many tables.
✓ Every table in a database has a primary key field which ensures 100% unique values
in the database

[Link] do you mean by Composite Primary key?


Ans. When a primary key constraint is applied on one or more columns then it is known
as Composite Primary Key.
Q. What is the difference between Char and Varchar data types?
Ans. Char is a fixed-length data type and Varchar is a variable-length data type.
Q. Write four data types available in Alphanumeric Data types
Ans. Four data types are available in Alphanumeric Data types :
LongVarchar
Char
Varchar

Q. What do you mean by Datasheet View?


Ans. A view in which new data can be inserted and inserted data can be modified or
removed in a table is called a datasheet view
Q. What do you mean by design view?
Ans. A view in which we can change the structure of the table is called a design view.
Q. What is the default length of Integer data type?
Ans. The default length of Integer data type is 10.
Q. What is the default length of Varchar data type?
Ans. The default length of Varchar data type is 50.
Q. The relationship option is available in _ the menu.
Ans. Tool
Q. What is the purpose of Order by clause in Select Command?
Ans. Order by clause is used to arrange the records in ascending or descending order.
Q. Can we enter records by report?
Ans. No
Application Oriented Questions
Question 1. Consider the following table

1. Which of the above field can be selected as a primary key?


2. EmpName field also has unique values for all the records. Can it be made
primary key? Give answer with reason.
Answer:
1. EmpNo can be selected as a primary key.
2. EmpName is having unique values, but there is no guarantee that if more
employees are included then there would not be multiple people with similar names.
So, in future its values may be duplicate. Thus, it cannot be made as a primary key.
Question 2. Sanchita is working for a nationalised bank and is in the process of creating a
table to store the details of customers of the bank.
Find out, which of the following fields of table Bank can be selected as primary key,
candidate key and alternate key? CBSE 2011
Account No, Customer Name, Date of Birth, PAN Number, Opening Balance
Answer:
Primary key AccountNo
Candidate key AccountNo and PAN Number
Alternate key PAN Number
Question 3. Consider the following database Student

[Link] marks obtained by the student with RollNo. 1101 is?


[Link] is the name of the student, who has got the highest marks and what is the
amount of scholarship awarded to him/her?
[Link] many records are there in the table?
[Link] many fields are there in the table?
Answer:
1. 95.4
2. Mohan Garg and scholarship awarded is 50000.
3. 5
4. 6
Question 4. The director of a company uses a database to store data about job title.
This is a part of the database given below

[Link] many records are there in this part of the database?


[Link] many fields are there in this part of the database?
[Link] is the job title of the employee with Payroll Number M421?
[Link] department has maximum employees and what are their Payroll Numbers?
Answer:
1. 6
2. 6
3. Secretary
4. Finance department and their Payroll Numbers are A621 and M502.
Question 5. Identify the columns out of the given three, which should not be present in
each of the following tables:
Answer: (i) DateofBirth (ii) Admno (iii) Phonenumber
Question 6. How are fields, record and a table related to each other? Explain with the
help of an example. CBSE 2007
Answer: Fields are one type of information. A record contains logically related fields. A
table Emp name contains logically related records.

EmpNo Name Salary

1. Shridhar 20000

2. Raghav 40000

Here EmpNo, Name and Salary are three different fields. 1, Shridhar, 20000 represents
one complete record.
Question 7. What is the difference between ‘Rows’ and ‘Columns’ in a table? CBSE 2002
Answer: In a table, rows are called records and columns are termed as fields. A row
stores complete information of a record whereas column stores only similar data values
for all records.
Question 8. Distinguish between data and information. CBSE 2007
Answer: Distinguish between data and information are as follows:

Data Information

It is a raw facts. It is a process form of data.

It considers facts symbols, It considers knowledge derived from study,


images for reference or analysis. experience or instruction.

e.g. 23 is a data. e.g. age = 23 is information.

You might also like