Professional Documents
Culture Documents
ER Model Test1
ER Model Test1
ABC Collage needs to store the information of its Student, having (Stud ID, FirstName,
LastName, Age) taking a Course (Coursecode, CourseName, Cradit hrs) in different
Department with (DeptID, DeptName, officeNo).
Case1: Many students can take many courses and many courses can be taken by many
students
Case2: A student can have enrolled at one Department at a time and a department can have
many students
Case3: Course is given by a single department while a department can have many courses
2. Assume that you are working for ABC company as Database Administrator. The
company is organized into department. Each department has unique deptid, deptname
and several locations. A department controls a number of project. Each project has a
unique Pno, name and is located at a single location. We store each employee’s
unique Eno, name, salary, sex, and birthdates. Many employee works for one
department and may work on several projects.
Based on the above scenario Assess the business requirement of the prescriptions and
perform the following task by using Microsoft office vision 2007 or edraw max 2007
software
1. Identify the database Entities of the organization
2. Identify a type of Attributes for each entity
3. Draw entity relationship (ER) diagram for the identified entities with type of
Attributes
START
READ
SAL,
YEAR
Bonus= SAL*.1
Yes
YEAR>= Bonus= Bonus+100
10
No
dsfadfdaffgsgfsgfggffff
WRITE
BONUS
Read NAME,
BALANCE, RATE
Interest=BALANCE *RATE
3) A program that identifies a larger and smaller number from two numbers
Start
Read A, B
Yes Big=B
A<B?
Small=A
No
Big=A
Small=B
Stop
4) Calculate grade for ten students based on the scale:
>80-A
Start
>60-B
>50-C
Count=1 >40-D
<40-F
Yes
MARK>80 ? GRADE-A
No
Yes GRADE-B
MARK>60 ?
No
Yes GRADE-C
MARK>50 ?
No
Yes GRADE-D
MARK>40 ?
No
GRADE-F
Increment Count
No
Count>10 ?
yes
Display NAME, GRADE
Stop
Pseudo-code:
It is much similar to real code. We use verbs to write pseudo-code. Capitalize important words
that show actions.
Eg 1) A pseudo-code to calculate interest rate
ACCEPT Name, Principal, Rate
Interest=Principal X Rate
DISPLAY Name, Interest
2) A pseudo-code to calculate bonus
ACCEPT Name, Salary
Bonus=SalaryX0.1
ACCEPT Serviceyear
IF Serviceyear>10 Then
Bonus+100
ENDIF
DISPLAY Bonus
3) A pseudo-code that calculates grade
ACCEPT Mark, Name
IF Mark>80 Then
GradeA
ELSE IF Mark>=70 Then
GradeB
ELSE IF Mark>=60 Then
GradeC
ELSE IF Mark>=50 Then
GradeD
ELSE
GradeF
ENDIF
DISPLAY Grade, Name
Use SQL statements and Create the database named – “Bollywood”
Create all the
Tables with proper datatype and size
Relation ships