4. Data Modeling แสดงรายละเอียดของข้อมูลในส่วนของ definition, structure และ relationships ซึ่งไม่สามารถแสดงใน Data flow diagrams และ processing logic techniques ที่เรียนไปแล้วในบทก่อน Data Modeling Data modeling มี 3 ระดับได้แก่ conceptual data model, logical data model และ physical file and database.
39. Data Types (2) Data Coding : Pros – reduce storage space - increase integrity (by restricting input to only a few values) Cons – more difficult to users to remember - program must be written to decode fields before display
40. Data Types (3) Data Integrity : The value of foreign key CUSTOMER_ID field within a CUST_ORDER must be limited to the set of CUSTOMER_ID values from the CUSTOMER relations. We would not want to accept an order for a non-existing or unknown CUSTOMER.
41. Data Types (4) Default Value : Null Value Control : - distinct from 0 or blank or any other value - indicate that the value of the field is missing or unknown - ต้องกำหนดว่า field ใดเป็น null ไม่ได้
42.
43.
44. Table Specification Name Description Type Length Value/Range Notes/Remarks Table Name : BankAccount PK : ACCT_NO FK : ACCT_NO เลขที่บัญชี CHAR 7 0-9 Format: nnn-nnnn ธนาคารของลูกค้า Unique Not Null AMOUNT ยอดเงินที่เบิก NUMERIC 5 ,2 0 -10,000 Not Null Must <= BALANCE BALANCE ยอดเงินคงเหลือ ..... ...... ......... ....... ในบัญชี .... ..... .... .... .... ....