Csproject
Csproject
With Thanks
Name: Aarya Dangol
Grade: XII
Pinnacle Academy/College
Department of Computer Science
Lagankhel ,Lalitpur
1.What is the normalization? Explain the types of
normalization process with examples.
Normalization is the process of organizing data into a related table; it also
eliminates redundancy and increases the integrity which improves
performance of the query. To normalize a database, we divide the database
into tables and establish relationships between the tables.
Example
The above relation satisfies the properties of relation and is said to be in first
normal form (or 1NF). Conceptually it is convenient to have all the
information in one relation since it is then likely to be easier to query the
database.
Example
In the table above, the order number serves as the primary key. Notice that
the customer and total amount are dependent upon the order number -- this
data is specific to each order. However, the contact person is dependent
upon the customer. An alternative way to accomplish this would be to create
two tables:
Example
Company ZIP
ABC Ltd. 10169
XYZ Ltd. 33196
ASD Ltd. 21046
This may seem overly complex for daily applications and indeed it may be.
Database designers should always keep in mind the tradeoffs between
higher level normal forms and the resource issues that complexity creates.
2.Different between Centralized and Distributed database system.
Creating a Table:
Syntax : CREATE TABLE table _name (column1 datatype, column2
datatype,.....);
Example : CREATE TABLE Students (SN int, Name varchar(20), Class
Varchar(20));
Dropping the Table:
Syntax : DROP TABLE table_name;
Example : DROP TABLE Students;
Altering Table:
Syntax : ALTER TABLE table_name
ADD column-name datatype;
Example : ALTER TABLE Students
ADD name varchar(20);
2)DML(Data Manipulation Language):DML provides the techniques for
processing the database, such as retrieval, sorting, display and deletion of
records or data. Its statements are;
Inserting data
Syntax : INSERT INTO table_name(column1, column2,
column3......)
VALUES (value1, value2, value3.......);
Example : INSERT INTO Students (SN, Name, Class)
VALUES (1,Sudip stha, XII);
Selecting data
Synatx : SELECT column 1,column2,.....
FROM table_name
WHERE condition;
Example : SELECT Name,Class
FROM Students
WHERE SN=1;
Updating data
Syntax : UPDATE table_name
SET column1= value1, column2= value2....
WHERE condition;
Example : UPDATE Students
SET Class=XII
WHERE SN=1;
Deleting data
Syntax : DELETE FROM table_name WHERE condition;
Example : DELETE FROM Students WHERE Name= ‘Ram Karki’
21. What is Relatonal database model? List out the advantages and
disadvantages of relational database model.
In a relational database model, data are arranged in two- dimensional table,
which is easy for a user to develop and understand. This type of model can
also be described mathematically.
Because many managers often work with tabular form data, it is easy for
most of them to understand the structure used in a relational database. The
name relational database model is derived from the fact that each table
represents a relation, and each row of the table corresponds to a single
record of the database. It is highly flexible to program and retrieve data. It
can be efficiently used even with a computer which has limited memory and
processing capability. It is much easier to use since it enables the computer
system to accommodate different types of inquiries in an efficient manner.
Its processing efficiency is comparatively low; no processing can be done
without establishing the data relationships.
Example:
Table1
Name Address House no City Department
no
Saurav Godawari_3 Ka_10 Lalitpur 302
Ashmeeta Chauni_13 Gha_15 Kathmandu 161
Kritika Newroad_9 Ja_100 Pokhara 302
Pujani Milanchowk_ Na_625 Butwal 927
5
Priya Pulchowk_4 Sa_233 Narayangar 131
h
Table2
Name Profession Income
Nirmal Programmer 15000
Rohit Programmer 14000
Ashmeeta System Analyst 18000
Lautan Manager 17000
Saurav System Analyst 18000
Ring Topology
In the ring topology, each station is attached to nearby computers on a
point-to-point basis so that the entire system is in the form of a ring. That is,
the entire computers are connected in a closed loop. In this topology, data
are transmitted in only one direction (either clockwise or anti-clockwise at a
time). The method by which the data are transmitted around the ring is
called token passing MAU (Multi-station Access Unit) is used as a control
device. A twisted pair or optical fiber is used as a transmission media.
Advantages of Ring Topology
i. The growth of system has minimal impact on performance
ii. Terminators are not necessary as in bus topology.
iii. Data traffic is reduced as data flows in only one direction.
iv. Each computer has equal priority to communicate on the network
Polymorphism
Polymorphism enables the same function to behave differently in different
classes. Object-oriented languages try to make existing code easily
modifiable without actually changing the code. Polymorphism means that
the same functions may behave differently in different classes.It is an
important feature of OOPS.
The word polymorphism is derived from the Latin word 'Poly' means 'many'
and 'morph' means "form'. Polymorphism is the concept that supports the
capability of an object of a class to behave differently in response to a
message or action. It is a major feature that allows the programmer to
extend the language with new data types and operations.
Inheritance
Inheritance is the property that allows the reuse of an existing class to build
a new class. The principle in this sort of division is that each subclass
shares common properties with the class from which it is derived. For
example, all vehicles in a class may share similar properties of having
wheels and a motor. The idea of classes leads to the idea of inheritance. In
our daily lives, we use the concept of classes being divided into subclasses.
We know that a class of animals can be divided into mammals, amphibians,
insects, reptiles etc. A class of vehicles is divided into cars, buses, and
motorcycles.
Inheritance is a way to form new classes (an instance of which are called
objects). The new classes, known as derived classes, inherit attributes and
behavior of the pre-existing classes, which are referred to as base classes.
Feasibility study:
Feasibility study is the most important activity in the system analysis phase.
It analyses the proposed system from different aspects so that it makes us
clear that how practical or beneficial the system will be to the organization.
So it tells us whether the system is feasible to design nor not. Thus it is
necessary before system design.
Prototyping Model:
This model is applied when there is an absence of detail information
regarding input and output requirement of a software. Prototype model is
suitable when the requirement of the client is not clear and it is supposed to
be changed. It doesn't cover any risk management.
Advantages of prototyping model
1. Helps in reducing risk associated with the the project.
2. There is great involvement of user in software development.
Disadvantages of prototyping model
1. Time consuming and expensive because if the user is not satisfied by
the developed prototype new prototype should be developed. This
process goes on until a perfect prototype is developed which satisfies
the user.
Spiral model:
In this model, process is represented as a spiral rather than a sequence of
activities with back tracking. Each loop in the spiral represent a phase in the
process. It has no fixed phase such a specification or design. Loops in the
spiral are chosen depending upon what is required. This model combines
the feature of both waterfall model and prototype model. The spiral model is
favorable of large, expensive and complicated projects. It is a system
development method in Looping structure. In this model planning, risk
analysis, software development and user evaluation are repeatedly
processed until the system performed correct output.
30. What are the differences between Procedure Oriented and Object
Oriented Programming?
e. It does not model the real world e. It models the real world
perfectly. perfectly.
3. System Design.
5. System Testing.
6. System Implementation.