Search This Blog

Sunday 4 April 2021

Computer Science - Paper I - For Class XI (Science Groups) - Model papers With Solved MCQs 2020 -2021

Go To Index
Computer Science - Paper I
For Class XI (Science Group)
Model papers 2020 -2021


Answers Of MCQs:
For answers of MCQs, see below after each page


Answers:
i. Mini Computer
ii. Artificial Intelligence
iii. Remote
iv. ROM
v. Vacuum tubes and Valves
vi. Bus
vii. Arithmetic Logic Unit
viii. Compact Disk - Read Only Memory


Answers:
ix. Primary and secondary memory
x. Dot Matrix
xi. Dots per inch
xii. Protocol
xiii. Bus topology
xiv. LAN
xv. (A+B)(A+C)

xvi. (AB) = A + B
xvii. 
xviii. 
xix. compiler

Answers:
xx. Application software
xxi. Modulation
xxii. Coaxial cable
xxiii. Half duplex
xiv.Asynchronous
xxv. Trojan horse
xxviii. 1024 megabytes
xxix. Spreadsheet


Answers:
xxxii. TCP / IP

xxxv. Extended Binary Coded Decimal Interchange Code
xxxvi. Hard Disk




SOURCE: Board Of Intermediate Education Karachi

Computer Science (New) - For Class IX - UNIT. 6. Web Development s- MCQs, Fill In The Blanks And Abbreviation

GO TO INDEX

Chapter No.6. Web Development
MCQs, Fill In The Blanks And Abbreviation

Multiple Choice Questions (MCQs)


A. Choose the right answer:
1. The service that is responsible for making websites publicly accessible through the internet is called:
a) Web Server
b) Web Hosting ✓
c) Web Site
d) Web Browser

2. The type of special website where different users can ask questions and give answers or discuss on various topics is called:
a) Social site
b) Blogs site
c) Forums site ✓
d) Informational site

3. Entertainment site specializes in delivering:
a) News, weather and current affairs
b) Information about products and services of a business
c) Personal information of a particular person
d) Content like videos, images and games for entertainment ✓

4. A web browser will translate the codes in a web page if the extension of the document is:
a) .html ✓
b) .txt
c) .doc
d) .pdf

5. The tag used to automatically add line space before and after the containing text is:
a) <br>
b) <hr>
c) <p> ✓
d) <pre>

6. The type of list which shows its items in a numerically ordered sequence is:
a) Nested List
b) Unordered List
c) Ordered List ✓
d) Description List

7. To create a clickable text which navigates to another page or section, we use:
a) <input> tag
b) <li> tag
c) <b> tag
d) <a> tag ✓

8. To differentiate the heading cells from rest of the data in a table, we use:
a) <th> tag ✓
b) <tr> tag
c) <td> tag
d) <dt> tag

9. The tag used to define the title caption of the web browser is:
a) <thead>
b) <head>
c) <title> ✓
d) <h1>

10. The attribute used to define the URL for reference of image in <img> tag is:
a) target
b) name
c) src ✓
d) href

11. A website can be located through a:
(a) http://
(b) URL ✓
(c) www
(d) hyperlinks

12. URL stands for:
(a) Universal Resource Locator
(b) Universal Resource Location
(c) Uniform Resource Locator ✓
(d) Uniform Resource Location

13. A software application for accessing websites on the world wide web is:
(a) web browser ✓
(b) search engine
(c) web server
(d) web hosting

14. URL has:
(a) two components ✓
(b) three components
(c) four components
(d) five components

15. A web-based tool that enables a user to locate information on the web is called:
(a) web browser
(b) search engine ✓
(c) web server
(d) web hosting

16. A web page that serves as the starting point of the website is:
(a) homepage
(b) landing page
(c) Both 'a' & 'b' ✓
(d) None of them

17. It is a service that allows a web developer to make a website publicly accessible through the internet.
(a) web browser
(b) search engine
(c) web server
(d) web hosting ✓

18. A website that provides a single access point of information for all of its users is called:
(a) Portal ✓
(b) blog
(c) forums
(d) hypertext

19. Yahoo and MSN are common examples of web:
(a) hypertext
(b) forums
(c) blogs
(d) portals ✓

20. It is a special type of website that is composed of articles and posts.
(a) portal
(b) blog ✓
(c) forums
(d) hypertext

21. Wordpress is popular:
(a) search engine
(b) web forum
(c) blog site ✓
(d) web portal

22. It is an online place where different users can discuss about any topic.
(a) portal
(b) blog
(c) forums ✓
(d) hypertext

23. This tag is used to define additional information about the web page.
(a) <body>
(b) <title>
(c) <head> ✓
(d) <hr>

24. The main content of the web page is contained between:
(a) <body> ✓
(b) <title>
(c) <head>
(d) <hr>

25. It draws a horizontal line where it is defined. It is used to differentiate between sections of the page.
(a) <pre>
(b) <p>
(c) <br>
(d) <hr> ✓

26. An unordered list is defined by:
(a) <pre> tag
(b) <ul> tag ✓
(c) <li> tag
(d) <ol> tag

27. An ordered list is defined by:
(a) <pre> tag
(b) <ul> tag
(c) <li> tag
(d) <ol> tag ✓

28. A hyperlink in HTML is defined by:
(a) <a> tag ✓
(b) <img> tag
(c) <dt> tag
(d) <li> tag

29. The codes used in HTML are called:
(a) heads
(b) labels
(c) tags ✓
(d) sections

30. It defines the layout to display different frames and their contents:
(a) Frame
(b) Framesets ✓
(c) src
(d) align

31. A webpage is a document commonly written in _____.
a) WWW
b) HTML ✓
c) URL
d) RGB

32. Microsoft Internet Explorer, Google Chrome, Mozilla Firefox, and Safari, etc are examples of ____:
a) website
b) web browser ✓
c) web server
d) web hosting

33. It is the address of a resource on the internet.
a) WWW
b) HTML
c) URL ✓
d) RGB

34. Google, Yahoo, and Bing are most popular ______.
a) web browser
b) search engine ✓
c) web sites
d) web server

35. sabaq.pk, khan academy.org, etc. are examples of _________ websites.
a) News
b) Informational
c) Educational ✓
d) Entertainment

36. www.psx.com.pk is the website of Pakistan Stock Exchange, and is example of ______ website.
a) Social
b) Business ✓
c) News
d) Informational

37. Youtube is widely used for:
a) Entertainment ✓
b) Videos
c) News
d) Informations

38. Facebook and Twitter are instances or examples of _______ websites.
a) Entertainment
b) Social networking ✓
c) Business
d) Informations

39. A simple text editor like notepad can be used to start coding HTML for a web page.
a) notepad
b) web page ✓
c) wordpress
d) google

40. HTML tags such as are ____ tags.
a) empty ✓
b) opening
c) closing
d) attribute

41. All HTML documents must start with this tag.
a) <!DOCTYPE html> ✓
b) <html>
c) <hesd>
d) <body>

42. It defines the ______ for a web page. e.g. “Copyright 2020. All rights reserved.”
a) body
b) title
c) header
d) footer ✓

43. The <img> tag contains ____ attributes out of which two are required and three are optional.
a) three
b) four
c) five ✓
d) six

Fill In The Blanks

1.Development of web sites and online applications is called web development.
2. A complete web application may consist of a User Interface, Back-End Server Codes and
a Database.
3. The word world wide web (www) is commonly known as the web.
4. URL is the format in which external resources like web pages, images, other media and supporting files are referenced.
5. Portal, News, Informational, Educational, Personal, Business, Blogs, Forums, Entertainment and Social are examples of different types of specialized websites.
6. HTML is the language in which web pages are coded.
7. A simple text editor like notepad can be used to start coding HTML for a web page.
8. An HTML file must be of .htm or .html extension.
9. A web browser is used to view HTML pages.
10. The codes used in HTML are called tags and are denoted by angular brackets (< > ).
11. There are three kinds of HTML lists namely unordered list, ordered list and description list.
12. Unordered lists display the list of items in which the sequential order of its items does not matter.
13. Ordered lists display the items in numerically ordered sequence.
14. Description Lists are less commonly used and are used to define terms and their descriptions such as in a dictionary.
15. HTML lists can be nested into one another.
16. HTML pages can make use of images to decorate and provide greater meaning to their content.
17. HTML elements are the building blocks of HTML pages.
18. Hyperlinks provide means of navigation from one page to another or from one section in a page to another within the same page.
19. HTML tables can be used to display data, information or content in a tabular format.
20. Tables organize the content into rows and columns.
21. HTML Frames can be used to display the entire contents of another web page within a web page.
22. The coordinating place of a row with a column is called a cell.
23. A row is the collection of all horizontal cells of a table.
24. A row is defined by <tr> tag which is placed inside the <table> tag.
25. A column is the collection of all vertical cells of a table.
26. A column is defined by <td> tag which is placed inside the <tr> row tag of the <table> tag.
27. colspan specifies the number of columns a cell should merge into.
28. rowspan sets the number of rows a cell should merge into.
29. Microsoft FrontPage, Coral Draw, Adobe Dreamweaver, Wordpress, Microsoft Visual Studio, Wix, Figma, CoffeeCup HTML Editor, Adobe XD are the examples of website development tools or website designing tools.

Abbreviations

  • www: world-wide web
  • HTML: Hypertext Markup Language
  • URL: Uniform Resource Locator
  • RGB: Red, Green and Blue

Refence links Given In Text Book





Friday 2 April 2021

Computer Science (New) - For Class IX - 7 - Introduction to Database System - Text Book Exercise And Activity

GO TO INDEX

Chapter No.3 - Office Automation
Short Questions Answers And Text Book Exercise

Text Book Exercise

B. Respond the following:

1. Why Database Management System is preferred over Flat File System?
Ans: Advantages of Database Management System over the Flat File System

S.No.Database Management SystemFlat File System
1. Multiple users can access data simultaneously. Only one user can access at a time.
2. Capable of handling huge sets of data. Suitable only for smaller sets of data.
3. Allows non-duplication and integrity. Increases duplicate and redundant data.
4. Supports online access. Does not support remote connections.
5. Good for small, medium and large businesses. Limited only to smaller data management needs.


2. Discuss the use of databases in business with example.
Ans: Use of Database in Business:
A database is very useful in the business industry because database used to:
  • Keep track of basic transactions
  • Provide information that will help the company run the business more efficiently
  • Help managers and employees make better decisions

Small and large businesses run on databases:
  • Databases can be small in size with a few records or very large. It plays a leading role to enhance the efficiency and performance of any organization.
  • Database can store data and organized information virtually and deliver all informations with a click of a mouse.
  • Business databases help business owners organize and track their customers, inventory and employees.

Example:
1) Customer Relationship Management:
  • A customer relationship management (CRM) database can help a small business manage the lifeblood of its business and its customers.
  • A CRM database organizes all the information, a company has about its accounts, contacts, leads and opportunities.
  • A single customer's record may include his contact details, the date and amount of his last order, the total amount of his purchases for the last year, a list of his favorite products and the products he returned, details of customer service calls and more.
  • Databases can also be used to manage marketing and promotions, to export email addresses and to prepare shipping labels.

OR

2) Payroll and Scheduling Database:
  • Using a database to manage employee information can simplify scheduling and help prevent payroll errors.
  • An employee database contains such fields as hourly wage, salary or commission, tax withholding rates, year-to-date income and accrued vacation time.
  • Other employee benefits, such as health insurance and retirement account contributions, can also be recorded in a database.
  • Two or more databases can be linked to each other to create an association between a sales representative in the personnel database and the accounts she is responsible for in the CRM database.

OR

3) Business Data Analysis:
  • The strong reporting features of databases make them useful resources for analyzing data and predicting future trends.
  • For example, a productivity report might show that productivity slows so much on the Friday afternoons before a three-day holiday weekend that you may as well just let the staff go early on those days.
  • A sales promotion effectiveness report might show that sales of certain products increased after an email promotion while sales of other products increased after an in-store promotion. Customer behavior is predictable, and a database can help you anticipate and fulfill your customers' needs.

3. What is the difference between Design View and Datasheet View?
Ans: Difference Between Design View and Datasheet View:

S.No.Design ViewDatasheet View
1. Design view shows the field and their types and other properties, but not the data..  Datasheet view shows the data in the database.
2. Design view allows user to create or change the table, form, or other database object, and configure the fields. Design view helps in modifing the database  Datasheet view also allows user 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).


4. Why is it important to carefully decide the data type for each field?
Ans: It is important to carefully decide the data type for each field because:
  • A data type determines the kind and range of  data that can be stored in a given database table (field or column).
  • Every field in a table has properties and these properties define the characteristics and behaviour of the field.
  • The data type also determines the kind and values that user can store in any given field.
  • Each field consisting of only a single data type and has its own range of values.
  • User can also use data type to define variables and store procedure input and output parameters.
  • User must select a data type for each column or variable appropriate for the data stored in that column or variable.
  • In addition, user must consider storage requirements and choose data types that allows for efficient storage.
  • Choosing the right data for tables, stored procedures, and variables not only improves user performance by ensuring a correct execution plan, but it also improves data integrity by ensuring that the correct data is stored with in a database.
  • Ms Access supports differnt types of data, each with a specific purpose. Most common are numeric, date/time, text, boolean.
  • For example:
    (a) If a field should only store a whole number, declaring it as an INTEGER, it prevents user from writing any contrary string into it. The data types of the fields also affect what operators and functions we can apply to them in queries.
    (b) We can take a substring of a string or convert a string to UPPER CASE, but we can't do either or those with a number. On the other hand, we can do arithmetic with numbers (add them, multipy them, etc), calculate the average, and so on.
  • The data type is also important when we ask the database to sort our result set. If we sort by a numeric column, it will sort numericalIy (smallest number first, or largest first if we specified that it should sort descending). If we sort by a string column, it will sort asciibetically (character by character, with numbers coming before letters, like "apple", "banana", "carrot", this can give us surprising and usually unhelpful results for strings containing numbers, since "9" sorts after " 152 because '1' < '9').

5. What is the difference between table and view?
Ans: Difference Between Table And View

S.No.TableView
1. It is a collection of data elements organized in shape of rows and columns. Views are treated as a virtual/logical table used to view or manipulate parts of the table.
2. Table is a physical entity that means data is actually stored in the table. Views do not store data. It maintains the security of data and ensure that no changes occur in the original data..
3. It is used to store the data. It is used to extract data from the table.
4. It is an independent data object. It depends on the table. Therefore we cannot create a view without using tables.
5. It is not an easy task to replace the table directly because of its physical storage. It is an easy task to replace the view and recreate it whenever needs.
6. It occupies space on the systems. It does not occupy space on the systems.


6. Explain entities, attributes and relationships with one example of each.
Ans: 1. Entity:
  • In literal sense, an entity is any individual object which has its own qualities and properties.
  • In database terms, an entity is an independent table and its fields are known as attributes.
  • For example:
    A Payroll database will contain an entity named Employees.

2. Field Or Attributes:
  • Fields are also called attributes or columns.
  • It is the smallest component in a database.
  • It is where the actual data is stored during data entry.
  • All data fields in the same table, have unique names.
  • Multiple fields make up a data record, several data records make up a data table, and several data tables make up a database.
  • For Example:
    The Employees entity will contain various attributes like EmployeeID, Name, Designation, Salary, etc.

3. Relationship:
  • When the database structures grew and became more complex, a lot of data started to become redundant which means that data was being unnecessarily duplicated.
  • This created a need to connect data entities instead of repeating same data in multiple tables.
  • This resulted in the creation of relationships and Relational Database Management Systems (RDBMS).
Definition:
A relationship defines the connection between two tables. It creates a connection from an attribute of one entity with an attribute of another entity.
Types:
Three types of relationships can be defined between entities:
(i) One to One Relationship:
  • This type of relationship defines that a record in one entity can be connected to only one record in another entity.
  • This is not a very common type of relationship because the data from related entities can directly be placed in a single entity.
  • However, this type of relationship is used to divide larger entities into smaller ones.
  • Example: Student table is used to store personal information of individual student. It has an Id field and a ClassId field to setup a One-to-One relationship between student and class table.

(ii) One to Many Relationship:
  • This type of relationship defines that a record in one entity can be connected to many records in another entity.
  • This is the most common type of relationship used in relational databases.
  • This relationship can also be seen as Many to One Relationship.
  • Example:
    Teachers and Teacher class tables use to creates a One-to-Many relationship.

(iii) Many to Many Relationship:
  • In this type of relationship, one or more records of one entity are connected to one or more records of another entity.
  • Usually, a third entity known as “junction table” is used to create the many-to-many relationship between two related entities.
  • Example:
    Many teachers can be associated with many classes. This requires a Many-to-Many relationship between Class and Teachers tables.

7. List the major characteristics of primary and foreign keys.
Ans: (1) Primary Key:
  • A primary key is used to uniquely identify a record in an entity.
  • When a primary key is applied to any attribute in an entity, it forces the rules of Primary Key onto that attribute.
  • These rules are:
    (i) The attribute (field) must contain a unique value to identify a record. A unique value means that two records in the same entity cannot have the same value stored in this attribute where Primary Key is applied.
    (ii) The value of the attribute where Primary Key is applied, cannot be null.

(2) Foreign Key:
  • A foreign key is used to define the connection or relation between two entities.
  • The foreign key of one entity is configured to be connected to the primary key of another entity.
  • When a foreign key is applied on an attribute, it enforces that the value for that attribute should match any record in the related entity having a primary key.

8. Write three benefits of using relationships in the database.
Ans: A relationship is an important component of a relational database.
  1. It establishes a connection between a pair of tables that are logically related to each other. A pair of tables is logically related via the data each contains.
  2.  It helps to further refine table structures and minimize redundant data. As we establish a relationship between a pair of tables, we will inevitably make minor modifications to the table structures. These refinements will make the structures more efficient and minimize any redundant data that the tables may contain.
  3. It is the mechanism that enables us to draw data from multiple tables simultaneously.
A properly defined relationship ensures relationship-level integrity, which guarantees that the relationship itself is reliable and sound.

9. Discuss the importance of ERD in business.
Ans: Entity Relationship Diagram (ERD) graphically displays the structure of a database. Following are the importance of Entity-relationship diagram (ERD) in business.
  • Assist the Database Developer:
    The ER Diagram assists the design even before the construction of tables begins.
  • Visualizing Data:
    This helps the users to plan how to organize data. Entity relationship diagramming is functional as a method of better visualizing data. Every manager of a multinational enterprise knows that spreadsheets are pretty much useless when it comes to understanding the overall picture of their entity's operations and how they are structured in relation to each other.ERD takes advantage of the basic learning strategy that's programmed into our minds by extending the programming into compatible and digestible visualizations of the relationships making up our entity.
  • Documentation Tool:
    ER Diagrams can work as a documentation to make others understand the core of the database. Software applications that diagram entity relationships are meant to make those relationships come to life on the screen (and in our mind), thus making them much easier to understand.
  • Logic of the database:
    It communicates the logical structure of the database to the users. It's only with ERD software that senior management, board and stockholders will be able to assess the whole business and to plot a viable strategy. Basically, an ERD's function is to bring all of that data stored in our servers to life so we can make sense of it.
  • Blueprint:
    An ER Diagram is considered as the blueprint of the database. An ERD tells a story about our entity's current state. It's also an essential part of how we analyze events and plan for the future. So diagramming should not only show what the current state of affairs is, but it should also show the potential ways structures and organizations within an entity can be altered and the potential effects of these changes. For groups that operate with hundreds or thousands of interconnected entities on a multinational scale, without planning, can not make sense.

10. Write any two statements from the following ER Diagram.


Ans:In above diagram,
  • (i) Entities are in rectangular boxes:
    (a) company
    (b) Advertisement
    (c) Candidate
    (d) Interview

  • (ii) Relationships are in Diamond Shape:
    (a) Releases = Company releases Advertisement
    (b) Applies for = Candidate applies for company (job), Candidates applies for advertisement
    (c) Faces = Candidate faces interview
    (d) Takes = company takes interview

C. Match the columns:

S.No.AS.No.BC
(i) Primary Key (a) Attributes(i), (b)
(ii) Integer data(b) Always unique value in field(ii), (d)
(iii) Relationship(c) Data in plain text form(iii), (c)
(iv) Field(d) Number without decimal point(iv), (a)
(v) View(e) Connection between two tables(v), (f)
(vi)  Flat file system(f) Shows virtual data(vi), (c)
(vii) Entity(g) Table with its own attributes (vii), (g)


Activity

1. Create few tables and practice; adding, updating and deleting records in MS Access.
Ans:

2. Create a table in MS Access by importing Excel Sheet. Examine the data type of each eld after importing. Make changes in data types where it is required.
Ans:

3. Create different views to show data from two tables.
Ans:

4. In supervision of your teacher, draw a simple ERD on paper and implement that in MS Access. Your ERD should include at least three entities, list of attributes of each table, proper data type assignment for each eld, implementation of primary and foreign keys and simple relationships between entities.
Ans:

More Short Questions Answers

Q. :Differentiate between flat file system and database system?
Ans: Difference Between Fat File System and Database System
S.No.Fat File systemDatabase System
1. A database is an electronic system that stores data in organized form and is composed of tables which contains records and fields. Flat file system is limited to simple rows and columns, like a spreadsheet.
2. Most databases contain multiple tables. It stores data in a single table structure.
3. Each of the tables in database, has different fields that are relevant to the information stored in the table. Flat file databases are usually in plain text format, with only one record per line and are separated using delimiters such as tabs or commas.
4. Generally, a database is an electronic system that facilitates easy access, manipulation and updating of data. A flat file is the older version of database and easy access, manipulation and updating of data are not possible.
5. Example: NADRA (National Database Registration Authority) databases Example: Excel spreadsheet


Q. : Differentiate between database and database management system (DBMS).
Ans: Difference between Database and DBMS
S.No.DatabaseDBMS
1. A collection of related pieces of data, whose purpose is to solve the data management needs of an institution is called a Database. DBMS are very complex software which save the data on the secondary storage devices and which are used to manipulate databases.
2. A Database is a collection of related data organised in a way that data can be easily accessed, managed and updated. DBMS provides us with an interface or a tool, to perform various operations like creating database, storing data in it, updating data, creating tables in the database and a lot more.
3. Database can be software based or hardware based, with one sole purpose, storing data. A DBMS is a software that allows creation, definition and manipulation of database, allowing users to store, process and analyse data easily.
4. very less information can be modified at a time. a lot of information can be changed at one time (as it can have many users using it at the same time).
5. As databases can be handled manually, the retrieval of information can be very slow. The retrieval of information is very quick.
6. The databases do not ensure that the data will be available after failure arises. DBMS ensures that the data will always be available even after system failures.
7. Example: General store database, NADRA data base Example: MySql, Oracle, SQL Server, IBM DB2, PostgreSQL, Amazon SimpleDB (cloud based) etc.




Wednesday 31 March 2021

Computer Science (New) - For Class IX - UNIT. 7 - Introduction to Database System - Short and Descriptive Questions Answers

GO TO INDEX

Chapter No.7 - Introduction to Database System
Short and Descriptive Questions Answers


Q.1: Define term database system?
Ans: DATABASE:
Definition:
  • A database stores data in organized form.
  • Generally, a database is an electronic system that facilitates easy access, manipulation and updating of data.
  • A database is composed of tables which contain rows and columns.
  • These rows and columns are called records and fields respectively.
  • Most databases contain multiple tables.

For example:
A general store database may include tables for purchase, sales and stock records. Each of these tables has different fields that are relevant to the information stored in the table.

Q.2: Define terms records and fields?
Ans: A database is composed of tables which contain rows and columns.
  • Records: These rows are called records, and
  • Fields: These columns are called records.

Q.3: Describe use and advantages of database?
Ans: Use of Database:
  • Nowadays, everyone is familiar with term database, it is mathematically developed data structure which converts raw input data into meaningful information for a particular organization.
  • These days, database can be seen in every field of life, for example:
    in industries
    health
    agriculture
    schooling
    business and
    banking
  • The databases can be developed according to the size of its records for a particular organization.
  • Databases can be small in size with a few records or very large like:
    NADRA (National Database Registration Authority) databases which keep the multi millions of records.

Advantages Of Database:
  • A database is playing a leading role to enhance the efficiency and performance of any organization.
  • The goal of database is to minimize the loss and increase the productivity and efficiency of any organization in the age of information technology.

Q.4: Describe database management system and name some popular DBMS?
Ans: Database Management System (DBMS):
  • Databases are usually developed, maintained and controlled by the Database Management System (DBMS).
  • The DBMS essentially serves as an interface between databases and end users or application programs, ensuring that data is consistently organized and remains easily accessible.

Examples:
Here are some examples of popular DBMSs used these days:
  • MySql
  • Oracle
  • Microsoft SQL Server
  • MongoDB
  • Visual Foxpro
  • IBM Db2
  • PostgreSQL


Q.5: Define terms flat file system?
Ans: Flat File System
Early databases were relatively "flat", which means they were limited to simple rows and columns, like a spreadsheet. A flat file is the older version of database. It stores data in a single table structure. Flat file databases are usually in plain text format, with only one record per line. The fields included in the record are separated using delimiters such as tabs or commas.
Example: Excel spreadsheet.

Q.6: Discuss the advantages of database system over flat file system? OR Why Database Management System is preferred over Flat File System?
Ans: Advantages of Database Management System over the Flat File System

S.No.Database Management SystemFlat File System
1. Multiple users can access data simultaneously. Only one user can access at a time.
2. Capable of handling huge sets of data. Suitable only for smaller sets of data.
3. Allows non-duplication and integrity. Increases duplicate and redundant data.
4. Supports online access. Does not support remote connections.
5. Good for small, medium and large businesses. Limited only to smaller data management needs.


Q.7 : Describe the characteristics of database management system?
Ans: Characteristics of Database Management System
A DBMS is modern version of database designing, organization and manipulation. This mainly offers the solutions which a flat file system could not provide. The DBMS has many characteristics. Some of them are:
  1. Support Multiple user and Concurrent Access:
    Multiple users can access DBMS and can view, add, edit and delete records.
  2. Query Language: 
    QA DBMS offers tools like Queries, Views and Forms which help users to manipulate data easily and more efficiently.
  3. Security:
    A DBMS is more secure and reliable.
  4. Data Store In Tables:
    DBMS allows distribution of data in multiple tables by making use of features like keys and relationships between fields of those tables.
  5.  Reduced Redundancy:
    This allows lesser duplication of data and results in lesser redundancy.
  6. Transactions:
    Preparing backups and providing limited permissions to the users are features of DBMS.
  7. Data Consistency:
    DBMS can handle large and complex data more conveniently. Therefore, it is preferred by the medium and large organizations.

Q.8: Define and describe basic components of database?
Ans: BASIC COMPONENTS OF DBMS
The basic components of DBMS are:
  • Table
  • Field
  • Record
  • Data Types
  • Views

(i) Table:
  • It is a collection of data elements organized in shape of rows and columns.
  • Example:
    (i) A contact list may be one of the simplest examples of a table.
    (ii) The marks record prepared by a class teacher is also an example of a table.

(ii) Field:
  • It is the smallest component in a database.
  • It is where the actual data is stored during data entry.
  • All data fields in the same table, have unique names.
  • Fields are also called attributes or columns.
  • Multiple fields make up a data record, several data records make up a data table, and several data tables make up a database.

(iii) Record:
  • A single entry in a table is called a record.
  • Records are also referred as tuples or rows.
  • A record is made up of two or several data items which are also called tuples in a table representing a set of related data.
  • For example, the illustrated Student table has 4 tuples /records/rows.

Components Of Tables

(iv) Data Types:
  • All fields in a table must have some data type.
  • Data type is a data storage format that can contain a specific type or range of values.
  • The data type of a field is a property that tells what kind of data that eld can hold.
  • Different DBMSs offer different range of data types to be stored.
  • Here are some basic data types:

Data TypeDescriptionExamples
Integer Holds only whole numbers.145, -35, 74586
Floating Point Holds numbers with decimal points.5.6, 3.14, 554.9
Character Stores only one character.A, B, c, d
String Can store a combination of numbers, letters and special characters.Pakistan, Computer, @admin
Boolean Can hold only Boolean values i.e. true or false.1,0
Date And Time Stores date and time in specified format.01-01-2020 11:30


For example:
  • MS Access allows a range of whole numbers from -32768 to 32767 for an “Integer”.
  • In modern DBMS, choosing proper data type is important to make sure that database runs faster.

(v) Views:
  • In a database the data is stored in tables. However, we can see that data through views.
  • Views do not store data and just show the information virtually.
  • They have the ability to fetch data from different tables.
  • Views maintain the security of data and ensure that no changes occur in the original data.

Q.9: Describe the steps for creating tables and views in MS Access?
Ans: Create Tables and Views in MS Access.
(i) Steps for creating a table using Design View:
1. To create tables in Access using “Design View,” click on the Create tab and click on the Table icon. Then pull down the View menu and choose Design View.


2. A new table then appears in the Table Design View. Note that the default name assigned to the table is Table 1.
3. Type the name of a field into the “Field Name” column.
4. Then use the drop-down menu in the “Data Type” column to assign the field a data type.
5. If desired, type a description of the data stored in this field.


6. Repeat steps 4 and 5 until you have created all of the necessary table fields.
An example of a Table may be customer Table that has following entries.

Field NameData TypeDescription
Customer IDNumber The Unique Identier for a customer
First NameText The First Name of the customer
Last NameText The Last Name of the customer
AddressText The Address of the customer


7. Click the “Save” button in the Quick Access toolbar.
8. Then type a name for the newly created table and click “OK”.


(ii) Steps for creating a query or view using Design View:
1. To make a query in design view, click on the “Create” tab in the Ribbon and pull down the “Queries” group and click on “Query Design” button.
2. In the “Show Table” dialog box, add the table or tables that you want to add to query design view.
3. Next, add the fields from these tables that you want to view in your query results or view. If you want to add all of the fields of a table into your result set, you can click and drag the first field in the table, shown as an asterisk.
4. Once you have added all the necessary tables and fields to the query or view, click the “Close” button in the “Show Table” dialog box to close it and display the query design view.
5. To run a query and view the result set, you can click the “Run” button in the “Results” group of the “Design” tab in the “Query Tools” contextual tab on the office Ribbon.
6. The result set looks like a table. This result set is a reflection of data from the selected fields of the tables. It is also known as a view.
7. Click the “Save” button in the Quick Access toolbar. Type a name for your view and click “OK” to save the query.


Q.10: What is Data modelling? Name its important components?
Ans: Data Modeling:
Data modeling is a process of developing conceptual representation of data objects and their relations.

Uses Of Data Modeling:
  • Data models are used to express how the information will be stored in database. This helps to identify the most important fields and remove the irrelevant data.
  • Data models can be used by database developers to create a physical database. This saves a lot of time and efforts of developers.

Components Of Data Models:
There are three most important components of data models.
  1. Entity
  2. Relationship
  3. Referential Keys

(1) Entity:
  • In literal sense, an entity is any individual object which has its own qualities and properties.
  • In database terms, an entity is an independent table and its fields are known as attributes.
  • Example:
    As an example, a Payroll database will contain an entity named Employees. The Employees entity will contain various attributes like EmployeeID, Name, Designation, Salary, etc.

(2) Relationship:
  • When the database structures grew and became more complex, a lot of data started to become redundant which means that data was being unnecessarily duplicated. This created a need to connect data entities instead of repeating same data in multiple tables. This resulted in the creation of relationships and Relational Database Management Systems (RDBMS).
  • Definition:
    "A relationship denes the connection between two tables. It creates a connection from an attribute of one entity with an attribute of another entity."

Types Of Relationship:
Three types of relationships can be dened between entities.
  1. One to One Relationship
  2. One to Many Relationship
  3. Many to Many Relationship

(i) One to One Relationship:
  • This type of relationship defines that a record in one entity can be connected to only one record in another entity.
  • This is not a very common type of relationship because the data from related entities can directly be placed in a single entity.
  • However, this type of relationship is used to divide larger entities into smaller ones.

(ii) One to Many Relationship:
  • This type of relationship defines that a record in one entity can be connected to many records in another entity.
  • This is the most common type of relationship used in relational databases.
  • This relationship can also be seen as Many to One Relationship.

(iii) Many to Many Relationship:
  • In this type of relationship, one or more records of one entity are connected to one or more records of another entity.
  • Usually, a third entity known as “junction table” is used to create the many-to-many relationship between two related entities.

(3) Referential Keys:
  • The relationships are configured by using referential keys on entities.
  • The keys determine a certain set of rules that must be followed by the data stored in a field of an entity. In larger databases, keys are very important to uniquely identify a specific record.

Types Of Keys:
Two types of keys are most commonly used in RDBMSs:
(i) Primary Key
  • A primary key is used to uniquely identify a record in an entity.
  • When a primary key is applied to any attribute in an entity, it forces the rules of Primary Key onto that attribute.
  • Rules of Primary Key:
    These rules are:
    The attribute (field) must contain a unique value to identify a record. A unique value means that two records in the same entity cannot have the same value stored in this attribute where Primary Key is applied.
    The value of the attribute where Primary Key is applied, cannot be null.

(ii) Foreign Key:
  • A foreign key is used to define the connection or relation between two entities.
  • The foreign key of one entity is configured to be connected to the primary key of another entity.
  • When a foreign key is applied on an attribute, it enforces that the value for that attribute should match any record in the related entity having a primary key.

Q.11: Explain with example to better understand relationship and referential keys?
Ans: Understanding relationship and referential keys:
Students Table:
  • Students table is used to store personal information of individual student.
  • It has an Id field set as a Primary Key.
  • It also has a ClassId field to setup a One-to-One foreign key relationship with the Class table.

Class Table:
  • Class table is used to store information about classrooms in a school.
  • It has an Id field set as a Primary Key.
  • A student can be enrolled in only one class; hence, Students table has a One-to-One relationship with Class table.
  • However, many teachers can be associated with many classes. This requires a Many-to-Many relationship between Class and Teachers tables.

Teachers Table:
  • Teachers table is used to store personal information about a teacher.
  • It has an Id field set as a Primary Key.
  • Many classes can be taught by many teachers. This requires a Many-to-Many relationship between Teachers and Class tables.

Teachers Class table:
  • Teachers class table is used as a junction table to facilitate the Many-to-Many relationship between Teacher and Class tables.
  • It also contains an Id field set as Primary Key.
  • The other two fields are used to define which teachers are associated with which classes.
  • It creates a One-to-Many relationship with each of the two connected tables.
  • Teachers and Class tables use their Teachers Class Id field's foreign key relationship to fetch the related information from this table.
Entity Relationship

Q.12: Define term ER model or Entity Relationship Diagram (ERD). Describe the components of ER diagram and Design ER model for a database in M.S Access?
Ans: Entity Relationship or ER Model:
Entity Relationship Model (ERM) or Entity Relationship Diagram (ERD) describes the entities, attributes and relationships with their types in a simplified diagram.

Uses OF ER model:
  • This model or diagram can itself be used as the reference for designing an actual database.
  • It can even be used as a backup for the structure of a database.
  • ERD Used in Two Ways:
    The ERD can be used in two ways:
    (i) When the database has not been created yet. The ERD helps in creating a clear representation of the entire database based on user requirements.
    (ii) When an existing database needs to be documented. The Database development tool features automatic creation of ERD based on existing database which facilitates documentation.

Components of ER Diagram:
  • ER Design is made up of different components like Attributes, Relationships, etc.
  • There are defined symbols and shapes to represent each one of them.
  • Some of the shapes used to define these components are:
    (a) Rectangle
    (b) Ellipse
    (c) Diamond
    (d) Connecting lines


Steps to design ER Model:
  1. Identify and design the entities based on the requirements of its users.
  2. Identify and design the attributes within the required entities.
  3. Identify the relationships required between entities.
  4. Define Primary Keys in interrelated entities.
  5. Design Foreign Key relationships based on requirements and bind them to previously created Primary Keys.
  6. Generate an automated Entity Relationship Diagram.
For example:
A sample ERD for the statement “A writer creates a novel and consumer buys novel” is discussed below.
Here in this example, diagram shows that:

Entities are in rectangular Box:
  1. Writer
  2. Consumer
  3. Novel

Relationships are in Diamond Shape:
  1. Create
  2. Buys


Tuesday 30 March 2021

Computer Science (New) - For Class IX - UNIT. 7 - Introduction to Database System - MCQs, Fill In The Blanks And Abbreviations

GO TO INDEX

Chapter No.7 - Introduction to Database System
MCQs And Fill In The Blanks

Multiple Choice Questions (MCQs)

A. Choose the right answer.
1. Which of the following Microsoft Office packages is a DBMS?
a) MS- Word
b) MS- Excel
c) MS- Power Point
d) MS- Access ✓

2. The basic limitation of a flat file database is that:
a) It is complicated
b) It stores data in a single file ✓
c) It is very heavy
d) It is not supported on internet

3. In a database table of “Students”, the address of the student will be a:
a) Record
b) Field
c) Entity ✓
d) Data type

4. In a database table of “Students”, the particulars of a single student will be a:
a) Record ✓
b) Field
c) Entity
d) Data type

5. In a relational database, keys are used to create a:
a) Table
b) Fields
c) Records
d) Relationship ✓

6. A field that stores the names of students should be defined as:
a) Integer
b) Float
c) String ✓
d) Boolean

7. A key that allows only unique entries in a field is called:
a) Primary Key ✓
b) Secondary Key
c) Foreign Key
d) Super Key

8. Data Redundancy means:
a) Duplication of Data ✓
b) Variety of Data
c) Size of Data
d) Data Type

9. The relationship that matches one record of an entity with only one record of another entity is called:
a) One-to-One relationship ✓
b) One-to-Many relationship
c) Many-to-One relationship
d) Many-to-Many relationship

10. The shape that is used to represent an attribute in an ERD is:
a) A diamond
b) An octagon
c) A rectangle
d) An ellipse ✓

11. A _______stores data in an organized form.
a) Word Processor
b) Ledger
c) spread sheet
d) database ✓

12. A database is composed of ______ which contain rows and columns.
a) tables ✓
b) charts
c) records
d) fields

13. A database is composed of rows and columns which are called:
a) records and fields respectively. ✓
b) fields and records respectively.
c) cells and records respectively.
d) records and cells respectively.

14. It is a collection of data elements organized in shape of rows and columns:
a) Field
b) Record
c) Table ✓
d) Boolean

15. A contact list is one of the simplest example of a:
a) field
b) table ✓
c) floating point
d) string

16. It is the smallest component in a database:
a) Field ✓
b) Record
c) Table
d) Boolean

17. Multiple fields make up a:
a) row
b) database
c) data table
d) data record ✓

18. Sevral data records make up a:
a) row
b) database
c) data table ✓
d) data record

19. Several data tables make up a:
a) row
b) database ✓
c) data table
d) data record

20. A single entry in a table is called:
a) record ✓
b) database
c) data table
d) data record

21. Floating point data type holds:
a) whole numbers
b) numbers with decimal points ✓
c) a combination of numbers, letters and special characters
d) only true and false

22. String data type can store:
a) whole numbers
b) numbers with decimal points
c) a combination of numbers, letters and special characters ✓
d) only true and false

23. It is process of developing conceptual representation of data objects and their relations.
a) Data handling
b) Data querying
c) Data concepts
d) Data modeling ✓

24. They are used to express how the information will be stored in database.
a) Data query
b) Data models ✓
c) Data concepts
d) Data groups

25. This type of relationship is used to divide larger entities into smaller ones.
a) one - to - one relationship ✓
b) one - to - many relationship
c) many - to - one relationship
d) many - to - many relationship

26. The most common type of relationship used in relational databases is:
a) one - to - one relationship
b) one - to - many relationship ✓
c) many - to - one relationship
d) many - to - many relationship

27. Usually a third entity known as "junction table" is used to create the:
a) one - to - one relationship
b) one - to - many relationship
c) many - to - one relationship
d) many - to - many relationship ✓

28. This shape is used to define an entity in ERD.
a) Rectangle ✓
b) Ellipse
c) Diamond
d) Circle

29. In ERD, relationships are symbolically represented by:
a) rectangle
b) ellipse
c) diamond ✓
d) circle

30. Flat file database usually store data as:
a) numbers
b) plain text ✓
c) symbols
d) Boolean

31. Tick the correct match:
a) Table → Artribute or Column Record → Row or Tuple Field → Entity
b) Table → Attribute or Column Record → Entity Field → Row or Tuple
c) Table → Entity Record → Entity Field → Row or Tuple
d) Table → Entity Record → Row or Tuple Field → Attribute or Column ✓

32. With the help of a junction table, many-to-many relationship is a combination of two:
a) one — to — one relationship
b) one — to — many relationship ✓
c) many — to — one relationship
d) many — to — many relationship

33. In database, relationships make use of:
a) keys ✓
b) fields
c) ERD
d) attibutes

34. A key that defines a relationship between two entities is called:
a) Primary Key
b) Secondary Key
c) Foreign Key ✓
d) Super Key

35. The Components of ERD include:
a) Records, Fields and Keys
b) Records, Attributes and Keys
c) Entities, Relationships and Keys
d) Entities, Attributes and Relationships ✓

36. The marks record prepared by a class teacher is also an example of a table.
a) field
b) table ✓
c) floating point
d) string

37. The data types which holds only whole numbers is called:
a) Boolean
b) Character
c) Floating Point
d) Integer ✓

38. (A, B, c, d) are the examples of the data types called:
a) Boolean
b) Character ✓
c) Floating Point
d) Integer

39. (5.6, 3.14, 554.9) are the examples of the data types called:
a) Boolean
b) Character
c) Floating Point ✓
d) Integer

40. (145, -35, 74586) are the examples of the data types called:
a) Boolean
b) Character
c) Floating Point
d) Integer ✓

41. (1,0) are the example of the data types called:
a) Boolean ✓
b) Character
c) Floating Point
d) Integer

42. (01-01-2020 11:30 ) are the example of the data types called:
a) Boolean
b) Date and Time ✓
c) Floating Point
d) Integer

43. There are three most important components of data models, which are:
a) Entity, Attributes and Relationships
b) Entity, Relationship and Referential Keys ✓
c) Records, Relationship and Referential Keys
d) Entities, Attributes and Referential Keys

Fill In The Blanks

1. Generally, a database is an electronic system that facilitates easy access, manipulation and updating of data.
2. Databases are used in many different organizations and various industries.
3. A Database Management System (DBMS) software allows convenient creation, modification and display of data in a database.
4. The examoles of popular DBMS programs are Microsoft SQL, MySQL, Oracle, etc.
5. The data in a flat file database is limited to rows and columns in a table.
6. Flat file databases usually store data as plain text, with only one record per line.
7. A DBMS can handle huge sets of data and has multi-user support.
8. The fields in a table can be defined as one of the supported data types which best suits the type of data it holds.
9. A Relational DBMS introduces concepts of entities, attributes, relationships and keys.
10. A table is also called an entity.
11. A record is also called row or tuple
. 12. A field is also called an attribute or column.
13. There are essentially two types of relationships: One-to-One relationship and One-to-Many relationship.
14. One-to-One relationship relates a record from one entity to only one record of another entity.
16. Relationships make use of Keys.
17. Two common types of keys are Primary Keys and Foreign Keys.
18. Primary key uniquely identifies records in an entity.
19. Entity Relationship Model (ERM) or Entity Relationship Diagram (ERD) graphically displays the structure of a database.
20. The components of ERD include Entities, Attributes and Relationships.
21. ERDs are used to either design a new database or document an existing one.
22. A flat file stores data in a single table structure.
23. The fields included in the record are separated using delimiters such as tabs or commas.
24. A record is made up of two or several data items which are also called tuples in a table representing a set of related data.
25. Data type is a data storage format that can contain a specific type or range of values.
26. Views do not store data and just show the information virtually.
27. Views have the ability to fetch data from different tables.
28. Views maintain the security of data and ensure that no changes occur in the original data.
29. Data models helps to identify the most important fields and remove the irrelevant data.
30. Data models can be used by database developers to create a physical database.
31. In database terms, an entity is an independent table and its fields are known as attributes.
32. A relationship defines the connection between two tables.
33. Connecting lines show the type of relationship between two entities.

Abbreviations

  • DBMS: Database Management System
  • ER: Entity Relationship
  • ERD: Entity Relationship Diagram
  • ERM: Entity Relationship Model
  • ID: Identity
  • MongoDB: Mongo Data base
  • MySql: My Structured Query Language
  • NADRA: National Database Registration Authority
  • Oracle: Operational Analog Computing and Logistic Equipment
  • RDBMS: Relational Database Management Systems

Reference Links Given in text book