Sie sind auf Seite 1von 10

Database Basics Notes HSSC-II Page # 1

Q 1. Explain The Problems organizations faced in traditional file approach method in processing
information. (LONG Q)

Ans 1)
In traditional management system there are following problems.

 Data redundancy
 Data inconsistency
 Program-data dependence
 Lack of flexibility
 Data was not shareable
 Data insecure

Data redundancy: -
The same data was duplicated in many different files. For example, detail of
a salesperson’s name, address and pay rate might be held on a payroll file for calculating the payroll. The
same data may be held on a file in the Personal Department along with lot of other personal data and in the
Sales Department which has a program to keep track of each salesman’s record and performance.

Data inconsistency: -
When the same items of data are held in several different files, the data has to be updated in each
separate file when it changes. The Payroll Department, for example, may change the commission rates
paid to sales staff but the Sales Department file may fail to update its files and so be producing reports
calculated with out-of-date figures.

Program-data dependence: -
Every computer program in each department has to
specify exactly what data fields constitute a record. Any change to the format of the field, for example, adding a
new field or changing the length of field, means that every program that uses the file has to be changed.

Lack of flexibility: -
In such a system, when information of a non-routine nature is needed, it can take
weeks to assemble the data from the various files and write new program to produce the required reports.

Data was not shareable: -


If one department had data that was required by another department, it
was awkward to obtain it. A second copy of file could be made, but this will soon lead to the problem of
inconsistency. And if the same file was used, it would almost certainly necessary to add extra fields for the new
application. So, that would mean the original program would have to be changed to reflect the new file
structure.

Data insecure: -
In traditional management system there no centralized security system which restricts
users according to their post in organization.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 2

Q 2. Differentiate b/w database & DBMS. (Short Q)

Ans 2)
DATABASE: -
A database is a collection of related files that are usually integrated, linked or cross-
referenced to one and another in such a way that information can be retrieved from several files
simultaneously. Data in database can be of any size and complexity. A database may be generated and
maintained manually or it may be computerized

DBMS: -
DBMS stands for Database Management System. DBMS is a collection of programs that
enables users to create, maintain and manipulate a database. It also allows a user to store and retrieve data
from database files. It Provide user-friendly access & control b/w user and database. Following figure shows
MS Access 2016 which a common example of DBMS.

Q 3. What are the tasks performed by DBA? (Short Q)

Ans 3)
Role of DBA: -
DBA stands for Database Administrator. DBA is a person responsible for supervising the database and the
use of DBMS in an organization. DBA has following responsibilities: -
 Designing the database and enforcing the operational policies and procedure for its use.
 Planning the security measures and backup and restore of database.
Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk
Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 3

 Controlling the privilege and perditions of users


 Allocating passwords to users
 Providing training to new employees about using the database

Q 4. What is relationship? Also explain its types with examples. (P/Short Q) (LONG Q)

Ans 4)

Relationship: -
A relationship is a link or association among entities. relationships are represented
by a diamond symbol connected to related entities. An example is the link b/w dentist and patient; one dentist
has many patients but each patient has only one dentist. Following figure shows relationship b/w entities i.e.

1 N
Dentist see Patient
dentist and patient.

Types of Relationship: -
1. Unary relationships
2. Binary relationships
Unary relationships: -
It exists when an association is maintained within a single entity. It is also known as
a recursive relationship. Following figure shows unary relationship.
Machine
Operator Operates
Machine
Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk
Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 4

Binary relationships: -
It exists when two entities are associated with each other through a relationship.

1 N
Dentist see Patient

Following figure shows binary relationships.


TYPES OF BINARY RELATIONSHIP: -
 One to one
 One to many
 Many to many
ONE-TO-ONE: -
It exists when only one instance of entities is associated with the relationship. Example of
such a relationship include relationship b/w Husband & Wife, Student & School.

1 goes 1
Student School

ONE-TO-MANY: -
It exists when more than one instance of entities is associated with a relationship. Example
of such relationship includes relationship b/w Mother & Children, Customer & Order, Dentist &

1 gives N
Customer Order
Patients.

MANY-TO-MANY: -
0 It exists when more than one instance of entities on the left and more than one instance
on right is associated with the relationship Example of such relationship includes relationship b/wStudent

N Study
N
Student Course
& Course, Film & Film Star, Items & Supplier.

Q 5. Define Following terms. (P/Short Q) (LONG Q)

I. Entity II. Attribute

III. Record IV. Table

V. Primary key VI. Database

VII. Foreign key VIII. Secondary key

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 5

IX. Index X. Data Type

Ans 5)
Entity: -
An entity is a thing of interest to an organization about which data is to be held. Examples of
entity includes Customer, Employees, Stock Items, Supplier.

Attribute: -
An attribute is the property or characteristics of an entity. Examples of Attribute
associated with a Customer include Customer_ID,Customer_Name, Customer_Address.

Records: -
All the information about a person or item is held in records. When records are entered in
table, rows represent records and column represent fields.

Table: -
A database table is a file that contain data about an entity. Table is also called relation in
RDBMS

DATABASE: -
A database is a collection of related files that are usually integrated, linked or cross-
referenced to one and another in such a way that information can be retrieved from several files
simultaneously. Data in database can be of any size and complexity. A database may be generated and
maintained manually or it may be computerized

Primary key: -
Each entity in database must have a unique key field as primary key.

Foreign key: -
A key field used in relationship b/w tables whose value matches to a primary key in
other table is known as Foreign key.

Secondary key: -
If a table often needs to be search on a different field, then required fields can
be defined as secondary key.

Index: -
An index is a list of numerical values which gives the order of the record when they are stored on
a particular field.

Data type: -
Data type is the format in which data is stored in tables, MS Access data includes type
Text, Memo, Numbers, Yes/No, Currency, Date/Time, OLE, Hyperlink, Auto Numbers.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 6

Q 6. Briefly explain database objects.

Ans 6)
The following are main database object use in MS Access. (Short Q)
 Tables
 Forms
 Reports
 Queries

Tables: -
MS Access stores all information of a database in one or more tables. Information stored in
tables is very similar to the MS Excelworksheet.

Forms: -
A form is a window that is used for viewing, modifying or deleting data is stored in tables and
adding new data.

Reports: -
Reports are used to printing information from a database. A report can combine data from
more than one table.

Queries: -
Queriesare used to gatherselected information from database and organize either to show in
reports or for viewing on screen.

Q 7. What is data type? Briefly explain seven data types used in MS Access.

Ans 7)
Data type is the format in which data is stored in tables,
MS Access data includes following data types
1. Text (Short text)
2. Memo (Long text)
3. Numbers
4. Date/Time
5. Currency
6. Auto Numbers.
7. Yes/No
8. OLE
9. Hyperlink

Text/Short text: -
Text fields are most common, so
access science text as the default data type. Text field
can contain as many as 255 characters and you can design it a maximum length less than or equal to 255.
Access assig a default length of 50 characters.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II
HSSC Page # 7

Memo: -
Memo feeds ordinary contains as many as 65535 characters. You use them to provide descriptive
comments. Access displays the contents of memo field in a database view a memo field cannot be a key field.

Number: -
Various numeric data types are available in field properties fan of table design window. you
choose an appropriate data sup type by selecting one of the field size property settings. You specify how to
display the number by setting
tting it format property to one of the formats.

AutoNumber: -
An AutoNumber field is a numeric long integer value that access automatically fill in for
each new record you add to a table. Access can increment the AutoNumber field by 1 ffor each new record or
fill it in the field with a randomly generated number, depending on new value property setting that you choose.
The maximum number of record in a table that can use the AutoNumber field is slightly more than 2 billion.

Yes/No: -
Logical fields in Access use -1 1 for yes true and 0 for no Falls you use the format property to
display yes / no field as yes or no, true or false no on or off or minus one or zero

Currency: -
Currency is a special fixed format with 4 decimal
decimal places design to prevent rounding errors that
would affect accounting operations where the value must match to the penny.

Date/ time: -
Dates and times are stored in a special fixed format. The date is represented by the whole
number portion
on of the date/Time value and the time is represented by the decimal fraction. You control how
access display dates by selecting one of the date /Time format properties.

O L E object: -
OLE object stands for Object Linking and Embedding (OLE, sometimes pronounced /o l j/) is a proprietary
technology developed by Microsoft that allows embedding and linking to documents and other objects.

Hyperlink: -
In computing, a hyperlink, or simply a link, is a reference to data that the reader can directly
follow either by clicking, tapping, or hovering. A hyperlink points to a whole document or to a specific element
within a document. Hypertext is text with hyperlinks. The text
text that is linked from is called anchor text.

Q 8. What are sub data sheets?


A Subdatasheet is lists one or more records from another table which are related to the records of the table
displayed in the datasheet. Typically, the datasheet table is the primary table and the Subdatasheet table is the
related table in the relationship.

Prepared by: Muhammad Usman E


E-mail Us: usman@hi-tech818.tk
Hi-Tech Solutions Website: www.hi-tech818.tk
tech818.tk
Database Basics Notes HSSC-II Page # 8

Q 9. Differentiate b/w sorting and filtering data.

Ans8)
Sorting: -
Sorting is the arrangement of data in ascending or descending order. For Example, if the
data 5,7,3,9,1,4,6,8is sorted in ascending order it will be written as 1,2,3,4,5,6,7,8,9& if the same will be
sorted in descendingorder it will be 9,8,7,6,5,4,3,2,1. ascending order means ordering values in the way that
smallest value written first and greatest value after the smallest while descendingorder means ordering values
in the way that greatest value written first and smallest value after the greatest.
OR
By sorting, you can put a column of information in alphabetical, numerical, or date order. You can sort in
ascending order (alphabetical from A to Z, lowest number to highest number, earliest date to latest date) or
descending order (alphabetical from Z to A, highest number to lowest number, latest date to earliest date).

Filtering: -
You can apply a filter to see only the records you want to see. For example, perhaps your
database contains student’s deferent classes ICS, Engendering, and Medical and you only want to see the
students from ICS. You can filter your data so only ICS students display. Each time you apply a filter to a
column, it replaces any previous filter you applied to that column. For example, if you apply a filter so you only
see students in ICS, and later you apply a filter so you only see students in Engendering, Access clears the
ICS filter and then applies the Engendering filter. You can also apply filters to multiple columns in the same
table.

Q 10. Write down some advantages of forms.

Ans 10)
Working with forms rather, than according data using the data sheet view of a table or query, offers several
Advantages.
1. A Farm allows you to focus on a single record at a time because typically a form displays all the fields
of a single record unlike a data sheet that displays several records but often requires you scroll to see
all the fields for those record
2. You can arrange the controls on a form in a logical manner that makes it easy to read and access the
data.
3. The individual form controls provide many features that facilitate entering or modifying Specific items of
information
4. You can display on an advanced database objects such as Pictures, Animations, sounds and video
clips Form view but not in datasheet view.

Q 11. draw and explain design view of forms.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 9

Ans 11)

Design view allows you to create or change the table, form, or other database object, and configure the fields.
You can also set keys and restrict the values entered here. But you can't change the database data in design
view. Select the design view option to create the form Yourself by adding controls One at a time.

Q 12. Briefly describe types of forms.

Ans 12)
The form wizard can create several types of forms showing field from one or more tables and/or queries. The most
commonly used forms are columnar. Tabular and datasheet forms.

Columnar Form: -
In a columnar form, eachfield appears in a separate line with a label to its left, only
one record is shown on each screen. The wizard fills the first column with a many field as it fit on a single screen, then it
fills the next column with a many field as will fit and so forth. A columnar form is show in Fig.

Tabular Form: -
Tabular

Datasheet Form: -
A

Q 13. What are different layers of reports.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk
Database Basics Notes HSSC-II Page # 10

Ans 12)
Tabular Layout: -
A tabular layout is similar to a spreadsheet. Labels are across the top, and
the data is aligned in columns below the labels. Tabular refers to the table-like appearance of the data. This is
the type of report that Office Access creates when you click Report in the Reports group of the Create tab. The
tabular layout is a good one to use if your report has a relatively small number of fields that you want to display
in a simple list format. The following illustration shows an employee report that was created by using a tabular
layout.

Columnar Layout: -
Columnar layout A Columnar layout resembles a form that you fill
out when you open a bank account or make a purchase from an online retailer. Each piece of data is labeled,
and the fields are Columnar on top of each other. This layout is good for reports that contain too many fields to
display in a tabular format — that is, the width of the columns would exceed the width of the report. The
following illustration shows an employee report that was created by using a Columnar layout.

Q 14. Write Down the sections of forms & Reports.

Ans 13)
Sections Of Sections Of
Forms Reports
Header Report Header
Detail Page Header
Footer Detail
Page Footer
Report Footer

Q 15. Differentiate b/w design view a datasheet view.

Ans 14)
Datasheet view: -
Datasheet view shows the data in the database. It also allows you to
enter and edit the data. It does not let you change the format of the database, other than minor changes (such
as displayed column widths).
Design view: -
Design view allows you to create or change the table, form, or other database
object, and configure the fields. You can also set keys and restrict the values entered here. But you can't
change the database data in design view.
You don't use one or the other exclusively. You constantly switch back and forth between them while designing
your database. Use the View button to do this.

Prepared by: Muhammad Usman E-mail Us: usman@hi-tech818.tk


Hi-Tech Solutions Website: www.hi-tech818.tk

Das könnte Ihnen auch gefallen