Download Icon - To Daim
Transcript
contains the longitude and latitude of every positioning done by the system connected with an avatar. The ‘device’ table keeps information about all the devices registered in the system. Each avatar typically has one device, but it is possible to register multiple devices to each avatar. The ‘avatar’ table has a many-to-many connection to itself. This connection represents a friendship connection between the users. A friendship must be two-ways to be an actual friendship. This means that for user 1 and user 2 to be friends, two tuples in the table are necessary; one where user 1 is the owner and user 2 is the friend, and one where user 2 is the owner and user 1 is the friend. The status (privacy setting) with the lowest granularity is the current privacy setting of the friendship. The database is implemented using the MySQL server available for all students at NTNU. Figure 5.2: Database model for The FriendRadar Table 5.1: Database schema for The FriendRadar usertable (id, nickname, forename, surname, pass, pic_url, email, relationship_status, personal message) avatar (id, gender, dateofbirth) device (id, mac_address, status, type, user) friend (owner, friend, status, date) position (id, latitude, longitude, location_time, user) message (id, date, type, sender, receiver, rd, answer_to) message_content (id, header, body, message) 5.2.2 The FriendRadar component The architecture of this component follows the common model-view-controller design pattern (MVC) as shown in Figure 5.3. The principle of this pattern is to separate the domain model and the business logic from the user interface that presents model. The manipulation of the model is 31