Tuesday, August 21, 2012

Advanced Level ICT 2012 Model Questions and Answers

GCE A/L Support Seminar - 2012

Paper I : Duration 2 Hours

Paper II : Duration 3 Hours

By courtesy of Ministry of Education, Sri Lanka

How to Answer MCQs

  • Preparation for an MCQ paper is different from an essay paper. 
  • The MCQs tests a much broader range of the syllabus. 
  • To prepare for MCQs read as widely around a subject as possible.
  • Concentrate less on memorizing hard facts.
  • Understand basic principles and concepts.
  • Try to work on previous MCQ papers to understand the style of the examination. 
  • Some questions may even be repeated in the exam.
  • Always calculate the time available for the test and for each question before the exam
  • Stick to the time strictly. 
  • Do not spend too much time on any single question. 
  • Answer the question using your first impression. 
  • Trust your instincts: your initial guess is most likely to be right.
  • Ask your self what if this answer is wrong. Work backwords.
  • If you don't know the answer, mark it and move on and return to the question at the end.
  • Do your first run through the all questions faster.
  • Do your second run returning to marked questions to give further consideration.
  • When you face a MCQ that you are unsure about make an educated guess.
  • Your understanding of keywords and phrases is vital to maximise your score.

  • Questions with absolute and sweeping statements such as never, always, or exclusively are generally false as  exceptions can be found to virtually any rule. Questions which include the keywords could, possible, or may are more often true than not.

    Unfamiliar information
  • If you find a question with complete unfamiliar information, there is a chance that it could be false.
  • READ the questions well. Careless reading can cost you loss of marks. 
  • If you miss the word 'not' you could end up with wrong answer
  • MCQs can be very tricky. Examiners usually try to trip you up. Be wise to face their plans and strategies.
  • Be carefull and lookout for double negatives (not unfriendly mean friendly).
  • Look for the hints in the question
  • If you don't know the right answer, exclude the wrong ones and compare the one that's left to pick the right answer
  • If more than two answers are correct and if they are not there choose "all of the above"
  • Avoid reading MCQs in the final few days. There is a chance that you will remember the wrong answers. Instead, concentrate on the theory, principals and concepts as they are most interesting and you are more likely to remember them.

  • When a question is hard, 

  • Long and specific answers are correct
  • Choose options in the middle
  • Do not go for absolutes such as "never," "always," "is," "are," "guarantees," "ensures." Such statements are highly restrictive and very difficult to defend. 
  • Do not go for "jargon-filled” options. These are frequently used as decoys. 

  • Go for the longest option! Often to make the answer completely correct and extra clause will be added by the examiner.
  • Go for the middle answer. If the options are 5, 12, 9, 3,2 - go for 9. 
  • Go for the one of the options that look like each other. if the options are 12f, 35f, 16f and 12a. Go for 12a or 12f as examiner is trying to be clever.
  • If you have absolutely no idea of the answer choose option C. 

How to answer structured essay questions

These questions do not try to test your memory. They try to test your ability to present your knowledge in a structured way.

  • Read the question and understand what the examiner want to know?
  • Identify the given factor from the question, explain and elaborate it. 
  • Identify the other factors. Explain and elaborate it. 
  • Give Facts, Make Explainations, Provide Evidences (Examples)
  • Logically structure your answer with related keywords.
  • Structured answers are analytical and require higher order thinking.
  • Understand keywords of the questions. They are to be included in answer.
  • Focus on instructions of the question in your answer.
  • Plan your answer.
  • Recall Facts in the answer.
  • Write down 3 main points.
  • Explain and Elaborate your points in brief with important details.
  • Leave space after each question.
  • Try to remember what you know about a topic.
  • Select what is relevant to the question, organize it and formulate sentences to cexpress the answer.
  • Do the easiest questions first
  • Don’t get stuck in a question.  Move on!
  • Use common sense.
  • Jot down ideas as they come to you.
  • Never omit an entire question.
  • Read the questions slowly. Highlight key points. Ensure you have understood what each question says. 

Meaning of Commonly Used Words in Exams

Briefly Explain Questions

  • Briefly explain questions are designed to test your knowledge of fundamental concepts.
  • "Briefly explain" also means ""outline" or "concisely discuss."  
  • Complete sentences are not necessary, as long as your logic is clear to the examiner.
  • Think before your write! before you put pen to paper.
  • Think about all the key concepts for a question before you begin to write your answer.  
  • Outline the answer first, with a list of key words or phrases
  • Organize your answer in a manner that another student could understand.  
  • Pretend you are explaining the concept to someone in the class, who did not attended the lecture.
  • Use precise and accurate wording.
  • Pack as much information into the answer as possible, but avoid irrelevant information.  
  • The number and accuracy of relevant concepts is more important than the number of words.
  • Use of appropriate vocabulary and concepts.  
  • Write and draw neatly.  Examiners give points for what can be interpreted.
  • Practice with writing briefly explain answers as study habit. 

Analyze: Discuss a topic with cases for and against, or the causes and effects, possible consequences of it.

Compare: Express how two items are alike and and how they are different. Pointout which is more important or useful.

Contrast: Think about the differences. Explain what they are, explain how they are used and judge the relative importance.

Compare and Contrast : How two or more items are alike and how they are different. Explain how they are used and determine the relative importance highlighting advantages and disadvantages.

Define: Explain what it means, using as formal language. If you have learned a definition, use it.

Describe: Say what you know about the topic in a logical order.

Explain: State clearly what is involved, or how something works

Outline: Select only the most important aspects of a topic. Ignore minor details. Write a summary of what's asked.

Identify: Point to the essential part or parts. Explain clearly what is involved.

Significance: Explain the meaning of something and assess how important it is, to whome or under what circumstances

Role: Explain the part that something plays: how it fits in, what it causes, what effects it has or how it interacts with other people or groups.

Discuss: Say what you know about the issue. Give examples. Indicating adavntages and disadvantages

Illustrate: Use examples in in words, statistics, or diagrams.


More ...
Account for: Explain why something happens and give reasons and explain the cause or causes.

Limitations: Show where and when how something will not work, or where it will not work and how
Differentiate between: Explain the differences between the two or more items you are asked about.
State: Put down the main points of the view or argument.
Summarize: Select only the main points of the issue and put them in some logical order.
Comment: Calls for mild criticism and explain under what circumstances it might be done, or possible results of doing it, why it is important.
Criticize: Pointiout faults and disadvantages as you see. Try to support your views with reasons, evidence, or statistics
Distinguish: Explain the differences between the items or propositions.
Evaluate: Decide how good or bad something is.  How important or unimportant something is.You must sum up with an opinion about the issue, because you are being asked to make a judgment.
Implications: Describe the likely results of an action, including hidden ones. Consider the shortterm and long term possibilities.
Relate:Describe carefully or to demonstrate the connection between two or more things .
Validite : Can the statement given be justified by the facts and evidence? To what extent is it true. Are there any limitations and what are they?

Sunday, July 22, 2012

ICT for Development


Information and communication technology (ICT) refers to a wide array of technologies and applications, from more traditional ones such as radio, television, and print media to more sophisticated and newer technologies and applications such as the Internet, information management, e-health and e-business applications.

ICT for Development relates to the use of ICT for development purposes. It involves the integration of ICT into broader development projects such as the delivery of basic education or health care in rural and remote regions in developing countries.
ICT applied and integrated into development can help improve:
  • communication―quick and easy access, dissemination and sharing of information and knowledge
  • productivity―improved efficiency, competitiveness, and responsiveness of institutions, firms, and markets
  • accountability―increased transparency in the governance of private and public institutions as well as in regulatory and policy decision-making processes
  • inclusivity―increased access for poor and marginalized groups to services, information, knowledge, and resources
  • empowerment―greater voice for men and women in public decision-making processes

ICT comprises three principal categories: 

information technologies
―computer hardware, software, and peripherals, and computer literacyICT comprises three principal categories:
telecommunication technologies―telephone systems, radio and television broadcasting, satellites, mobile telephony, and other broadband connectivity

networking technologies―Internet and a broad array of Internet-based applications


Wednesday, July 18, 2012

GCE A/L ICT 2012 - Model Paper

Download Sinhala ICT Model Paper I for 2012

Download English ICT Model Paper  I

What to Expect in 2012

The 2012 Paper will include more
databases, SQL, SSADM,  data communications, Networks and Python

1. Types of Databases and their advantages
2.  Database Normalization, ER & DFDs, 3NF
3. Software Development Life Cycle : Water Fall model with Feedback
4. SQL statements for CREATE, SELECT, UPDATE, DELETE and Joing Tables
5. Know the differences of SSADM , Systems Analysis Techniques
6. Data Communications Mediums and their applications in Telecom, Medicine
5. Sub netting of Class C, B and A
6. How Hosts of Multiple Networks Communicate ? Roles of Switches, Hubs, Routers and Bridges
7. OSI 7 Layer model, TCP/IP protocols and comparisons
8. Python String manipulation functions, Lists, Tuples, Dictionaries and Sets
9. Python syntax's main control structures, comments, indenting
10. Cloud Computing , Memory Management, Ubiquitous computing, Argumented reality

Read Questions Carefully. Beginning to end and end to Begining
Sometimes they ask what is ? and some times what is not? Don't make a mistake.
In each question for MCQ there are at least 3 answers totally wrong. Find them first and eliminate
The last two will be tough to select from, hence refer to your theory knowledge

Good Luck ... 


Model Paper Answer Tips
Frequency division multiplexing (FDM)
The total bandwidth available to the system is divided into a series of non overlapping frequency sub-bands and assigned to each communicating source and user pair. Used in Analog. Modern telephone systems employ digital transmission, in which time-division multiplexing (TDM) is used instead of FDM. 
Stereo FM transmission use FDM

Time-division multiplexing (TDM) 
A digital (rarely analog) multiplexing in which multiple bit streams or signals are transferred simultaneously as sub-channels in one communication channel. But are physically taking turns on the channel sharing time slots. 

Wavelength-division multiplexing (WDM)
Used in fiber-optic communications. Multiplexes a number of optical carrier signals onto a single optical fiber by using 

different wavelengths (i.e. colours) of laser light. This technique enables bidirectional communications over one strand of fiber, as well as multiplication of capacity.

Code Division Multiplexing (CDM) 
allows signals from multiple devices to be transmitted at the same time using one frequency band. This is accomplished 

by using encoding user packets in sharing the channel. The receiver decodes and submit to intended user.

virtual private network (VPN) 
a private computer network that interconnects remote networks using nternet. VPNs provide security through tunneling 

protocols and security procedures such as encryption. A bank uses VPN securely connect the branch offices and ATMs

Voice over IP
 (VoIP, or Voice over Internet Protocol) 
delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks like Internet. (Skype)

General packet radio service (GPRS) 
packet oriented mobile data service on the 2G and 3G cellular communication system's global system for mobile 

communications (GSM). 

Order of Evaluation (Precedence rules) for Python operators. 
All operators except the power (**) operator are evaluated from left to right
They are listed in the table from highest to lowest precedence.
operators included together within subsections, such as x * y, x / y, x // y, and x % y, have equal precedence.


Parentheses ( ... )
innermost level first

**   * / // % + -

Exponents, Multiplication, Division, Addition, Subtraction

Python Lists are mutable
The syntax for accessing the elements of a list is the same as for accessing the characters of a string using the the 

bracket operator. The expression inside the brackets specifies the index. Remember that the indices start at 0:
>>> a=[1,2,3]
print a[0] gives 1
print a [0] gives 4

strings are not mutable
a[0] gives "n"
a[0]="k"  gives an error

a=(1,2,3) is a tuple
a[0]=4 gives an error as tuples are not mutable

think python 

Python sets 
These are unordered collection of objects (mathematical set). They are not indexed like lists and tuples
Sets cannot have duplicate members. Sets also require that all members to be hashable. Any object that can be used as 

a dictionary key can be a set member. Integers, floating point numbers, tuples, and strings are hashable; 
The lists, dictionaries are not hashable

Integer Floating point operations
in python 20/5.0 is not 4 
it is 4.0 as 5.0 is a floating point number 
result get converted to floating point value

Friday, May 4, 2012

Open Systems Interconnection (OSI) Quiz

1. _______ is the protocol suite for the current Internet.

2. _______ are special-interest groups that quickly test, evaluate, and standardize new technologies.
A) Forums
B) Regulatory agencies
C) Standards organizations
D) All of the above

3. This was the first network.

4. Why was the OSI model developed?
A) manufacturers disliked the TCP/IP protocol suite
B) the rate of data transfer was increasing exponentially
C) standards were needed to allow any two systems to communicate
D) none of the above

5. The _______ model shows how the network functions of a computer ought to be organized.

6. The physical layer is concerned with the movement of _______ over the physical medium.
A) programs
B) dialogs
C) protocols
D) bits

7. The OSI model consists of _______ layers.
A) three
B) five
C) seven
D) eight

8. In the OSI model, as a data packet moves from the lower to the upper layers, headers are _______.
A) added
B) removed
C) rearranged
D) modified

9. The physical layer is concerned with the movement of _______ over the physical medium.
A) programs
B) dialogs
C) protocols
D) bits

10. In the OSI model, when data is transmitted from device A to device B, the header from Aís layer 5 is read by Bís _______ layer.
A) physical
B) transport
C) session
D) presentation

11. In the OSI model, which layer functions as a liaison between user support layers and network support layers?
A) network layer
B) physical layer
C) transport layer
D) session layer

12 . In the OSI model, what is the main function of the transport layer?
A) node-to-node delivery
B) process-to-process message delivery
C) synchronization
D) updating and maintenance of routing tables

13. In the OSI model, encryption and decryption are functions of the ________ layer.
A) transport
B) session
C) presentation
D) application

14. In the OSI model, which of the following is an application layer service?
A) network virtual terminal
B) file transfer, access, and management
C) mail service
D) all of the above

15. When a host on network A sends a message to a host on network B, which address does the router look at?
A) port
B) logical
C) physical
D) none of the above

16. To deliver a message to the correct application program running on a host, the _______ address must be consulted.
A) port
C) physical
D) none of the above

17. IPv6 has _______ -bit addresses.
A) 32
B) 64
C) 128
D) variable

18. The ______ layer is responsible for moving frames from one hop (node) to the next.
A) physical
B) data link
C) transport
D) none of the above

19. The ______ layer adds a header to the packet coming from the upper layer that includes the logical addresses of the sender and receiver.
A) physical
B) data link
C) network
D) none of the above

20. The_________ layer is responsible for the delivery of a message from one process to another.
A) physical
B) transport
C) network
D) none of the above

21. The Internetworking Protocol (IP) is a ________ protocol.
A) reliable
B) connection-oriented
C) both a and b
D) none of the above

22. _______ is a process-to-process protocol that adds only port addresses, checksum error control, and length information to the data from the upper layer.
D) none of the above

23. __________ provides full transport layer services to applications.
D) none of the above

24. The ________ address, also known as the link address, is the address of a node as defined by its LAN or WAN.
A) port
B) physical
C) logical
D) none of the above

25. Ethernet uses a ______ physical address that is imprinted on the network interface card (NIC).
A) 32-bit
B) 64-bit
C) 6-byte
D) none of the above

26. Which of the following can be an Ethernet physical address?
A) 01:02:01:2C:4B
B) 07:01:02:01:2C:4B:2C
C) 07:01:02:01:2C:4B
D) none of the above

27. A port address in TCP/IP is ______ bits long.
A) 32
B) 48
C) 16
D) none of the above

28. An IPV4 address is ______ bits long.
A) 32
B) 48
C) 16
D) none of the above

28. An IP address is a ______ address .
A) logical
B) physical
C) imaginary
D) none of the above

29. MAC address is a ______ address embedded in.
A) switches
B) network card
C) router
D) none of the above

30. IP address and mac address is resolved with ______ protocal.
D) none of the above

Thursday, April 26, 2012

Data Representation in OSI 7 Layer model

Study  how each layer sees data  and the role each layer plays in data communication process

Packet framing
A packet consists of two kinds of data: control information and user data (payload). IP packets are composed of a header and payload. The control information provides data the network needs to deliver the user data, (Ex: source and destination addresses, error detection codes, and sequencing information etc). Different communications protocols formats data differently. 

In OSI model, a 'packet' refers to a a data unit at the Network Layer.
In the Data Link Layer data unit is a frame.. 

In the Transport layer it's a segment or data gram.

The term frame is used to refer to a packet at data link layer.

The packets get encapsulated into frames so that they can be transferred over different media to the end destination. It is still the same data with a frame header.They are split up differently due to varying window size.  
A host computer simply arranged the data in the correct packet format, insert the address of the destination host computer, and sent the message to the Message Processor. Once the message was delivered to the destination host, an acknowledgement was delivered to the sending host. If the network could not deliver the message, it would send an error message back to the sending host.

Tuesday, April 24, 2012

Networking Revision

Explain how IP addressing works.
IP addresses are 32-bit addresses written as four octets in dotted-decimal notation, such as To communicate on an IP network, a host also needs a subnet mask, which may look something like

What DHCP and DNS do?
 On TCP/IP networks, the DHCP server can provide IP configuration information to hosts. A DNS server resolves hostnames to IP addresses.

What are bandwidth and latency?
Bandwidth is the amount of data that can go through a device or cable. For example, Category 3 UTP has a maximum bandwidth of 10Mbps whereas the wireless standard 802.11g supports bandwidth of up to 54Mbps. Latency is how much delay there is between sending a data request and receiving a response.

What are status indicators? 
Most network adapters and connectivity devices will have LED lights on them that are status indicators. If there is an active connection, the light will turn on. Many status indicators will blink if traffic is going through that port.

What protocols do? and name common protocols.
Protocols are the language of communication for computers. The most common protocol is TCP/IP. Other protocols you might see are NetBEUI/NetBIOS, IPX/SPX, and AppleTalk.

What is the difference between simplex, full-duplex and half-duplex transmission?
In a full-duplex environment, the devices can talk to each other in both directions at the same time. In half-duplex, only one side can talk at one time and the other side has to wait until the first one is done to send information.

What is the difference between workgroups and domains in a network?A workgroup is often referred to as a peer-to-peer network, and there is no centralized administration. A domain is a server-based network, where the server (often called a domain controller) manages user accounts and security for the network. Workgroups are best suited for networks with 10 or fewer computers and low security requirements.

What are common TCP/IP ports?
A port is a special location in memory where we write and read data in communication.
Some common protocol and ports pairs are  HTTP (80), FTP (21), SMTP (25), POP3 (110), Telnet (23), and HTTPS (443).

What is the difference between a LAN, MAN and WAN? 
A LAN is a local area network, which typically means a network in one centralized location. A WAN is a wide area network, which means several LANs in remote locations connected to each other. MAN is a metropolita area network connecting different places in a city.

What hubs, switches, and routers are?
These are all network connectivity devices. Hubs and switches are used to connect several computers or groups of computers to each other. Routers are more complex devices that are often used to connect network segments or networks to each other. Routers route data packets/frames received from hosts and other routers.

What is  a VPN?
A virtual private network is a network where computers are connected via a WAN connection, but the connection is secured and appears to be a LAN connection.

How to identify Class A, B, and C IP addresses?
Class A addresses will have a first octet in the 1-126 range. B is from 128 to 191, and C is from 192 to 223.

What types of cables are used in networking and the connectors for each?
Common network cables include coaxial, STP, UTP (Category 5/5e and Category 6), and fiber optic. Coax cables use BNC connectors, STP and UTP use RJ-45 connectors, and fiber optic uses SC and ST connectors. (You may also be tested on phone connectors, which are called RJ-11.)

What are the different types of broadband connections?
Broadband connections include DSL, cable, satellite, and fiber optic.

What is required to access the Internet through a dial-up connection?
To use dial-up, you need a modem in your computer, a phone cord, a phone line, and an account with an Internet service provider (ISP).

What are different IEEE 802.11 standards?
Standards you should be familiar with are 802.11a, 802.11b, 802.11g, and 802.11n.

What are the security mechanisms used for wireless networking?
Wireless security mechanisms include WEP, WPA, SSID management, and MAC filtering.

What wireless technologies that are available for data transmissions?
Common wireless technologies are Bluetooth, infrared, Wi-Fi and cellular.

What are common LAN typologies?BUS, Star, Token Ring, Mesh, Hybrid

Tuesday, February 14, 2012

Python Programming for Beginers

Python is a general-purpose, high-level programming language. It's design is emphasized by code readability. Python has a very clear syntax with a large and comprehensive standard library.

Python multiple programming paradigms object-oriented and functional programming styles. It has a dynamic type system and automatic memory management (dynamic languages).
Python is often used as a scripting language, and also used in non-scripting contexts. Using third-party tools, Python code can be packaged into standalone executable programs. Python interpreters are available for many operating systems.

Day 1 Download Python , Installing, Basic Mathwww.python.org under GNU GPL. It was first

Python is FOSS (Free and Open Source Software) available from

Day 2
Variables and ProgramsVariables are containers in memory used by programs to keep run time data, edit them and strore new value. They can be accessed with names assigned to them. Variables have different types numeric, strings and logical are the basic data types.
The program is a rows of programming instructions to the computer to store data, recall data, calculate, perform operations and test certain conditions etc. It can be re used when saved in hard disk and re-loaded to memory to run its task.
Day 3
Strings and their Uses
Day 4
  • Python Programming Tutorial - Raw Input

Day 5Conditions help you compare data to help branching of the programming flow. They make you switch between different instruction paths based on condition.

  • Python Programming Tutorial - else and elif 
    • Python Programming Tutorial -  If Statement

    Day 6
    Comparing numbers, strings and or conditions. Different comparison operators let you compare numbers and conditions during run time to switch to different conditions and options to run different code.

    Day 7Nested Statements and Looping
    You can run code inside another code block to execute different instruction lines. Each nested code are is a code block.
    • Python Programming Tutorial - Nesting Statements
    Day 8LoopingPython lets you run a code block repeated until a certain condition is met. For ...Next and Do .... Loop repetitions can be used in python.

    Day 9Lists and List Functions Python Programming Tutorial - Sequences and Lists Python
    Programming Tutorial - List Slicing

    Lists are like arrays which keeps multiple data items in a single variable. Each data item is referenced by its element id. Consider a list as a container of containers with each container can hold more containers. This is a very strong data structure in python compared to other programming languages. Slicing is getting a desired set of elements from a list. Lists have list processing Functions.

    Day 10 Methods Python Programming Tutorial - Introduction to Methods

    Day 11 Python Programming Tutorial - Sort and Tuples
    Tuples are simple lists. But not editable during run time.

    Day 12 Python Programming Tutorial - Dictionaries
    Dictionaries are lists where element id is a keyword or alphanumeric identifier.
    Day 13
    Files Operations , data Reading and Writing

    Day 14

    Day 15 Functions can have default set of variables called parameters that can be used to pass variable data. Parameters can make functions to act on different Data sets and return results.

    Python Programming Tutorial - Default Parameters

    Day 16 Parameters can have different types and you can pass tuples , lists and dictionaries as paramerters. Python Programming Tutorial - Parameter Types

    Day 17OOP uses objects with properties , and events and methods. OOP helps you create objects and store data as properties. Objects responds to events executing their methods.
    Python Programming Tutorial - Object Oriented Program

    Day 18
    Classes as objects and they can be referenced as Self inside objects.

    Python Programming Tutorial - Classes and Self

    Python Programming Tutorial - Subclasses Superclasses

    Day 19
    Sub classes are created from Classes. Super classes are parents of sub classes. Sub classes created from Super classes can have common as well as different properties, events and methods which help them behave differently.

    Day 20
    In OOP you can override variables in sub classless

    Python Programming Tutorial - Overwrite Variable on Sub

    Day 21Classes can have multiple parents.

    Python Programming Tutorial - Multiple Parent Classes

    Day 22
    Creating Classes and Initializing their properties with data.
    Python Programming Tutorial - Constructors

    Modules are separate programs that can be used in multiple programs as different code units. Much effiecient way than using functions. Help programs to be modular and efficeient. Modules make programming easy and sharable by multiple programmers to provide specific functionality in a program.

    Day 24Python Programming Tutorial - Reload Modules
    Python Programming Tutorial - Getting Module InfoPython Programming Tutorial - Building Functionsfunctions help us develop smaller programs by repeated using a code block as a procedure that can be called as one instruction. Then the code block runs as a re-usable unit of code. Python Programming Tutorial - For and While Loops Data Inputs are two different types in Python. You can input data as numbers or raw. If you enter numeric data as raw you need to convert type to numeric before using in calculations. String  are input as raw. Strings help us keep alphanumeric data as a sequence of characters with varying length.

  • Python Programming Tutorial - More Methods

  • Python Programming Tutorial - Strings n Stuff

  • Python Programming Tutorial - String Methods 

  • Python Programming Tutorial - Infinite Loops and Break

  • Python Programming Tutorial - And and Or

  • developed by Guido van Rossum of Netherlands as a successor to the ABC programming languageas. Python is a object oriented programming language. Python runs on all platforms including mobiles. Python is an interpreter language and also can be used as compiled. Handing numbers and math is important in programming.  Numbers have different types integer, long, double and float etc for different accuracy needs in calculations.

    Thursday, February 9, 2012

    Unified Modeling Language (UML)

    UML is an industry standard modeling language which uses visual diagrams and elements to create software documentation and design. 

    Build detailed UMLmodels.
    Manage project complexity.
    Reverse engineer legacy code and database schema.
    Produce reports.
    Track changes
    Involve the whole design team.

    UML defines following diagrams 
    Package diagrams
    Class or Structural diagrams
    Object diagrams
    Composite Structure
    Component diagrams
    Deployment diagrams
    Use Case Diagrams
    Activity diagrams
    State Machine diagrams
    Communication diagrams
    Sequence diagrams
    Timing diagrams

    UML used in scientific and business worlds. The UML is a tool for specifying software systems. Standardized diagram types to help you describe and visually map a software system's design and structure. UML is independent of target platform. UML is naturally oriented towards Object-Oriented programming.
    The  UML is a tool for defining the structure of a system to manage large, complex systems. Building up libraries of UML Patterns simplifies the re-use of models and code.

    UML defines the notation and semantics for the following domains:

    Use Case Model - Describes boundary and interaction between the system and users. 

    The Interaction Model - describes how objects in the system will interact with each other.

    The State Model - Describe states /conditions of classes change over time. 

    The Class Model - describes the classes and objects 

    The Physical Component Model- describes the software and hardware components

    The Physical Deployment Model - describes the physical architecture and the deployment of components on a hardware architecture.

    Thursday, January 26, 2012

    SQL Training Questions

    1.Which of the following is true?
    a.TRUNCATE TABLE is identical to DELETE statement without WHERE clause and both remove all rows in a table.
    b.TRUNCATE TABLE has to be used along with a WHERE clause
    c.TRUNCATE TABLE deletes table from a database

    2. We refer to a join as a self-join when…
    a. we are joining more than 2 tables
    b. we are joining table to itself.
    c. we are using left and right join together

    3. What does SQL stand for?
    a. Standard Query Language.
    b. Strong Query Language
    c. Strict Query Language
    d. Structured Query Language.

    4. Which of the following SQL statements deletes all rows in table called SalesData?

    a. DELETE FROM SalesData
    b. DELETE SalesData
    c. DELETE ALL SalesData
    d. DELETE * FROM SalesData

    5. If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default:

    a. There is no default value.
    b. DESC
    c. ASC

    6. If you join a table to itself, what kind of join are you using?

    a. You can't join a table to itself.
    b. Selective Join.
    c. Self Join

    7. Can the SELECT clause list have a computed value like in the example below? SELECT CustomerName, UnitPrice * NumberofUnits FROM Sales 

    a. Yes.
    b. No

    8. When inserting data in a table do you always have to specify a list of all column names you are inserting values for?

    a. Yes
    b. No

    9. Which of the following SQL clauses is used to enter data into a SQL table?

    a. WRITE
    b. ENTER
    c. SELECT

    10. Which of the following SQL clauses is used to select data from 2 or more tables?

    a. JOIN
    b. HAVING
    c. WHERE

    11. The FROM SQL clause is used to…
    a. specify search condition
    b. specify what table we are selecting or deleting data from.
    c. specify range for search condition

    12. Can you use both HAVING and WHERE SQL clauses in one SQL statement?
    a. No.
    b. Yes.

    13. Can you join a table to itself?
    a. Yes.
    b. No.

    14. Which of the following 3 SQL statements is correct?

    a. SELECT Username, Password FROM Users
    b. SELECT Username, Password WHERE Username = 'user1'
    c. SELECT Username AND Password FROM Users

    15. What does the ALTER TABLE clause do?

    a. used to delete a database table.
    b. modifies a table definition by altering, adding, or deleting table columns.
    c. used to insert data into database table.
    d. deletes data from database table.

    16. Which SQL keyword is used to retrieve a minimum value?

    a. MIN
    b. DOWN
    c. LOW
    d. LOWER

    Friday, January 6, 2012

    Database Models

    Flat-File  Database Model

    • ideal for small amounts of data
    • human readable or edited by hand
    • good for simple lists
    • more costly in time and processing power
    • data split up using a common delimiter like comma or TAB
    • one line per records
    • very prone to corruption
    • no inherent locking mechanisms

    Relational Database Model

    • MySQL, Microsoft SQL Server ,  Oracle, Access , Portgress SQL 
    • Tables represent real world objects, 
    • each field is an attribute of the object
    • table - students
    • field - firstname. lastname, Class, Age, Village
    • record- Nimal, Perera, 12A, 17, Penideniya

    • tables can be linked to each other (students --> subjects  , subjects > teachers,  students ---> marks <----Subjects <---- Teachers
    • databases designed efficiently
    • no duplication of any data; 
    • maintain database integrity.
    • Can be huge saving in file size, 
    • deals with large volumes of data. 
    • have  "built in" functions to help retrieve, sort and edit the data 
    • RDBMS - relational database management system
    • developed by E.F. Codd. 
    • A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. 
    • data and relations between them are organised in tables. 
    • A table is a collection of records and each record in a table contains the same fields. 
    • based on the Relational Algebra and set theory

    Hierarchical  Database Model
    • Organizes data in a tree structure (parent and child data)
    • Data in a series of records, which have a set of field values attached to it. 
    • have record types. These record types are the equivalent of tables in the relational model,
    • individual records is the equivalent of rows. 
    • To create links between these record types,uses Parent Child Relationships. 
    • 1:N mapping between record types. 
    • uses Binary trees, like 

    • an organization  stores information on an employee ( name, employee number, department, salary) 
    • an store information about an employee's children, (name and date of birth)
    • The employee and children data forms a parent, child hierarchy
    • If an employee has three children, three child segments associated with one employee segment.
    • restricts a child segment to having only one parent segment. 
    • popular in late 1960s - 1970s.  (IBM)

    Network Database

    • Some data modeled with more than one parent per child. 
    • permitts modeling of many-to-many relationships in data.
    • The data model is a simple network 
    • The CODASYL network model is based on mathematical set theory. 

    Object/Relational Databases

    • ORDBMSs
    •  adds new object storage capabilities to the relational systems at the core of modern information systems. 
    • to integrate management of traditional fielded data with complex objects 
    • (geospatial data, audio, video, images, and applets)
    •  tabular structures and data definition languages (DDLs) w
    • SQL3, ODBC, JDBC (IBM, Informix, Sun and Oracle )

    Object-Oriented Database Model

    • adds database functionality to object programming languages. 
    • useful when we have complex relationships between data
    • C++, Smalltalk and Java 
    • The power of the OODB comes from persistent data in databases, and transient data in executing programs.
    • object DBMSs have no performance overhead to store or retrieve interrelated objects.
    • mapping of object programming language objects to database objects 
    • provides higher performance
    • better management of the complex interrelationships between objects. 
    • financial portfolio risk analysis systems
    • telecommunications service applications
    • world wide web document structures, 
    • design and manufacturing systems
    • hospital patient record systems