Presentation is loading. Please wait.

Presentation is loading. Please wait.

FdSc Module 109 Server side scripting and database design

Similar presentations


Presentation on theme: "FdSc Module 109 Server side scripting and database design"— Presentation transcript:

1 FdSc Module 109 Server side scripting and database design
Query Design FdSc Module 109 Server side scripting and database design

2 Use your UML diagrams Use case: Login (from use case diagram)
Form: Login (from sequence diagram) Fields: UserName, Password (from class diagram Tables: Customer (from class diagram)

3 Describe the purpose Use case: Login Form: Login
Fields: UserName, Password Tables: Customer Purpose: Take the user name and password and see if they are valid

4 Design the query Use case: Login Form: Login
Fields: UserName, Password Tables: Customer Purpose: Take the user name and password and see if they are valid Query: Select customer.customerID from customer where customer.username = ‘username’ and customer.password = ‘password’ Null return = invalid username or password

5 Example Use case: Allocate ticket Form: CurrentTicket
Fields: Customer, TicketID, TicketDescription, StaffID, Date, Comment Tables: Customer, Ticket, Staff, TicketHistory Purpose: Show the current ticket history prior to allocation Query: Select customer.customerID, ticket.ticketdescription, staff.staffID, tickethistory.date, tickethistory.comment from customer, ticket, staff, tickethistory where ticketID = ‘ticketid’ and customer.customerid= ticket.ticketid and tickethistory.ticketid = ticket.ticketid and tickethistory.allocatedstaffid = staff.staffid


Download ppt "FdSc Module 109 Server side scripting and database design"

Similar presentations


Ads by Google