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

Final DB

Uploaded by

manan1.sushma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Final DB

Uploaded by

manan1.sushma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

DATABASE MANAGEMENT SYSTEM

INTRODUCTION TO DATABASE:
1. _________is usually suitable for less amount of data. (Relational/Flat file)

2. Computer based record keeping system is known as


(a) CRKS-Computerized Record Keeping System (b) DBMS - Data Base Management
System
(c) DMS-Data Management Syste (d) All of these

3. Duplication of data is known as __________.


(a) Data Redundancy (b) Data Repentance
(c) Data Inconsistency (d) None of these

4. Multiple copies of same data that mismatch, are known as


(a) Data Redundancy (b) Data Repentance
(c) Data Inconsistency (d) None of these

5. A storage container storing data pertaining to simple object, subject or purpose is known as________
(a) Table (b) Query
(c) Report (d) Form

6. A field that uniquely identifies records in the table is known as________.


(a) Primary key (b) Candidate key
(c) Unique key (d) Special key

7. A statement that gives you filtered data according to your conditions and specifications, is
called________.
(a) Table (b) Query
(c) Report (d) Form

8. An interface in user-defined layout that lets users view, enter or change data in tables, known
as________.
(a) Table (b) Query
(c) Report (d) Form

9. A formal, presentable printed document that lists data in formatted way is known as __________.
(a) Table (b) Query
(c) Report (d) Form

10. Named collection of fields which represent a complete unit of information is called_________.
(a) Field (b) Record
(c) Table (d) None of these

11. A row in a table is also known as:


(a) A record (b) A field
(c) A data type (d) A tuple

12. Which of the following holds a single piece of data ?


(a) Table (b) Record
(c) Field (d) Form

13. What is the correct definition of primary key ?


(a) The first field in a table. (b) A field that contains unique data in each
record.
(c) The field which we will use to search with. (d) A field which contains numbers only.

14. What is the correct definition of foreign key ?


(a) The common field of two tables. (b) A field that contains unique data in each
record.
(c) The field same as primary key. (d) A field that stores values coming from
primary key of another table.

15. When a primary key contains more than one field, it is known as_________ .
(a) Alternate key (b) Candidate key
(c) Foreign key (d) Composite key

16. What is used to uniquely identify each record in a table?


(a) Foreign key (b) Field
(c) Datatype (d) Primary key

17. Which is not true for a database file?


(a) Each record may contain several fields (b) Fields are organized in columns
(c) Data types have to be declared in advance (d) Each field may contain several records

18. While designing a database, we should keep in mind


(a) Purpose of database (b) Tables required
(c) Field needed (d) All of them

19. What are the main building blocks of a database?


(a) Lists (b) Queries
(c) Tables (d) Reports

20. Which of the following describes a relational database ?


(a) It provides a relationship between integers. (b) It consists of separate tables of related data.
(c) It retrieves data related to its queries. (d) It can print reports.

21. Data should be organized into tables based on:


(a) Field properties (b) Subjects associated with the real-data
(c) Character lengths (d) All of these

22. Which of the following best describes a query ?


(a) A query enables people to enter or view data in your database easily. (b) A query summarizes
and prints data.
( c) A query filters data from a database based on a criteria. (d) All of these

23. Which of the following best describes a form?


(a) A form enables people to enter or view data in a database easily. (b) A form
summarizes and prints data.
(c) A form filters data from a database based on a criteria. (d) All of these
24. Which of the following best describes a report ?
(a) A form enables people to enter or view data in a database easily. (b) A form
summarizes and prints data.
(c) A form filters data from a database based on a criteria. (d) All of these

25. A database table should always contain


(a) images (b) lots of records
(c) lots of ready made queries (d) a key field

26. Data in a database is stored in a________.


(a) table (b) query
(c) report (d) search

27. A collection of data which is stored in a logical structure is known as a _______.


(a) field (b) database
(c) record (b) table

28. One piece of data about a single person or thing is known as a_____
(a) record (b) file
(c) field (d) database

29. All of the information about one person or one thing is known as a ______.
(a) database (b) field
(c) file (d) record

30. A collection of records on a particular topic is stored as a _______.


(a) table (b) record
(c) folder (d) field

31. To find a particular record or set of records in a database you would use a ______.
(a) query (b) report
(c) table (d) relationship

32. To organize the different tables of related data, a relational __________________ are used.

33. To display data in a specific format or distribute a summary of data,_________ are created.

34. To get data input from user in a well-organized, formatted way on screen, _________are used.

35. In the database view of a relational database, a row of information is called a _________.

36. To control how information is entered into a database, programmers and database administrators
create _______ to help ensure data integrity.

37. In a relational database, a common field that links two tables in a relationship but not a primary key is
called a _________ key.

38. The database use common fields to create links between tables. Thus such databases are called
a_______ database.
39. Primary key is used to______ identify the record in a table.

40.____________ is a collection of related information.

41. A Foreign key is linked to the primary key of the same table. T/F ?

42. A Database can have only one table. T/F ?

43. If a piece of is stored in two places in the database, then storage space is wasted and changing data in
one place will not cause data inconsistency. T/F?

44. A field can store group of values. T/F

45. In a relational database, two tables cannot have a common field. T/P

46. A foreign key is the primary key of another table. T/F

47. Forms are used for searching data in table. T/F

Competency Based Questions

48. Akshat wants to store a huge amount of information about his firm in a database.
Which type of table organization would be most suitable for this purpose?
(a) Relational (b) Flat File
(c) Either Relational or Flat file (d) Hierarchical

49. Juan has stored the data related to his work in multiple files.
He did not realise that same data related to an important thing was stored in three different files
separately.
This type of storing data at multiple locations is known as data ________________.
(a) Inconsistency (b) Redundancy
(c) Standardisation (d) None of these

50. Juan has stored the data related to his work in multiple files. He did not realise that same data related
to an important thing was stored in three different files separately.
This led to a huge problem for Juan when he modified the data in one file while forgetting to update other
files. This problem is known as data ________.
(a) Inconsistency (b) Redundancy
(c) Standardisation (d) None of these

51. To support and help Juan, his brother's friend Prabhnoor has come. He explained the need and role of
database in such a case.
So he advised him to create tables such that there should be a way to recognise each row of the table
uniquely. What does Prabhnoor mean by this way ?
(a) He wants to create a foreign key in each table. (b) He wants to club fields in a unique
way.
(c) He wants to create a field having a special value in it. (d) He wants to create a primary key in each
table.

52. While designing the database, Prabhnoor suggested that if in a table there is a field which must take
only those values which are part of a field in another table,
(where it can recognise the records uniquely), then that field must be declared as key.
(a) primary (b) alternate
(C) composite primary (d) foreign

Answers:
1. Flat File 2 (b) 3. (a) 4 (c) 5. (a) 6. (a)
7. (b) 8. (d)
9. (c) 10. (b) 11. (a) 12. (c) 13. (b) 14. (d)
15. (d) 16 (d)
17. (d) 18. (d) 19. (b. c. d) 20. (b) 21. (b) 22. (c)
23 (a) 24. (b)
25. (d) 26. (a) 27. (d) 28. (c) 29. (d) 30. (a)
31. (a) 32. database
33. reports 34. Forms 35. Record 36. Forms 37. Foreign 38. Relational
39. Uniquely 40. Database
41. F 42. F 43. F 44. F 45. F 46. T
47. F 48. (a)
49 (b) 50. (a) 51. (d) 52 (d)

Let us Revise:

 A database system is basically a computer based record keeping system.

 Database refers to the collection of interrelated data.

 Database Management Systems (DBMS) is a computer program that manages a database


effectively and efficiently.

 Duplication of data is known as data redundancy.

 BASE offers many features like tables, forms, queries and reports to manage data,

 A table refers to a storage container storing data pertaining to single object, subject or purpose.

 A primary key is a field that uniquely identifies the records in a table.

 A query is a statement that giver you filtered data according to your conditions and specifications.

 A form is an interface in user specified layout that lets users view, enter, or change data directly
in the table.

 A report is an effective way to present date in a printed format. It is a formal, presentable


document about data.

Solution Time:
1. What is database? What is its significance?
Ans. A database is a collection of logically related data.
The database systems store data centrally at one place wherefrom all applications can get the data
required.
The centralised storage facilitates many advantages like:
(i) Controlled Redundancy
(ii) Data Sharing
(iii) Data Consistency
(iv) Standardization
(v) Enhanced Data Security.

2. Write a short note on OOo BASE, functioning.


Ans. BASE is a database management system part of OpenOffice.org.
It offers many features to manage databases. With BASE, one can manage all information stored in a odb
file.

Within the file,


 one can divide one's data into separate storage containers called Tables.
 one can view, add and update table data using Forms
 one can find and retrieve just the data, which is required using Queries
 one can analyze or print data in a specific layout using Reports.

3. What do you understand by tables in a database management system ?


Ans. In a database management system, various types of objects together manage and maintain the
system. Tables are one of them.

A table is a storage container that stores data pertaining to single object, subject or purpose.
For example, an employee table may contain all information pertaining to an employee eg, employee no.
employee name, designation, department, grade, basic etc.
Similarly, Attendance table may contain data pertaining to the attendance of employees e.g., employees'
no, months, years, no, of days worked, number of leaves takens,
CL, LWP, PL etc. (CL-Casual Leaves, LWP-Leaves Without Pay, PL - Privilege Leaves)

Both these tables reside in single database as both of them are related to single object called employee.
Two tables are maintained to minimize redundancy
Therefore, tables provide a way to store related data together under one roof, taking care of things like
reduced redundancy, standardization and data integrity.

4. What is the difference between a flat database and relational database ?

Ans. In a flat database, all the data is stored in a single file e.g., a spreadsheet.
In a relational database, data is stored in multiple tables linked via common fields e.g., BASE of
OpenOffice.org is a relational database.

5. The manager of a car showroom uses a database to store data about cars he sells. This is part of the
database.

Make Model Size of engine Registration Price (Rs.)


Opel Vectra 1.8 VSE 648 9, 29,000
Volkswagen Golf 1.4 SB A5526 14,15,000
Volkswagen Polo 1.2 DD B4978 23,11,000
Renault Megane 1.4 CD 33 18,17,000
(a) How many records are there in this part of the database?
(b) How many fields are there in this part of the database?

Ans. (a) 4 (four)


(b) 5 (five)

6. A jazz Band uses a database to keep membership records. This is a part of the database.

Name MemberNumber Instrument


Hassini 2015 Guitar
Milan 0365 Saxophone
Palash 0112 Clarinet
Afzal 8231 Piano
Jugal 0112 Clarinet

(a) The MemberNumber 0112 is used twice. Explain why this must be a mistake.
(b) Write down a valid MemberNumber for Jugal.
(c) Name field also has unique values for all the records. Can it be made primary key? Why/why
not?

Ans
a)MemberNumber uniquely identifies the members. It is most likely to be the primary key or keyfield.
Hence, one value cannot be used more than once in this column. Hence use of 0112 twice is
wrong as it is the primary key field.

(b) 0113 (or any other number which is different from earlier entered member numbers.)

(c) Though Name is having unique values as of now, there is no guarantee that if the band grows there
would not be multiple people with similar names.
Hence, as of now it can be made primary key but should not be made as in future its values may be
duplicate.

7. Which of the following is not an example of database ?


(a) Cross n Know Game (b) Employee Payroll Management
(c) Numeric Calculator (d) Customer Management System
Ans. Numeric Calculator.

8. What is Primary Key?


Ans. A Primary Key is a field that uniquely identifies the records in a table.

9. Sanchita is working for a nationalized bank and is in the process of creation 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.

AccountNo CustomerName Dateofbirth PANNumber OpeningBalance

Ans.
Primary Key: AccountNo
Candidate Key : AccountNo and PANNumber
Alternate Key: PANNumber

10. What is a key difference between a foreign key and a primary key?
Or
What is a Primary Key? How is it different from foreign key?
Ans. A foreign key is a field or fields that refer to a primary key of another table while a primary key is a
field in a table that uniquely identifies each record in a table.

CREATING DATABASE AND TABLES:


1. OOo BASE is an example of
(a) Air base (b) Military base
(c) Database component (d) None of these
2 CREATING DATABASE AND TABLES

2. What method can you use to add a new table to your database in OOo Base ?
(a) Use Design view to create a table (b) create table through table wizard
(c) enter data directly in a blank sheet and save it as table (d) all the above (e) (a)
and (b)

3. A BASE database is made up of all the following components EXCEPT:


(a) tables (b) queries
(c) forms (d) formula bars

4. Which of the following fields would not make a suitable primary key?
(a) A customers account number (b) A date field
(c) An AutoNumber field (d) A student admission number

5. The default extension of OOo BASE database is______ .


(a) oob (b) base
(c) odb (d) dbo

6. The shortcut key to create a new database is


(a) Ctrl + N (b) Ctrl + O
(c) Ctrl + A (d) Ctrl + D

7. The shortcut key to open an existing database is _____.


(a) Ctrl + N (b) Ctrl + O
(c) Ctrl + A (d) Ctrl + D

8. A table is a set of data elements that is organized using a model of vertical_______ and
horizontal______.
(a) Rows, Tables (b) columns,Rows
(c) Rows, Columns (d) forms, Reports
9.______ specifies the type of data that may be stored in a field.
(a) Autosave (b) Autovalue
(c) Field Type (d) Entry

10. Binary data types in a database can be using for storing


(a) photos, music files, etc. (b) integer values
(c) only image files (d) only video files

11. After opening a database, you can create tables interactively using
(a) Tables Tab (b) Tools menu
(c) Edit menu (d) Table wizard

12. State True or False.


(i) There can be multiple primary keys in a table.
(ii) A database can have multiple objects like table, forms, queries, reports etc.
(iii) Columns in tables are called records and rows in tables are called fields.
(iv) A primary key value can be NULL.

13. Database servers are referred to as_______.


(a) Front-ends (b) Back-ends
(c) Clients (d) Model

Competency Based Questions


14. Zoya has recently learnt about database tables, She has enthusiastically downloaded Open Office.
She started OOO BASE to create a table. But when the Base started, she cancelled the dialog of
opening/creating a database.
She was unable to create tables. Help her do this by picking up the right solution from the options given
below.
(a) Zoya has not downloaded Table Wizard. She must download Table Wizard also
(b) Zoya must either create a new blank database or open an existing database. Only in an open
database, tables can be created.
(c) Zoya must fetch the settings for Table Wizard to be used with base.
(d) Zoya should install a special extension which allows to create tables without the need of any
database.

15. Zoya has rectified her mistake and created a new database. She now wants to create data tables
interactively.
Which feature of OOo BASE will help her to create the tables in this way?
(a) The Tables Tab (b) The Forms Tab
(c) The Queries Tab (d) The Table Wizard

16. While creating tables using Table Wizard, Zoya is clear about what type of data (whether numeric or
text or date etc.) will be stored in the fields.
For this what should she do while using a table wizard?
(a) She should create a text file which stores the details of data types for each field.
(b) Zoya cannot define the type of data to be stored, in Table Wizard.
(c) After selecting the fields, Zoya should choose the Field Type for each field in the table, along with
other details.
(d) Zoya can only change the data type from the default types, after Table wizard has created the table.

LET US REVISE

 BASE is the database component of open source office suite OpenOffice.org (00o).

 The default extension of 000 BASE database is .odb.

 One can create a new database either using Table Wizard or by creating constituent tables in
Design View.

Answers:
1. (c) 2 (e) 3. (d) 4. (b) 5. (c) 6. (a)
7. (b) 8. (b) 9. (c) 10. (a) 11. (d) 12 (i) False, (ii) True,
(iii) False, (iv) False
13. (b) 14. (b) 15. (d) 16. (c)

CREATING/EDITING TABLES IN DESIGN VIEW:


1. What method can you use to add a new table to your database in OOo Base?
(a) Use Design view to create a table (b) create table through table wizard
( c) enter data directly in a blank sheet and save it as table (d) all the above (e) (a)
and (b)

2. Which of the following is/are not part(s) of table structure in OOo BASE?
(a) Field Name (b) Field typ (c) Length
(d) Primary key (e) size of table (f)number of records

3. Which of the following represent Text field type categories in OOo BASE?
(a) CHAR (b) VARCHAR
(c) LONGVARCHAR (d) all these

4. When you save a BASE database, what file format do you use?
(a) adp. (b) xml.
(c) .mdb (d).odb

5. The legal empty value in BASE database is termed as


(a) Hollow (b) empty
(c) void (d) null

6. TIMESTAMP belongs to ______field type in BASE.


(a) Integer (b) Time
(c) Date/Time (d) Text

7. Which of the following is are not a BASE field type ?


(a) TinyINT (b) Percent
(c) Double (d) BigDouble

8. Which of the following field types can represent upto 5 digits numbers?
(a) Integer(INT) (b) Real
(c) Small Integer (SMALLINT) (d) Float

9. Which of the following field types cannot allow integers or numbers or text in them?
(a) Yes/No (b) Image
(c) Binary (d) all of the above (e) none of these

10. Which of the following field properties ensure that "data cannot be skipped in the field" or "field
commit be left empty"?
(a) Format (b) Entry Required
(c) Default Value (d) Length

11. A BASE database is made up of all the following components EXCEPT:


(a) tables (b) queries
(c) forms (d) formula bars

12. Suppose you'd like to set up a table in BASE to monitor your growing collection of DVDs. In that
table, each DVD will be entered as a:
(a) record (b) long integer
(c) column (d) field

13. When you define a field for a table, which of the following parameters does BASE always consider
optional?
(a) Field Name (b) Data Type
(c) Description (d) Field Size

14. The number 487.52 should have a field size of:


(a) Tiny Integer (b) Small Integer
(c) Integer (d) Big Integer

15. The organizing of data according to text, number, currency, date/time, etc is called
(a) Data(b) Type
(c) Date type (d) Data structure

16. What identifies the contents of a field?


(a) Data(b) Field Value
(c) Field name (d) Table name

17. Out of the following which one is most appropriate data field in context of employee table if only one
of these is required?
(a) Age in years (b) Date of Birth
(c) Age in days (d) Age in months

18. What data type should you choose for a zip code field in a table?
(a) Text (b) Number
(c) Varchar (d) All the above
19. Which of the following fields would not make a suitable primary key?
(a) A customers account number (b) A date field
(c) An AutoNumber field (d) A student admission number

20.What is the purpose of the description column in Table Design View?


(a) To describe the data that should be entered in each field
(b) To define the data type applied to each field within the table
(c) To enter lookup data that the field should refer to
(d) None of the above

21.Fill in the blanks:

(a) The type that dictates what sort of data can be stored within a field is known as_________.

(b) A field that uniquely identifies each record is called________.

(c) To store an object like image, you need to create a field in table, having field type as______.

(d) In a text type data field we can put maximum ______ characters.

22. Match the following:


Part A Part B
(a) Default Value (i) Maximum length of a text field or numeric field
(b) Length (ii) Number of places to the right of the decimal
(c) Format example (iii) Data's display layout
(d) Decimal Places (iv) A value that gets entered in a field automatically when new
records are entered.

23. The of a table is used to modify the design of a table, like modifying the name of a field or changing
the data type of a field.
(a) Datasheet View (b) Design View
(c) Table View (d) Wizard View

24. You can select multiple fields of a table in design view by using the ______ key.
(a) Alt (b) Spacebar
(c) Shift (d) Ctrl

25. In the datasheet view of the Student table, the Student Address field needs to be displayed as
Address.
Which field property can be used to achieve this?
(a) Caption (b) Required
(c) Validation Rule (d) Default

26. _______data type stores date and time values between the years 100 through 9999.
(a) Date (b) Time
(c) Date/Time (d) Memo
Competency Based Questions
27. Isha, Zoya's friend, has also learnt about Databases. She is a person of details. She feels that rather
than creating tables interactively,
she should create the tables from scratch by typing the field name, type, and other settings. What should
she use to create tables in this manner?
(a) Table Wizard (b) Design View
(c) Data View (d) Tables tab

28. Isha has successfully created her first table. But while entering data, she realised that she forgot to add
one field. She has already entered a few records.
What can she do to add a new field in the already created table?
(a) Isha should delete the old table and create a new table.
(b) She will have to delete all the records in the table before she can add a new field.
(c) She should open the table in Design view and add the new field.
(d) Adding new field to an existing table is not allowed in Base.

28. Isha has now some experience of creating and updating tables. Her boss has asked her to create a table
about the attendance of the employees.
Along with other details, the table should also have a field that can store the date and time of entry in the
office. What should be the field type for this field?
(a) Date (b) Time
(c) Timestamp (d) All of these

Answers:
1. (e) 2 (e,f) 3. (d) 4. (d) 5. (d) 6. (c) 7. (b.
d)
8. (c) 9. (d) 10. (b, c) 11. (d) 12. (a) 13. (c) 14. (b)
15. (c) 16. (c) 17. (b) 18. (b) 19. (b) 20. (a)
21. (a) Data Type, (b) Primary Key, (c) Image, (d) 255
22. (a)(iv); (b)(i); (c)-(iii) ; (d)(i)
23. (b) 24. (d) 25. (a) 26. (c) 27. (b) 28. (c)

LET US REVISE
 A table can be created or edited in design view.

 Fixed length fields allot same length to all fields irrespective of their contents whereas variable
length fields allot d much length as needed by the contents of the field.

 BASE datatype have these categories: Text, Date/Time, Numeral and Special.

 Text data types are Text (fix) (CHAR), Text [VARCHAR), Text [VARCHAR-IGNORECASE]
and Memo [LONGVARCHAR).

 Maximum length of all text type field is 2 GB.

 Date/Time data types are: Date(DATE), Time [TIME), Date/Time [TIMESTAMP].


 Numeral data types are: Tiny Integer, Small Integer, Integer, Big Integer, Float, Real, Double,
Numeric and Decimal

 Special datatypes include: Yes/No, Image, Binary and Other.

 Different field properties that can be set are: Entry Required, Length, Decimal Places, Default
value and Format example.

 Null value represents a legal empty value in a database.

Solution Time
1. Discuss various types of numeric fields that you can have in BASE. Which field type is the default
numeric field type ?
Ans:
In BASE, we can have following types of Numeric fields:

(i)Tiny Integer [TINYINT]. This field accepts integers or whole numbers with a fixed length of three (3)
spaces.

(ii) Small Integer [SMALLINT]. This field accepts integers or whole numbers with a fixed length of five
(5) spaces.

(iii) Integer [INT). This field accepts integers or whole numbers with a fixed length of ten (10) spaces. It
also has an auto value feature that fills up the field with a value you set automatically.

(iv) Big Integer [BIGINT]. This field accepts integers or whole numbers with a fixed length of nineteen
(19) spaces. It also has an auto value feature that fills up the field with a value you set automatically.

2. When should you prefer a NUMERIC field type over INT?


Ans. NUMERIC field type should be used when we need to store all types of numbers such as whole
numbers, numbers with decimals, fractional numbers etc.
On the other hand, INT field type should be used when purely whole numbers are to be stored in the field.

3. What do you understand by default value ?


Ans. The default value is used to specify the default value for a field or control. The default value is
automatically entered in a field or control when a new record is created.
For example, in Student table, you might set the default value for House as "Tagore House". When users
add records to the table, they can either accept this value or enter the name of a different house.

4. How is the field type Date/Time (TIMESTAMP] different from Date[DATE] and Time[TIME) field
types ?

Ans. The Date[DATE] field type stores the dates only and the Time[TIME] field type stores the times
only.
But the field type Date/Time[TIME STAMP] is a combination of both Date and Time types and hence
can store a combination of date and time, also known as timestamp.

5. What is the significance of Null values?


Ans. Null values are very useful while entering data in a field when table demands data for the field but
user does not have any value to enter.
Since Null values are legal empty values in BASE, they can be entered in such situations.

6. Do as directed:
(i) Pronita is a programmer in an institution and is asked to handle the records containing personal
information of the teachers teaching in the institution.
Suggest five fieldnames, which you think must be present in the table called Teacherinfo.
(ii) Look at the table called "Item" given below and answer the question.
ItemId ItemName ItemStock ItemDOP QuantityPurchased

(a) Suggest the data types of all the fields


(b) Which two fields can act as the Primary Key from the above table ?

Ans.
(i) TNo, TName, DOB, Address, B Salary.

(ii) (a) ItmeID : NUmber


Item Name : Text
ItemStock : Number
Item DOP : Date
Quantity Purchased : Number

(b) ItemID and ItemName can act as the primary key.

Application Oriented Questions:


7. The following table shows part of the information kept on children attending the Helping Hands
Nursery.

Child Child SurnameChild DOB Special Medication Gender Group


ID First Diet
Name
141 Jasneet Kaur 29/02/10 Yes No M 2A
124 Jain Samira 24/02/10 Yes No M 1B
132 Raunaq Singh 15/01/10 No No F 1A
152 James White 12/11/09 No No M 2A
289 Vidhya Mahadevan 01/11/09 No Yes M 2B

(a) State the number of fields in the table above.


(b) State the number of records in the table above.
(c) State four data types used in the table.
(d) i. State the key field.
ii. Give the purpose of the key field.

OPERATIONS ON TABLES:
1. To add a new record, you can use Insert → _____ command.
(a) Value (b) Data
(c) Record (d) Row

2. To delete a record, you can use Edit →____ command


(a) Value (b) Data
(c) Record (d) Row

3.The process of arranging records in order by one or more fields is known as_____ .
(a) Sorting (b) Linking
(c) Ordering (d) Editing

4. The Sort ____ tool is used to sort the records by the current field in order from Z-A or highest number
to lowest number.
(a) Ascending (b) Increasing
(c) Descending (d) Decreasing

5 The Sort ____ tool is used to sort the records by the current field in order from A-Z or lowest number
to highest number.
(a) Ascending (b) Increasing
(c) Descending (d) Decreasing

6. A ________ is a link between two tables.


(a) field (b) key
(c) relationship (d) none of these

7. A ____________relationship is where a single record of a table is related to a single record of another


table.
(a) one-to-many (b) many-to-one
(c) one-to-one (d) many-to-many

8. A ________table relationship is where multiple records of a table are related to a single record of
another
(a) one-to-many (b) many-to-one
(c) one-to-one (d) many-to-many

9. A ________relationship is where a single record of a table is related to multiple records of another


table.
(a) one-to-many (b) many-to-one
(c) one-to-one (d) many-to-many

10. A______relationship is where multiple records of a table are related to many records of another
table. 10 A
(a) one-to-many (b) many-to-one
(c) one-to-one (d) many-to-many

11. What type of relationship is shown below ?

Customers Orders
1 N

(a) one-to-many (b) many-to-one


(c) one-to-one (d) many-to-many

12. What type of relationship is shown below ?

Customers N 1 Orders

(a) one-to-many (b) many-to-one


(c) one-to-one (d) many-to-many

13. What type of relationship is shown below ?

Customers N N Orders

(a) one-to-many (b) many-to-one


(c) one-to-one (d) many-to-many

14. What type of relationship is shown below ?

Customers 1 1 Orders

(a) one-to-many (b) many-to-one


(c) one-to-one (d) many-to-many

15. When applied to 1:N relationships, the term "parent" refers to the many side of the relationship
since a child may have many parents. True/False

16: ____ is a rule states that every foreign key value must match the primary key value of a record in
another table, or must be null.

17. In a one-to-many relationship, the Primary Key field is in the______ side of the relationship

18. In a one-to-many relationship, the Foreign Key field is in the __________ side of the relationship.

19. The ___________window is used to create, view, and edit relationships.

20. There can be only one relationship defined for a table. True/False

Competency Based Questions

21. Ramya has been assisting her teacher in typing the marks details of all students in the class. After
inserting the details in a data table, she showed it to her teacher.
But her teacher said that records should be listed in a way such that the topper details are at the top
second topper below it; third topper below the second topper and so on.
All the records should be listed in this way only. What should Ramya do now?
(a) Ramya should create a new table and enter the marks details again as required by teacher.
(b) Ramya should cut the records and paste in the same table as per the order required,
(c) Ramya should sort the table using the default sort settings:
(d) Ramya should sort the table on the basis of total marks field.

22. Ramya entered the marks details of students in a table namely Marks, which has fields as Rollno
Subject1, Subject2, Subject3, Subject4, Subject5, Total Marks
The other details of the students are available in Students table which has fields as RollNo, Name, DOB,
Admission No., Address.
For preparing the report card both these tables are to be used together as one record in both tables
corresponds to the same Rollno.
What type of relationship do Students and Marks tables have between them?
(a) One to One (b) One to Many
(c) Many to One (d) Many to Many

23. In the same database (of Students and Marks tables), there is a Subjects table which stores the
details of subjects being taught in a class.
It has fields as SubjectID, Subject Name, Class, Year There is one more table namely StuSubjects which
stores the details of subjects opted by a student.

It has fields as Rollno, SubjectID. A student has to opt for minimum 5 and maximum 7 subjects.
What type of relationship exist between tables stusubject and subjects (one rollno, multiple subjects)?
(a) One to One (b) One to Many
(c) Many to One (d) Many to Many

24. The database has Students table containing students' details and Marks table containing marks of
the students, linked via Rollno field.
While deleting a record from the Students table, BASE is not allowing it to happen as long as there is a
corresponding record in the Marks table,
for the rollno being deleted from Students table. This is happening because of which important rule(s) of
DBMS?
(a) Integrity (b) Clarity
(c) Referential integrity (d) Data Consistency

Answers:
1. (c) 2. (b) 3. (a) 4. (a) 5 (c) 6 (c) 7. (c)
8. (b) 9 (a) 10. (d) 11. (a) 12. (b) 13. (d) 14. (c)
15. F 16. Referential Integrity 17. One 18. Many 19. relationship
20. F 21. (d) 22 (a) 23 (b) 24. (c)

LET US REVISE:

 To edit data in a table, open the table in data view. New record can be inserted using Insert
Record command.

 An existing record can be deleted using Edit Delete command


 Table structure can be modified in Design View.

 Relationships are the associations established between common fields in two tables in a
database.

 A Relationship can be of one-to-one or one-to-many or many-to-many type

 Referential integrity is a system of rules that a DBMS uses to ensure that relationships between
records in related tables are valid,
and the user can't accidentally delete or change related data.

Solution Time
1. What is sorting? How is it useful?
Ans. Sorting is a process of arranging the data into some meaningful order on the basis of one or
multiple field-values.
Sorting makes it easier to understand, analyse or visualize data.

2. What is relationship in a database? How are relationships between tables useful?


Ans. In a relational database, a relationship is a link that connects two or more tables through some
common, related data.
Relationships between tables enable users to use the related data across multiple tables.

3. Name the three types of relationships that can be created in Base.


Ans. There are 3 types of relationships in relational database:
(1) One-to-One
(ii) One-to-Many (or Many-to-One)
(ii) Many-to-Many

4. Explain one-to-one relationship.


Ans. In a one-to-one relationship, a record in table A can have only one matching record in table B, and
vice versa.
For example, a person has 1:1 relationship with his/her spouse.

5. Explain one-to-many relationship. Is it different from many-to-one relationship?


Ans. In one-to-many relationship, a record in table A can have many matching records in table B, but a
record in table B can have only one matching record in table A.

One-to-Many and Many-to-One relationships are two sides of the same coin e.g., Teacher and Student
tables have one-to-many relationship
(one teacher record is related to many student records as one class teacher can teach many students)
while Student and Teacher tables have many-to-One relationship (many students have only one class
teacher).

QUERIES IN BASE:
1. A database ______ is a stored object that extracts data from a database as per a condition and
presents it in a readable, formatted form.
(a) form (b) query
(c) report (d) link

2. A ______retrieves records from one or more tables and then displays the result in a formatted
readable form.
(a) form (b) table
(c) query (d) report

3. To create a query interactively in OOo BASE,


(a) Queries tab (b) Tools menu
(c) Query wizard (d) Design view

4. A query condition contains _______ .


(a)field (b) value (c) condition
(d) only (a) and (b) (e) only (b) and (c) (f) (a), (b), (c)

5. To create a query based on multiple tables, _______may be used.


(a) Queries tab (b) Tools menu
(c) Query wizard (d)deign view

6. While creating a query, expression will select all the fields from the table Marks.
(a) All.Marks (b) Marks.All
(c) Marks.Full (d) Marks.*

7. In order to display only those records in a query based on Marks table, where total_marks are more
than 74.9, which of the rows from the
bottom section of the Query Design view will be used to define the condition for the query?
(a) Field(b) Function
(c) Criterion (d) Alias

8. In order to specify the query condition so that the total marks are in the range 50 to 100, the Criterion
row of the Query Design view should contain.
(a) 50 and <= 100 (b) Between 50 and 10 anywhere
(c) Between 50 and 100 in the column total_marks (d) 50 and 100 in the column total_marks

9. _______functions produce a single value from a set of values.


(a) Row (b) Aggregate
(c) Final (d) Summary

10. In a summary query, records are summarised on the basis of a _______.


(a) primary key (b) sort-field
(c) group-field (d) foreign key

11. You can sort the records in a Query. (True/False)

12. It is not possible to add calculations in a Query. (True/False)


Competency Based Questions
13. Fouzia is a new intern in an organization. Her mentor asked her to prepare a query based on a table
Applicants
Her mentor quickly wants to know the applicants belonging to a city 'XYZ". What should Fouzia do to
produce a quick query?
(a) Fouzia should herself open the table Applicants and note down the names of applicants belonging to
that city.
(b) Fouzia should use Query Wizard.
(c) Fouzia can use Design to create the Query.
(d). All of the above options are equally useful.

14. Fouzia's mentor has asked her to create a detailed report from two tables Interns and Performance
where she wants only those records should be
listed where call hours are more than 150. What should Fouzia do to create this query ?
(a) Fouzia should use Query Wizard.
(b) Fauzia should use the Query Design view to create this query.
(c) Fouzia should herself pick records from Performance table as per the matching criteria and then list
their details along with matching records from Interns table.
(d) All of the above are equally useful options.

15. Fouzia's mentor wants to know the information such as Average Call hours, Minimum Call hours,
Maximum Call hours, in a query. What should Fouzia do to prepare this query?
(a) Fouzia should now make use of calculator to calculate the asked details.
(b) Fauzia should prepare a summary Query using aggregate functions.
(c) Fouzia should create a detailed query and manually enter the calculated details below the prepared
query.
(d) All of the above mentioned options are equally useful.

Answers:
1. (b) 2. (c) 3. (c) 4. (f) 5. (d) 6 (d) 7 (c)
8. (d) 9. (b), (d) 10. (c) 11. T 12. F 13. (c) 14. (b)
15. (b)

LET US REVISE

 A database query is a stored object that extracts data from a database as per a condition and
presents it in a readable, formatted form.

 In 00o Base, queries can be created through a query wizard as well as in design view.

 You can perform calculations in a query.

 Queries can aggregate or group data using group fields that contain duplicate entries in it.
Solution Time
1. What's a query?
Ans. A query is a way to get specific information from the database.

2. What is the utility of queries in a database?


Ans. A query is a useful way to extract required data from a database. It offers many advantages:
(i) Queries show only the required data.
(ii) Queries represent required data in a presentable way.
(iii) Queries can be saved for later use also.

3. What are two ways of creating queries in Base?


Ans. In Base queries can be created:
(i) Through Query Wizard
(ii) Through Query Design View

4. What is the role of Criterion in a Query?


Ans. The Criterion in a query specifies the condition in a detailed query in which all records that fulfil the
condition specified in Criterion are displayed.

5. How is a detailed query different from a summary query?


Ans. In a Detailed Query all records that match the specified criterion are displayed.
In a Summary Query only the aggregated/grouped result such as the sum, average, minimum or
maximum value is shown.

FORMS IS BASE
1.________are the objects that are used to get data from user in interactive manner through a user-
friendly interface.
(a) Tables (b) Forms
(c) Queries (d) Reports

2. A is an interface in a user specified layout that lets users to view, enter, and change data directly in
database objects such as tables.
(a) frame (b) form
(c) relation (d) report

3. What is a database form?


(a) A printed database report.
(b) A window with data entry fields that match the fields in a database.
(c) A database table containing fields that can be edited.
(d) A database component that finds records based on specific search criteria.

4. Which object is used to create a form?


(a) Tables only (b) Tables and reports
(c) Queries and reports (d) Tables and Queries
5. ________ is an interactive tool for creating forms through steps arranged on multiple screens.
(a) Table Wizard (b) Forms tab
(c) Forms Wizard (d) Tools Menu

6. Which of the following tasks cannot be done using a Form?


(a) Inserting a record (b) Deleting a record
(c) Inserting a Field (d) Searching a record

7. _______are easier way to get data from user and store in tables.

8. A form has one or more tables linked with it. True/False

9. A form once created, the height/width of entry box cannot be changed. True/False

10. A form can be used for operations on records of a table.


(a) Insert (b) Delete
(c) Search (d) All of the above (e) None of these

11. Which of the following properties may be set/edited for field boxes in a form?
(a) Enabled (b) Visible
(c) Alignment (d) All of the above (e) None of these

Competency Based Questions


12. Jerath John is a new recruit in the office. His boss told him that he is not happy the way records are
entered in data tables in plain way.
He wants Jerath to create a user friendly interface, not only useful for data entry, but also for searching
records. What should Jerath do ?
(a) He should approach the IT cell of the organization to get a new software designed for the same.
(b) Jerath should create forms in the database.
(c) Jerath should download a template online which can be used for data entry.
(d) Jerath should clearly tell his boss that it is not possible to do this.

13. Jerath has created a form, but he is not happy with it. There are two issues that he is facing:
(a) the entry boxes for fields Address and Project Details are too small, and
(ii) the field Past Grade must not appear on the form.

Can you suggest Jerath about this (Pick one from below)?
(a) Jerath should create a new form from scratch.
(b) Jerath should first create a new table minus the field Past Grade and then create a form based on the
new table.
(c) Jerath can easily open the form in Design view and change height and width for fields Address and
Project Details.
Also, he can make Past Grade field invisible in the form design view.
(d) Making these changes are not possible once the form is created.

14. Jerath has been using forms for inserting records in table and searching for records in tables.
But 14 now his boss wants that for insertion, deletion and searching, a common interface should be used.
What should Jerath do ?
(a) Jerath should consult IT cell to find a solution for this.
(b) Having a common interface for Insertion, deletion and searching is not possible.
(c) Jerath should create a new interface for insertion, deletion and searching.
(d) Jerath can use the same existing form for inserting as well as deleting and searching of records

Answers:
1. (b) 2. (b) 3. (b) 4. (d) 5. (c) 6. (c) 7.
Forms
8. T 9. F 10. (d) 11 (d) 12. (b) 13. (c) 14. (d)

REPORTS IN BASE
1.A database ______ is the formatted representation of data in various database objects like tables and
queries.
(a) forms (b) SQL Query
(c) Report (d) None of these

2. To create a report in an interactive manner, _____may be used.


(a) Table Wizard (b) Form Wizard
(c) Reports Tab (d) Report Wizard

3. Which of these can be specified while creating a report in Report Wizard ?


(a)Grouping of data (b) Choosing layout
(c)Sorting of data (d) All of the above (e) None of these

4. _________are an easy way to represent data in a formatted way.

5. You can create reports from one or more tables. True/False

Competency Based Questions


6. Mishi has been asked to bring the details of hardware orders of the past month. The details are stored
in the table Orders.
Mishi simply printed the records of Orders table and showed it to her boss. Her boss is angry and he
simply asked, 'Is this presentable?
What should Mishi do now ?
(a) Mishi should download a beautiful template and paste the records in it to make it presentable and
then take its printout.
(b) Mishi should print a beautiful looking, empty outline paper and then carefully write each record of
the table on this beautiful presentable sheet.
(c) Mishi should create a report with proper headings, labels from the Orders table.
(d) Making table data presentable is not possible.

7. Mishi created the report using Report Wizard and showed it to her boss. Her boss is still not happy.
He said, "the records of same hardware item should appear together; and for each hardware item, its
multiple orders should appear datewise".
What should Mishi do now ?
(a) Mishi should simply say that this is not possible at all.
(b) Mishi should first create a table in the order as specified by the boss and then create a report based
on this new table.
(c) Mishi should add a Group field in the report as ItemID and sort the group on the basis of Order date.
(d) All the above options are equally useful.

LET US REVISE
 A database report is the formatted result of data coming from database objects like tables or
queries.

 Reports are very useful tools for decision-making and analysis.

 In Base, you can create reports easily using Report wizard.

Anwers:
1. (c) 2. (d) 3. (d) 4. Reports
5. T 6. (c) 7. (c)

You might also like