Download presentation
Presentation is loading. Please wait.
Published byVeronika Susanto Modified over 6 years ago
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.