Tuesday, March 22, 2005

:: Attributes in Tables changed in the Database ::

22/03/05 16.50
We have modified the table today:
Table UserInfo:
u_id: tinyint (2) ? int (4) [auto increment]
user name: varchar(255)?varchar(20)
full name: varchar(255)? varchar(20)
password: varchar(20)
hkid: varchar(10)
email: varchar(20)
phone_home int(4)
phone_mobile int(4)
address varchar(225)


Table money:
acc_id: int(4) [auto increment]
u_id: int(4)
amount real(4) ? money(8)

Table usd:
acc_id int(4) [auto increment]
u_id: int(4)
amount real(4) ? money(8)

Table aud:
acc_id int(4) [auto increment]
u_id: int(4)
amount real(4) ? money(8)

Table jpy:
acc_id int(4) [auto increment]
u_id int(4)
amount real(4) ? money(8)

Table eur:
acc_id int(4) [auto increment]
u_id int(4)
amount real(4) ? money(8)


22/03/05 17.49
As Cathy finds that the SQL command contains the money, we decide to change the ‘money’ table into ‘hkd’ refers to the local account.
Table hkd
acc_id int(4)
u_id int(4)
amount money(8)

Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_7msw.asp


Example:
DELETE [Target] FROM [FORCE] Table_List [[, Table_List ...] [JOIN [ Table_List]]] [WHERE FilterCondition1 [AND OR FilterCondition2 ...]]


Delete SQL command:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp9/html/f31dbf64-3691-4ab0-a6b0-7ed1b3a42208.asp

22/03/05 18.45

- Use the Hong Kong dollar to buy the foreign dollar

Use case I and II and III

Scope should contain System and Database

Create Administrator-table

Password and id

Administrator’s role: Modify users’ information, view information, DO NOT terminate their accounts.

How to modify the User information:

We first do the original design first: user adds the lately updated data in the fields, once there is not null, update to the database, otherwise, ignore that field.

After than, if we have time, refactor it as display information in textbox first, update all information into the database.

2.3.8 Insert the user record in the UserInfo table.

2.4.3 No administrator anymore

2.4.1 (Negative account? Delete it la.)

Create a new table for terminated user – Terminate:

Login -> UserInfo user name exits? -> if exist, return the userID ?

Check the termination table, -> if the termination table have the return UserID, re-direct user to the default/index page.

So, termination table has the t_id and u_id

0 Comments:

Post a Comment

<< Home