0% found this document useful (0 votes)
18 views6 pages

Dires Er and Flowchart

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

Dires Er and Flowchart

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

 Build an E-R Diagram for the following information:

1; A student record management system will have the following two basic data object
categories with their own features or properties: Students will have an Id, Name
(Fname,Lname), Dept, Age, GPA and Course will have an Id, Name, Credit Hours.
2; A Personnel record management system will have the following two basic data object
categories with their own features or properties: Employee will have an Id, Name, DoB, Age,
Tel and Department will have an Id, Name, Location.

 Design the corresponding flow charts for the following pseudo code
1; read three numbers and display the larger
start
Read three numbers(a,b,c)
If(number a is greater than number b)
Then
If(number a is greater than number c)
Then
Print number a
Else
Print number c
Endif
Else if
(number b is greater than number c)
Then
print number b
else
print number c
End
2; The following pseudocode describe an algorism which will be accept student
result in number from the keyboard and record "satisfactory"if the result is
greater than or equal to 50 othetwise "not satisfactory"will be returned.
Start
Use the variable result as type float
Disply "input the result"
Accept the result
If(result greater than=50)
Display "satisfactory"
else
Display"not satisfactory" End

3 start
Display ”input number x”
Accept input x

1
If(x>=0)
Display the number is positive
Else
Display the number is negative
End
4

2
5

3
SQL

1;Create database sales by using sql server 2008.

2;Create the following tables in sales database using the information given.

Table1:Customer

Attribute t y p e size

c u - i d varchar 12

Firstname c h a r 20

Lastname c h a r 20

C i t y varchar 30

industry type c h a r ---

Table2:salesperson

Attribute t yp e size additional Information

s p - i d varchar 1 0

N a m e c h a r 2 0

Gender c h a r 6 male Or female

Salary money

Table3:orders

Attribute t y p e size

Number varchar 1 0

Orderdate datetime

s p - i d varchar 1 0

c u - i d varchar 1 2

Amount money

4
3;set sp-id for salesperson,cu-id for customer and number for order table as primary
key.

4;Create the r/ships for three tables.

5;Add new column named "age" as type into salesperson table.An age should be
between 18 and 65.

6;Insert the following records into the respective tables

salesperson

s p - i d n a m e gender salary age

1 0 1 H a i l u male 1400 53

1 0 2 A s t e r female 2400 47

1 0 3 A z e b female 2000 38

1 0 4 Muluken male 2500 31

1 0 5 Tigist female 1500 59

1 0 6 Hayat female 2800 26

Customer

cu-id firstname lastname c i t y industry type

201 hailu teshome bahirdar p

202 aster a b e b e gonder p

203 a z e d b e l e t e markos h

204 richard b a l e dessie h

Order

5
Number orderdate sp-id cu-id amount

1 05/02/2000 1 0 2 201 6 4 0

2 30/01/2000 1 0 5 204 1 2 0 0

3 14//07/2001 1 0 1 204 5 6 0

4 29/01/2003 1 0 2 203 2 5 0 0

5 02/03/2003 1 0 4 202 8 0 0

6 03/02/2003 1 0 4 202 9 2 0

7 05/06/2003 1 0 4 204 3 5 0

7;write an sql statment that displays the name of all female salespeople who earns
salary of 2400 or more and save the result set by the name moresalary in
mydocument folder.

8;design sql statment that displays name,sp-id,gender and salary of the salespeople
that have two or more orders and save the result set in desktop by the name
moreorder.

9;design sql statment thate remove all customers who live in dessie from the
customer table.

10;design sql statment that displays the name of customers and sort by their fname
& lname ascendingly.

11;design sql statment that counts the name of salesperson where salary is greater
than =2500

12;design sql statment that displays the name of customers and group by their
industry type.

13; desgn sql statment to take backup for your sales database and save the backup
by the name salesbackup in desktop.

14; assume that the sales database fails accidentaly.design sql statment that recover
the failed database in to an earlier state from the backup.

You might also like