1 / 15

PDA Database Design Project

PDA Database Design Project. Philip Drope. CS 8628, Summer 2003. Project Description E-R Diagram Logical Schema Physical Schema Publication Script Synchronization Script Summary Screen Snapshots Code Sample Conclusion.

dympna
Download Presentation

PDA Database Design Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PDA Database Design Project Philip Drope CS 8628, Summer 2003

  2. Project Description E-R Diagram Logical Schema Physical Schema Publication Script Synchronization Script Summary Screen Snapshots Code Sample Conclusion This is a summary of the sequence of tasks for the PDA database design project. Sequence of Tasks

  3. This project consists of the design and construction of a database which is synchronized between a Pocket PC PDA and a computer. The software for the PDA was designed using the Mobile VB API which runs in conjunction with Microsoft Visual Basic. The Mobilink and Ultralite software, by Sybase, was used to create, manage and access the database. This project creates a program to synchronize a database between a Pocket PC PDA and a computer. The software was created using the AppForge Mobile VB API. The Mobilink and Ultralite software, by Sybase, was used for database creation, management and access. Project Description

  4. E-R Diagram • This slide displays a diagram of the entity relationships (E-R) for the database used in this project.

  5. Logical Schema • This slide displays a diagram of the logical schema for the database used in this project. This includes the primary key (PK) and foreign key (FK) used in the tables.

  6. Employee Table Emp_ID Char(6) PK No Null Name Char(20) No Null Salary Numeric(6) No Null Dept_ID Integer FK No Null Department Table Dept_ID Integer PK No Null Dept_Name Char(4) No Null Location Char(5) No Null This slide displays physical schema for the database used in this project. This consists of the Employee and Department tables and their respective columns. Physical Schema (DDL)

  7. Matrix: Forms vs. Tables • This slide displays a matrix (Forms vs. Tables) for this project.

  8. CREATE PUBLICATION emp_dept ( TABLE Employee (Emp_ID, Name, Salary, Dept_ID), TABLE Department (Dept_ID, Dept_Name, Location), ); This is the publication script for the tables this project is designed to use. Publication Script

  9. Private Sub Menu_Sync_Click() If m_EmpIDStr = "" Then ' frmMain.Hide frmEmp.Show Else On Error Resume Next ' Initialize the sync form to allow sync event callbacks Form_Sync.InitSyncForm Connection Connection.Synchronize If GetError <> ulSQLE_NOERROR And _ GetError <> ulSQLE_INTERRUPTED Then MsgBox ("Synchronization error: " & Err.Description) End If Err.Clear On Error GoTo 0 ' Refresh the data SetOrderData SkipToValidOrder UpdateForm End If End Sub This is the code to begin the synchronization process which is initiated by clicking synchronization on the menu bar. It is the same procedure used in the original CustDB program. Synchronization Script

  10. Difficulties Encountered Establishing synchronization Creating the forms originally planned Entering code to get screens to operate properly Getting the correct tables and keys set up Entering data into database The most difficulty was in establishing and maintaining synchronization. This occurred several times while writing and making changes to the Mobile VB program. The other difficulties were just learning about the code needed to make the program components operate properly. This program was built using the CustDB program and database as a framework to modify and build on. The forms used were not the forms originally planned because of the time constraints created because of the synchronization issues encountered. The synchronization was still conducted on all the tables listed in the custdb.usm but the data and relationships were changed to set up the new program. Difficulties Encountered

  11. Screen Snapshots • These are pictures of the employee database program running on the Pocket PC. Both pictures are of record display screens.

  12. Screen Snapshots • These are more pictures of the employee database program running on the Pocket PC. The first picture shows the menu option to add a new record or delete a record. The second picture shows the menu option to go to a previous or the next record.

  13. Screen Snapshots • These are more pictures of the employee database program running on the Pocket PC. The first picture shows the menu option to start synchronization or exit the program. The second picture shows the screen just as the synchronization has completed.

  14. Public Sub DeleteEmp() Dim Employee As ULTable Set Order = Connection.GetTable("ULEmployee") Employee.Open Employee.FindBegin Employee.Column(“emp_id").LongValue = m_EmployeeID If Employee.FindFirst Then Employee.Delete Connection.Commit End If Employee.Close Set Employee = Nothing SkipToValidEmployee SetEmployeeData End Sub This is the code to delete an employee from the Employee table. Code Sample

  15. This project was very useful as an introduction to developing a database interface which can be used on a PDA. This has great utility and usefulness as the functionality of PDAs grow and databases become more and more widely used for various purposes. Using this concept in conjunction with the internet and wireless connectivity, the possibilities for advancement of computing, communications and data management are tremendous. Conclusion

More Related