San Diego State University Relational Database Web Interface Worksheet
Question Description
P1 Database (20 Points)
Create the following relational database using SQL commands and answer questions 1 to 4.
P1-1 (8 points)
Insert your SQL code for creation of database in the following box.
Your SQL code for creating the database |
|
P1-2 (4 points)
The name of employees who have Technical in their job description (2 points).
P1-3 (4 points)
The name of employees who have Long-term disability insurance plan.
P1-4 (4 points)
The name and job description of employees who have Term life insurance plan
Problem(30 Points)
Consider the following table retrieved from database.
id |
Name |
Last_name |
Ssn |
Phone |
Address |
GPA |
image |
1001 |
Clarence |
Edmond |
920644345 |
419-942-7436 |
Wabash, OH |
3.25 |
|
1002 |
James |
Dill |
861623976 |
203-339-0467 |
Bridgeport, CT |
3.13 |
|
1003 |
Ramon |
Murillo |
419216128 |
425-498-9795 |
Redmond, WA |
3.56 |
|
1004 |
Timothy |
Hunter |
634307401 |
405-457-2456 |
Lookeba, OK |
2.65 |
|
1005 |
Kathleen |
Whitman |
809321381 |
479-266-2517 |
Farmington, AR |
2.98 |
Add this table data to an array in PHP and display the five profiles in the following format.
Note: You should run a loop over the array and create the content dynamically.
Creating and initializing the array5 points
Creating the dynamic content of the page20 points
Beautification, Colors, Borders, 5 points
————————————————————————————————–
Total30 points
—————————————————————————————————————————————–
Problem(10 Points)
For the problem 2, modify the code in a way that the array is sorted based on the GPA and then the page is shown ordered by PGAs (highest GPA will be printed on top of the page and the lowest will be at the bottom).
Your PHP Code |
|
Run the query and insert the result in the following box.
The run result |
|
Problem 4 (10 points)
Write a function that gets a phone number and removes all the dash lines in the phone number and returns the 10-digit number. For example:
419-942-7436 => 4199427436
41-9-942-74-36 => 4199427436
41-9942-7-4-3-6 => 4199427436
Test the function using the above sample input and display the result.
Your PHP Code |
|
Run the query and insert the result in the following box.
The run result |
|
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."