2 ก กbc.msu.ac.th/project_file/chapter2(12).pdf · 10 ˙ .net 6 ˆ ')& # ˝ / "...

Post on 18-Oct-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

����� 2

������ ���ก�������ก��� ����

2.1 ��������ก��� ����

2.1.1 ��������� !�" 2.1.1.1 ����ก� ก� ������� ���������������� ����� �! �"� �ก�#����

$�ก�%�"�&�'�'� (�)&)�ก�ก�*�+��ก�)�&%(+�� �,�'�! �"�(+�� �)�-� .���"�(�) /�"��(+�%+�/ ���0�1�����)�/ ���.��& /��ก&)� ����ก� ก�%+�/ ���

2.1.1.2 ก���� ������� /�����.�ก/���-�, ,��ก����$�3.�)��� �!���#��.ก)ก��,+�-ก��ก��&)����� ,��%#'����.�)��� �!�����4� ��������ก15 �"� '*�/���#��5���6"4����ก�� /��ก&)� ���/����+, ���,+����/ก7 /������/�8�������#�&������ /��ก&)� ���/'"��, (/��ก) /��/���/����,+����-�/���� #'�ก�������/%��/��� /��ก&)� ���-�&��/�8����

2.1.1.3 ก�����6"4� ������� ก�ก*���+���5�&��-���ก�#'����ก�%ก� 2.1.1.4 ,�,�'��� �������ก�ก-���-��+,+�ก�,=15� �'���� ��$! ��

����&�$�/')� ก��+ .�ก .%ก .�� 0�&��)����4��#�����ก/�����/+7+��+ 2.1.1.5 ก�-�+%*���)�� ������� ก��?��)&�%*��&������+�)�-�+%*���)�����

����� �!(�)�� -�&-���)���� -��+����ก�#���,�'�!��� ����� �!��4� 2.1.1.6 �)&��+%)�� (Sales Discount) /�8��)&��+����������+#�����6"4�/�"�����6"4�'*�

���4�)����������6"4�/�8�/���/'"�� -��#�/�"���(�0��#��/&�����#���)&��+ +��������� /��ก�)&��+/����+&)��)&��+%)�� ก����������#���)&��+.ก)���6"4� �����*�#����(+�%�กก�����������+�� / ��)&��+%)��/�8���ก�����*�(���ก��(+�%�กก����������

2.1.1.7 ��ก��� �"� �����)��&�����%-�+���#%6"4�������/ �ก�ก7%/�8���ก������/� ������-����*�#�����6"4���������4�.ก/�8���ก����%*� (Permanent Customer) 2.1.1.8 ก���� �"� ก�%��#%���6"4� #��6"4��������"� �ก��"�ก�*�����#+���������6���%�*�#��/ก�+�,�'�!���+���ก����.ก)������

2.1.1.9 �)&��+� (Purchase Discount) /�8� �)&��+����������+#�����6"4� /�"�����6"4��*�/�����'*�#��������0��#�/&�����ก*���+(&� -��/�"���(����(+��)&��+ �)&��+/����+���+������6"4� /��ก&)��)&��+� /�8���+���(���ก%�ก��+6"4��������*�#��-�����������������6"4��+��

7

2.1.1.10 # /�7%� /��� ������� /�ก�����#'� �ก��ก�����#�ก�����6"4���)���/���+������$�0� .�/�8����กW���ก� ก�� ������ / "���X��ก��ก�� �������������ก����� (�)-�ก� ��ก��������6"4�(� 2.1.1.11 # � ������ (Receive Report) �"� /�ก��������6"4�������%�+�*���4� ����%�ก���(+�� ������%�ก������������ ���6"4�%-����*�ก�-&%�� ��������)ก� # ก*�ก� ����������������������)���#��&)���ก-���-�-����������"�(�) /�"����ก-���.��&ก7%�+�*�# � �������)�(�#�������������� 2.1.1.12 ������ ������� ����� �!����/&������ก�%ก������(&�/ "��%*���)�� -����ก15ก��ก� $�ก�% %*���)��#��ก� ���6"4� / "���&����ก*�( 2.1.1.13 ก�'*�/��� (Credit Terms/Terms of Payment) /�8�/�"���(����������ก*���+�/&��#�ก�'*�/����)������� / "��%��#%#�����6"4�'*�/����)�������,+�/7& 0��#�ก*���+/&��-��/�"���(����%(+�� �)&��+ 2.1.2 �����ก��� ก �#$�ก��

2.1.2.1 Microsoft Visual Studio.NET 2005 Microsoft Visual Studio.Net version 2005 /�8�/�"����"����#'� �c��,�.ก��)��

�d� �-�ก� Window ���(+�� �&������. )���� /�"���%�ก��������%#'�#�ก� �c��,�.ก�.� -�4�.-) "4�W��%�ก���� ������&��6� 6���#�ก�#'���� Microsoft -Visual Studio.Net version 2005 �"� VB.NET /�8�/�"����"����#'�#�ก� �c��,�.ก�. Visual Programming 6���(+�� ก� �c����%�ก0�1� BASIC ( Beginners All Purpose Symbolic Instruction Code) 6���0�1� BASIC ��4�%/�8�0�1���������/���#%�)�� ��ก%�ก��4 VB.NET ����� /������ก� �c��,�.ก�/�8���ก15 OOP (Object-Oriented Programming) +��/')�0�1�#�ก� �c��,�.ก�����#��)/')�/+��&ก� C++ , C# , Delphi .� Java ��ก%�ก��4 Microsoft- Visual Studio.Net version 2005 ��� %���5��ก15�"�� s ���(�,�6�t-! /')� Microsoft Access , Excess , Word /�8�-��

2.1.2.2 �8�9�� :� Microsoft Visual Studio.Net version 2005 2.1.2.2.1 /�8�0�1�OOP (Object-Oriented Programming) /-7���. /')�/+��&ก�

Java, C#, Delphi .� C++ 6������&�����#�ก��*��&��&���+&ก#�ก�/����,�.ก� ก��*�Inheritance, overloading .� Overriding /�8�-��

8

2.1.2.2.2 � /���&���������� .NET +�&� .NET Framework 6�������-W�� CLS .���-W��#��)&����'��+�������*�#��/���������% �c��,�.ก�+�&�VB.NET.��&��������%/��ก#'�,�.ก���� �c��+�&�0�1����.-ก-)����ก(�/')� C#.NET (+�

2.1.2.2.3 / ���ก� �c��.� ��/�'���. Web From .� Web Service ,+� VB.NET (+�� ก� �c��#������� �c��.� ��/�'���. Web From .� Web Service 6�����ก�����. Drag and Drop /')�/+��&ก� ก� �c��,�.ก�. Window Application .��������%���� Web Service 6�����y�� XML (Extensible Markup Language) /�8�-�&ก���#�ก�.�ก/������������

2.1.2.2.4 ��� ก����� Web Application +�&� ASP.NET 6����������%��&ก ASP.NET /���ก� ก����� Web From �*�#�� Microsoft Visual Studio.Net version 2005 ��������%���� Web From .� Web Service +�&�0�1�ASP.NET (+���)��&+/7&

2.1.2.2.5 ��� Application . Console 6����"�&)�/�8� Application ���/ �����4���#��)#� Microsoft Visual Studio.Net version 2005 �*�#����������% �c��,�.ก�#���ก15����� � DOS (+��"������ .�.�+���������#���ก15����&��(+�

2.1.2.2.6 ��� ก� �c��,�.ก�. Threading 2.1.2.2.7 ��,������ก�%�+ก��&����+ ��+���+���4� ��ก�/ �����+�&�������

#�ก�%�+ก��&����+ ��+���/�8� .���,������/')�/+��&ก� 0�1� OOP ,+����&(�ก�%�+ก��&����+ ��+��4%/��ก&)� Structure error handling �"�,�������*����� Try Catch Finally

2.1.2.2.8 ��� ADO.NET 6���/�8�/��,�,���#�ก�-�+-)�W��������. #��)���/�����.��ADO.� RDO #�Visual Basic 6.0 ��4���4 ADO.NET %/�8�ก���� ����ก�-�+-)�W��������. stateless / "��/�8�ก�-�+-)�W����������� ��� �c����4���.����/-�!/�7-/�8���)��+�

2.1.2.2.9 �����#'� Visual Studio.Net version 2005 /�8�/�"����"�/+��&ก��#�ก� �c��(�)&)�0�1�#+sก7-��0��#-� .NET ก� �c��.� ��/�'���,+�#'�0�1� VB.NET, C++.NET, C#.NET %#'�/�"����"�.�����-����/��"��ก���*�#��ก�/����� �c��,�.ก�+�&� VB.NET ��������% �c��+�&�0�1��"��(+�/')�ก��

2.1.2.2.10 ��ก�%�+ก���)&��&��%*����+���4�#� VB.NET %��ก�%�+ก���)&��&��%*�,+���y��CLR.��� Automatic garbage collection ')&�#����ก�%�+ก���)&��&��%*����������$�0� ��ก��4�

9

2.1.2.2.11 ��ก�%�+ก� Input .� Output (+�+���4� ,+� Visual Studio.Net version 2005(+���ก�/ ����&������#�ก�%�+ก� Input .� Output (+���)��/�8� +�&�ก�#'����� System.IO

2.1.2.2.12 �����,��/ �����4���ก��ก #� Visual Studio.Net version 2005 ��ก�/ ��� Control ��ก��4�.�/ �����+�&�������#��ก� Control /+�� �*�#��')&��+/&��#�ก� �c��.� ��/�'�������ก/')�ก�� (,�0�� /��������&�y!, 2549)

2.1.2.3 9?�$@:�ก��� .NET Framework �������/�8���&#%�*���{��� .NET ก7�"� .NET Framework 6������)&��ก� -)�� s +��.�+�#���

E�!��� 2-1 ����?-�ก� .NET Framework

.NET (�)(+�/�8�/ ���.�)0�1�,�.ก�/�)���4�.-)����"�/�8��กW��#�ก� �c��.� ��/�'������#��) �&����������,+�/+)���� .NET ก7�"�ก����/������ �c��,�.ก�+�&�0�1�#+ s ก7(+������� ���� Common Language Specifications (CLS) ��� .NET 6���')&�#����ก �c�������/�"�ก#'�0�1�,�.ก�#+sก7(+� (Language neutral) ,+� .NET Framework %��/�"����"����/��ก&)� Visual Studio .NET 6����"�/�8� Integrated Development Environment (IDE) �*��� ก� �c��,�.ก� /����,�.ก� %+�&�0�1�#+ก7(+� .��&�*�,��+ (Code) �����( �!/�8�(t�! .exe / "���*�(�#'���� ,+�-���/�"�ก���( /��!#��/�����ก� 0�1����#'�/���� .NET �"�/�8��กW��#�ก� �c��.� ��/�'������#��)�&����������,++/+)���� .NET ก7�"�ก��������� �c��,�.ก�+�&�0�1�#+s ก7(+������� ���� Common Language Specifications (CLS)

10

��� .NET 6���')&�#�������/�"�ก#'�0�1�,�.ก�#+s ก7(+� (Language neutral) ,+� .Net Framework %��/�"����"����/��ก&)� Visual Studio .NET 6����"�/�8� Integrated Development Environment (IDE) �*��� �c��,�.ก����( /��!%/���(��)��+�&)�0��#�,��+ ��ก�/��ก#'� Object �"� Control �( ��� 6��� .NET Framework /-���(&�#'����,+�. )���ก/�8� 5 ก��)� �"�

2.1.2.3.1 Web Services & &��� /%7�.����,�����/ก���&ก� ก�����t?�ก!'����"�6� ���� / "��#�� �ก� ����/��!/�7- (Web Service) 2.1.2.3.2 Web Form & & �� /%7�.����,��-)�� s ���/ก���&����ก� ก�.�+��� ����/��!/�7- 2.1.2.3.3 Windows Forms & &��� /%7�.����,��-)�� s ���/ก���&����ก� ก�.�+��� � Windows 2.1.2.3.4 Database Class & &��� /%7�.����,�����#'�-�+-)�.�%�+ก�ก� W�������� 2.1.2.3.5 Base Class /�8��)&����/ก���&����ก� ก��*������4� "4�W�� ,�.ก���� �c����4�+�&� .NET %��ก�/��ก#'��������/0�/+��&ก����4���+(�)&)�/�%/����+�&�0�1� C# .NET, VB .NET �"�0�1��"��#+ก7-�� �/0�������/��)���4%���)#�ก��)�������� (Class) Data .� XML / "��#'�#�ก�/��ก#'�.�%�+ก�W���������"�������#��� XML /')����� ADO .NET, XML /�8�-�� 2.1.2.3.6 Base Class /�8����&�������� "4�W��-)��s 6���(�,�6�t-! �c����4���#�������/��ก#'����.� �c��-)���+/ ���/-��(+� 6��� Base Class ��4�� ��������������%*�/�8�#�ก� �c��,�.ก� /')� ก�%�+ก���� �-//��-! �- ก�%�+ก�������'��+�-�� ก�%�+ก�ก�t|ก ก�%�+ก�/ก���&ก� �&�����+0����� /�8�-�� 2.1.2.3.7 '�4���+����6���/�8��)&��*���{��� .NET Framework �"� Common Language Runtime (CLR) �"�/�8��กW�����. �-t�!� .NET /����/+��& ���������� CLR ก7�"�/�8� execution engine #�ก���&���.�%�+ก�,�.ก�������( �!.��&#���*����(+� � �d� �-�ก� Windows ,+� CLR %(+�.���,��+#��� MSIL (�/�8��*�����0�1�/�"�������%�ก��4����-���ก��*��)&��"�� s ��#'������กก7%.���/ ���/} �#��)&���4� 6���')&�#��,�.ก��*����(+�/7&��4� /�"���%�ก(�)-����#��.���/�7%��4���4���+ก)��%��%�*����(+� ��ก%�ก��4 CLR ����*��������-�+-)�ก� �d� �-�ก�%�+���)&��&��%*�#��ก� ,�.ก�-)�� s .��"���)&��&��%*����(�)��ก#'����.��&#��ก� (+�&�ก &�ก����/��ก&)� Garbage Collection)

11

%�+ก�ก� �����+ ��+ (exception handling) &����+�.�/"����&�����+0�� (security management) +�&� (http://www.zoneaid.com/knowledge.php?knowledgeStatus=1)

2.1.2.4 ���� Microsoft SQL Server 2000 Microsoft SQL Server 2000 /�8�,�.ก�%�+ก�W��������+� Server �������+

�&�������#�ก���� ���������+#�{)���')&�#��ก� ���%�+ก�W��������������$�0� &+/7& ����-� -)��&��-���ก�������!ก���+#�{) Microsoft SQL Server 2000 /�8� W��������.�,6��'���ก�&�/���!����� �5!. 6����*�/����&���)�/'"���"�.�����$�0� +���ก����� ���/&7 (6-!.����!ก$�ก�%-���ก� +�&�ก���� XML .� HTTP �*�#��ก�/������.�ก�.�ก/��������������4��*�(+��)����4� #��5����&�������#�ก�&�/���!����� ������')&�/ �����5�)���������� .�+�&��&�� ������ ���+���4� �*�#���&�������#�ก��*������)��-)�/�"������ ��4������4� %�+ก�ก� ���#�.-)�&��,+���-,���-�(+�+���4� &���4��� ���/�"����"�+���ก�/����,�.ก� .�ก� �c���&��/7&+���ก� �ก�(+�+���4�/')�ก��

���กก����ก�#'�0�1� SQL Server �"�0�1����(�)/�8�ก &�ก� (Nonprocedural Language) ���#'�,�.ก�%#'��*�����/ "�����&)�%�*��( .�(�)%*�/�8����%-����$� ��&)��*���)��(��ก%�ก��4����#'� .�,�.ก�/��!(�)-����� ���ก &�ก�%�+/ก7 .���. ������������/ก7 ก7�����/���� Query (+�-�����กก�.��&0�1����#'�/ "��ก�%�+ก�ก� W��������%-���#���&�������#�ก�����W�������� .�%�+ก�ก� ,���������-��������� (Table) (+�.�%-������&�������#�ก�%�+ก� ��������� /')� ก�/ ��� � .�.ก�(� ������ ( Add, Delete and Modify ) .�%-���#��&�������#�ก����� Query ���6� 6���#�ก�.��������� /�8�����/�y������&������#�ก�+*�/�������ก%�ก��4�0�1�%-����� t?�'��ก!��� ��������+*�/���ก�(+�/��,+��)��.�,���������0�1��)����%�)��#�ก�/�����ก+�&� SQL Server %��/�8�0�1���������-� �����&��-���ก�+��ก�)�&��4(+���4���+ .�������*�����-)�� s ���#'��*��� %�+ก�W�������� (���กก�&�/���!.���ก. W�������� �y.+.��%�- �����% ��%����!,2549

12

:������� 2-1 �*�����-)�� s ���#'��*��� %�+ก�W��������

���9 �� � ��J���

SELECT /��ก���������#�-���

INSERT / ���.�&��������(�#�-���

UPDATE �� ���.�&������#�-���

DELETE � .�&������#�-���

��. �*����� SELECT

SELECT <'"��������!���-���ก�+�������>

FROM <'"��-���>

WHERE </�"���(�-����� �>

��. �*����� INSERT

INSERT INTO <'"��-������%/ ���������>

VALUES (<�)����������.-)�������!>)

��. �*����� UPDATE

UPDATE<'"��-������-���ก��� ���>

SET<'"��������! > = <�)�������>

WHERE</�"���(�-����� �>

13

��. �*����� DELETE

DELETE<'"��-������%� >

WHERE</�"���(�-����� �>

2.1.2.5 #$�ก�� Crystal Reports 9.0 ,�.ก� Crystal Reports /�8�,�.ก��*��� ก��*�/��������-)�� s ���/ก�+%�ก

W���������"�%/�8����������$�+� /')�/+��&ก� ,�.ก� Word / "��.�+�#�����%� �"�.�+�#�����ก+�1 %�ก/�"��� �� ! /+����,�.ก� Crystal Reports /�8�/�"����"������������)#�,�.ก� �c�� Visual Basic -�4�.-)�)���� 3 6���-)��� /�"������� Visual- Basic 5 �1�� Seagate Software ���/�8� �1������ Hard disk ���/���%�กก��+�(+�/�8���� �c�� .���ก�*���)&�ก� VB #�/&�!'���ก)�� s %����/&�!'����?%%� ���"� VB .NET 6���%-�+-�4��� ���ก� Visual Studio. Net ��. ก��*������� Crystal Reports 9.0 %/���%�ก,�.ก� Crystal Reports Designer ���/�8�,�.ก����ก�*��� ��������� ,+�%��/�"���-)�� s �"�,�.ก������ก. /�� /�"��/����������(+�.��&/� %.�+� �����%���� �&/-�!���/�ก7(+��"� �� !/�8��������ก���/�"��� �� !ก7(+� ��ก/�-���ก� ����กก7����� ����ก��#�(t�!���������ก�� .rpt ��ก/�-���ก� �� !�������ก ก7������*�(t�!��4��4���#'����(+�

��ก%�ก��4 �����/�"����"� Crystal Reports Component ���#'��*��� �*�(t�!����ก�� .rpt �������%�ก,�.ก� Crystal Reports Designer ��.�+������+�&�ก�/����,�.ก� Visual Basic (+���ก+�&� ���/�-���ก�������������-���-�+-)�W�������� ��� /�%-�����/�"�ก��ก� Using Report Expert +��/')�ก�������������/�%���� .-)�*��� #������&)��/��)����/�%������4/�-���/�"�ก��ก� As a Blank Report .��&#�����ก���� OK ,+��)&��ก� ��������������+��-)�(���4

2.1.2.5.1 Report Header %�ก �/&5 "4��������&��4 �)&�������)+��� ���+/�8��)&���� Report Header 6���/�8��)&�.ก��������.�%.�+�/ ����������4�/�)���4�#���ก������ s -���ก-�.��&/���ก%#'� Report Header �*��� �*�/�8������ก.ก�������� �"�/�8���&������ก��������'�+��4

14

2.1.2.5.2 Page Header �/&5��+����/�8��)&���� Page Header ����*�����������) +��� ������ก��������������ก������������ �ก/&��.-)�������/�8� Report Header 6���-���ก-�.��&/�%/�7� Page Header ������������/���/')��)&����.�+�/��������� �"�.�+���&�������� 2.1.2.5.3 Details 6���/�8��)&��*���{�*��� .�+������ �����ก���������ก�"�����������ก ก7%.�+����� s ���� .�/�"����ก�.�+������#�.-)�����.��& %�*��)&���� Page Footer ��.�+����+����)������������ก s ����

2.1.2.5.4 Report Footer -)�%�ก Detail ก7/�8� Report Footer 6���/�8��)&�����*����/ �����4�/+��&/�)���4� ,+�%.�+�����)&���+������� Detail +����4� ก�.�+� Report Footer %��(�)%*�/�8�-���.�+����-���)��/��"����)�� Page Footer �"���4���+��������-�(��ก7.�+����-���4� ��4���+-�ก�������ก+�1 ก7.�+����-�ก�������ก+�1 +����4� %����ก�*���#'�.�+���+&���������/��� 2.1.2.5.5 Page Footer /�8�������)&���+�������.�+����+����)�����������������/ก�+%�ก Detail .�.�+���ก�������������� /���ก /�7�#�������"�#������"����& s (�6����"�/����������/�� ($� � �5�,%�!, 2545)

2.1.3 ����ก�� ������J"����ก������

2.1.3.1 � ��J������ก�� ������J"����ก������ ก�&�/���!.���ก. (System Analysis and Design) �������

ก����� ����/�y��4���#��)#�$�ก�%#+$�ก�%������"� �)�����$�ก�%��4� 2.1.3.2 �P�ก��! Q������ (SDLC)

��ก%�กก����� ����/�y��4���#��).��&ก�&�/���!.���ก. %')&�#��/ก�+��4�-��#�ก� �c�� ���+���4� ,+�. )�ก��*����/�8��-)�� s ,+�ก� �c�� -���ก-�.��&%�ก� (�+�&�ก��)�ก�%ก� 3 �)&����ก s �"�ก�&�/���! ก���ก. .�ก��*�(�#'�6������ก�%ก���4%����#'�(+�ก� ���+/�7ก ��ก/�8� ������&��6� 6���%#'�ก� �c��,�.ก�-�����ก��� SDLC (System Development Life Cycle) 6���%�ก� +�&��-)�� s +����4 1. ก�&��.��,�����

2. ก�&�/���! 3. ก���ก.

15

4. ก��*�(�#'� 5. ก� *����ก1� ก�&��.��,����� /�8�ก�&��.��ก &�ก��*����s � "4�W���&��/���#%&)�/�-�

#+%��-������� #��),+�/���%�กก��� �&��-���ก�������#'� ก)��.��*�ก�y�ก1��&��/�8�(�(+���� &��.��,��ก� %�+������#�ก��*���� .�/���+*�/���,�����

ก�&�/���! ��4�-��ก�&�/���!%/���/"���ก�y�ก1�.��*��&��/���#%#��&��-���ก�-)��s���(+�& &��� / "���*���ก*���+���/���+&)��&���( ������ #��)-���ก�6��� ������+���4�%-���-�-��%�+����!���.��%��������#'�

ก���ก. %/�8�ก� �%�5�&)� ���% �c��%+*�/���ก�(���)��(6���%/ก���&ก� ���$&�$�#�ก���ก. &)�%#����ก� �c��(�#����(+6���%/ก���&����ก� ก���ก. �������?-�ก� ��!+.&! /�"��)�� W��������. %*����-)�� s

ก��*�(�#'� #��ก��*�(�#'�%�*�#��/ก�+ #��)+�&�ก����� ก��+�� .� ก�-�+-�4� ,+�%�+����!���ก�%ก����4(�)#')/ ����&���)�/'"���"���� .-)/ "���&��/'"������������!ก.����#'�

ก� *����ก1� ,+����&(��ก� *����ก1�%(�)��#� SDLC %�ก���� (+���ก�-�+-�4�/ "�����%#'�������&(�/�� ������4%/�8�')&��/&�������&��������+/�"���%�ก %-������&��-���ก��� ���.���� /��,�,���#��)

��4�-��#�&�% �c�� ')&�#����ก&�/���! �����+*�/���ก�(+���)����.�&���.�/�8���4�-�� �*����������& ����/&��.�� ���5#�ก��d� �-�������,��ก� �c�� (+� ��4�-��-)�� s ��4�����ก15�����ก� ก�-�+���#%.ก��?{��-��.�&���&����y��-! ( scientific Management ) (+�.ก) ก�������?{�� ก������.�&���.ก�(��?{�� ก��/�����.�&���.ก�(��?{�������� /�"�ก.�&������+������+ .� �c�����/�"�ก��4�#��#'����(+� �*��� &�%ก� �c�� ( System Development Life Cycle : SDLC ) �ก� +�&� 7 ��4�-�� +����4

16

E�!��� 2-2 .�+�&�%ก� �c�� (SDLC) ��4� 7 ��4�-��

2.1.3.2.1 ก��ก��J�U$@VJ� P8U�8W�J������$X�J��� (Identifying Problems

Opportunities and Objective) ����/�y%/ก�+��4�(+�ก7-)�/�"����� ����"����#'�-���ก����&��-���ก�

#'� ����/�y�"� %�+ก�/+�� (+�.ก) %�+/ก7 /�ก��#�-��/�ก�� (�)������$�0� / ��� ����%-� �����&��-���ก�#��?%%� �� +����4��&-�����ก��� ���.ก�(� 6���/�8�������������ก&�/���! ����*�ก�.ก�(��� ��� ก�.ก�(� /+����������).��&�"�ก����� #��)��4�/�8�/"�����ก +����4� ��ก&�/���! �&ก*���+%�+����!#�ก��*� ��� �&/-�!(�#'����#�+���-)�� s 6���%-�������?{��#����ก-���.���/�X��������'�+/%�%(+�����y���#�ก� �c�� / "��#��/�8�(�-��/�X��������&��(&�

2.1.3.2.2 ก��ก��J�U� ��:���ก��9��9�������_̀�ab� (Determining Information

Requirement)

/�8�ก�/ก7 & &����������/�8��&��-���ก�����/�y������#'� ,+���ก&�/���! %-���#'�/�����#�ก�/ก7 ������ (Fact Gathering Techniques) (+�.ก) ก���)�-�&��)�� y�ก1�/�ก����������) -&%�� &�$�ก��*����#��?%%� �� ���0�15!���#'� .����������)&�/ก���&����ก� ก�y�ก1�/�ก����������) (+�.ก) ��)�"�ก��*���� .�����������������!ก �����-)�� s�������/&������)#� ก�y�ก1�&�$�ก��*����#��?%%� ��%�*�#����ก&�/���! �� &)� ���%�� s �*������)��( 6��� ����4���%��� ��������+ ��+ .�%�+����*���{��� (+� ���0�15!���#'� .���� ��� �*�#����ก&�/���! �� &)� �*������)��(

1. IdentifiyingProblems, Opportunities,and Objectives

2. Determining Information Requirement

3. Analyzing System Needs

4. Designing The Recommended System

5. Developing Documenting Software

7. Implementing And Evaluating The System

6. Testing And Maintaining The System

SDLC

17

/�"���%�ก���#'� �"���� ���/�8� �������/'���&'�{#������������*����)�*�#������� �ก(+�&)����������+���(�#� �"��( ��� / "��%(+�ก*���+�&��-���ก�����/�y������#'�(+���)��� ��&��� �5!

2.1.3.2.3 ก�� ������J"���� (Analyzing System Needs)

/�8�ก��*����������& &�(+�%�กก�ก*���+�&��-���ก�����/�y������#'� ��/����/�8�(+�.ก�ก�(����������� (Data Flow Diagram) %����ก������� (Data Dictionary) .�,������ก�-�+���#% (structure Decision) ��')&�#�ก�&�/���!

2.1.3.2.4 ก����ก������ (Designing the Recommended System) ��ก&�/���! %�*�.��0� ���/������4�#���4�-��ก�&�/���!��.���/�8�.��0� �*�+� '�4� (. -��(��) / "��#��/�7�0� ��ก15!���.�)������,�.ก�&)����&����� ��$!ก����)��( .�,�.ก��( ������%-���/����#� ����%�ก��4��*�ก�-�+���#%&)��&%�+,���������,�.ก���)��( ก�/'"���,���&)��,�.ก�%-����*���)��( #���4�-��ก�&�/���! ��ก&�/���! %-�����&)� �%-����*��( (What)� .-)#���4�-��ก���ก. %-�����&)� �%-����*���)��( (How)� 2.1.3.2.5 ก��! Q��g�h:" �"��ก��P U�����ก9�� (Developing Documenting

Software) /�8���4�-��ก��*����)&�ก���&)��,�.ก�/��!.���ก&�/���! / "�� �c��6�t-!.&!.�-���/-�����)�"�ก�#'�����& ��)(�+�&� ,+�,�.ก�/��!%/����,�.ก�-�����������(+�%�ก/�ก��������/} ����(+�%�กก���ก. ��ก��ก�.ก�(�/������.���#��&)��ก�/����,�.ก�%-�����ก1�ก� ��ก&�/���! +�&� 2.1.3.2.6 ก���U9����ก������8�� ก������ (Testing And Maintaining The

System) ก)�����%�*� ���������4�(�#'�%-�����ก��+�� ��4���4����+�� ��%

/�8�,�.ก�/��!/���"���%#�����#'� .���ก&�/���! /�8�����+�� ก��+�� �&#'�������%����#'�#�ก��+�� ��ก/�"���������+ ��+%(+��*�ก�.ก�(��� ��� 6���ก7�"�ก� *����ก1�

18

2.1.3.2.7 ก��U�����������$��� �_� (Implementing and Evaluating the

System) /�8���4�-����+����#�ก�+*�/��������� %-�����ก�%�+� ����#'� ก)��ก�#'����%�� .���ก��/����� / "��#���� ����&�� �#%������#'� �"��������-���.ก�(� /�"����ก� �c�� -)�(�

ก� �c�� ����/�y#��������$�0� ���-�����ก &�ก� �"���4�-�� #�ก� �c�� ���+� �ก��*���{������ �c�� -���/���#%#�ก &�ก� �c�� /�8���)��+� / "��#�����'�ก.-)���(+����������.��&��� ��+'� ���-�/����)��'�+/%� 6���%�)���#��ก�+*�/������ �c�� /�8�(�-��/�X��������&��(&� .���������.ก��?{�����/ก�+��4���)��&+/7&��4�-��-��. .����� SDLC ��4��"�&)�/�8�&�$�ก� �c�� . /ก)��"�. +�4�/+�������ก�*������ก-!!#'�ก� ก� �c�� ��-�4�.-))�+�-%�����?%%� ��6�����ก� ก��*�������/�8�,������'�+/%� ,+����*�+� ���ก�%ก�#�.-)�����/�8��*�+� .�)��� /')� /�"��/�7%��4�����ก�&�/���!!.��& ��4�-��-)�(�ก7�"�����ก���ก. /�8�-�� .-)��)��(ก7-�� ����/�y����#��)#��?%%� ���� &��%�&��&��6� 6���������4� %��(+���ก�&�$�#�ก�

�c��6�t.&!#���. #��) s ���������*������ก-!#'�(+���)��/�����ก� ,��ก� �c�� ��������+#�{) ������&��6� 6��� �"����&��/�������� (,�0�� /��������&�y!, 2549) 2.1.3.3 ���k����k����ab�a�ก�� ������J"����ก������

ก) _ ���� Flow chart ������ �"� .��0� �����ก�#'���{��ก15!��0� .���กy���.�+������4�-��ก�

�*�������,�.ก��"� �����4�-�� &�(������y���ก�(�����������-�4�.-).ก%�(+����� $!-�����-���ก� ก�/�������,�.ก�%�ก� (�+�&�ก�#'���{��ก15!��-W��-)�� s ���/��ก&)� ��{��ก15! ANSI (American National Standards Institute) #�ก����������� +��-�&��)�����.�+�#���-)�(���4 (http://www.geocities.com/S_Analysis/FlowChart3_new.html) :������� 2-2 .�+� ��{��ก15!#�ก�/����������,�.ก�

9 V� ก��" bk��9 V� ก��"������l����

%�+/���-�� / ��4���+���,�.ก�

��กy.�+���y���ก��*�������,�.ก�.�ก�(�����������

19

#'�.�+��*�����#�ก���&��� �"�ก�ก*���+�)�������#��ก� -�&.�

.�+�ก��)��������%�ก��)&�/ก7 �������*���/�����)��)&��&��%*����ก0��#�/�"����"�ก�.�+����� $!%�กก���&�����ก��

ก�-&%�� /�"���(�/ "��-�+���#% ,+�%��/�����ก%���/ "��.�+���y���ก��*����-)�(� /�"���(�/�8�%���"�/�8�/�7%

.�+����"�����������ก������ก��

9 V� ก��" bk��9 V� ก��"������l����

.�+�%�+/'"���-)����������0��#� �"�/�8���� % ���/�������/��������%�ก������y���/ "��%(���)ก��*������)��#+��)����������/��"��ก��

ก���4�����#��) #�ก5�������������&����&/ก��ก&)����%.�+� �#����������

�) ก�������E�!9U�ก��9����`� J�k� Data Flow Diagram (DFD) ก.��������"� Data Flow Diagram ������� .��0� .�+�ก�(�����������%�ก

.��)�������0����ก/�����#� / "��.�+�&�$�ก�(�����������%�กก &�ก������(���ก

20

ก &�ก������ 6�������{��ก15! 4 . �"� ���/������ ��/����������� ��กy .����/����������/�|+��������� DFD /�8�0� .�+�ก�/������.������������#��5(���)��ก &�ก��*����-)�� s ��� ����/�y +�/�t+�%��/�8�0� �"�/�8�,��������� �������/�y����"��#��/���#%ก��*������� ���#���. ����&����� ��$!�&)��ก.�������.�, /6�+�/�t+�(�)(+��"���&������#���ก15���-ก (Logic) ���ก &�ก��*���� ก�)�&,+��)�� s 0� +�/�t+��*�#��/�/���#%�)&��ก� ��� ��� /���#%ก�#'�������#�.-)�, /6� .����������/�8���%�กก��*�������, /6�,+�,������%/���%�ก+� �����+6���%.�+��)&�������)0����ก �)&���4�*���{/ �&)�/�8��)&���� �ก&)� ��4�s (+�� ��������%�ก���#+ .����� $!-)��s ��ก�)�(����#+ ��� +�/�t+� #�+� ��ก��(�%(�).�+�����������)��ก �"� (�)��������4�/�8��)&��ก� (http://www.thaiall.com/dfd/indexo.html)

:������� 2-3 .�+���{��ก15!���#'�#�0� ก.������� (DFD)

9 V� ก��" bk��9 V� ก��"������l����

1

Process

� ������ ��+ �.� D2

#!��g9 (Process)

���������� ������.��*�ก��*��&5 /�� /��� /�������0� ��������� �*�#��/ก�+������'�+#��) ,+�%/����'"��, /6�(&�#�&�ก�� ก�-�4�'"�� , /6�#���"����ก+����4 �*�����+�&��*�ก���� .�-��+�&��*��������"���&���������, /6���4�s

ก��9����`� (Data Flow)

.�+��)&���������������ก�)�/���ก &�ก���&���.����� $!��(+��)��� &�ก���&�.��& ��ก, /6�������)#�+�/�t+� %-�������4�ก.�������/���.���ก %�ก, /6�/���

����กm�����`� (Data Store)

�"� .��)�/ก7 ������6������)0����ก���, /6�

9���E����ก (External Entity)

�"� ����������)��ก ��&��������� ��%������� ���� ��)&���� ��&����"���������������)�������#�� �"�� ������%�ก, /6���� ���

21

����mกoU��ก�� (Level-0 : Context Diagram) �"� .��0� ก.�������+� �����+ /��ก&)� ������ก���ก� �"���ก/��ก&)� DFD ���� 0 ,+�.��0� +��ก�)�&%��/ ��������,�/6����/�8�'"����� ��� .���+�-��,t�&!/'"���-)���&)��,�/6�ก� /�7ก6!/��!���/�7�-�-�4 ,+�(�)��+�-���,-! %�+����!������.�7ก(+�.ก���4ก7/ "��.�+�.&+������� / "��#��/�7�&)� ��ก�,-�-� ก� /�7ก6!/��!���/�7�-�-�4#+ ��� �)&����/���+0��#� ���&)���ก &�ก��"�,�/6��)��#+ �����4� ก7%.�+����)#�.��0� ก�.�������+� ��� 1 -)�(�

E�!��� 2-3 .�+�ก��*������� DFD Level-0 Diagram �"� Context Diagram

_�E�!ก��9����`���U ���� 1 (Data Flow Diagram Level 1) . � � 0 � ก . �������+� ��� 1 (Data Flow Diagram Level 1) %�*�.��0� ก.�������+� �����+��.-ก���/���+ ,+�.�+�� &�ก����ก s .�������/ก���&����

22

E�!��� 2-4 .�+�.��0� ก.�������+� ��� 1 (Data Flow Diagram Level 1)

_�E�!ก��9����`���U ���� 2 (Data Flow Diagram Level 2) %.�+����,�/6��)�����.��0� ก.�������+� ��� 1 (Data Flow Diagram Level 1) 6���,+��ก-�.��0� ก.�������+� ��� 1 �)&�#�{)��������.-ก,�/6��)����ก/�8��)&��)�� s -)�(�(+���ก / "��.�+����ก &�ก��*������� #����/���+ ก�)�&�"� .��0� ก.�������+� ��� 2 ��4�%�*�ก�.-กt?�ก!'��ก��*����#�,�/6����.��0� ก.�������+� ��� 1 ��ก/�8��)&� s 6���ก &�ก�.-กt?�ก!'����4/��ก&)� Functional Decomposition .���ก,�/6�(+�.-กก%����ก��/�8�.��0� ก.�������+� ��� 2 .��&(�)�����.-ก�)��(+�-)�(�(+���ก ก &�ก�.-กt?�ก!'��%���+���)���+� ��� 2 6����"�&)�/ ��� �-)��&��-���ก�.��& .-)��)��(ก7-�� ��ก.��0� ก.�������+� ��� 2 ����������.-กt?�ก!'��/�8�ก &�ก��)��(+���ก ก�)�&�"� ���(�)#')/�8� Functional Primitive ����������� %*�/�8�-���.-กก%��/�8�+� ��� 3 -)�(� (,�0�� /��������&�y!, 2548)

23

E�!��� 2-5 .�+�.��0� ก.�������+� ��� 2 (Data Flow Diagram Level 2) �) E-R Diagram .��0� .�+��&����� ��$!�&)�������� (E-R Diagram) ������� .��0� ���#'�/�8�

/�"����"��*��� %*����������6���%�ก� (�+�&� Entity (.��ก��)�������������/�8�/"���/+��&ก��//ก���&����ก��) .��&����� ��$!�&)�������� (Relationship) ���/ก�+��4���4���+#� (http://course.eau.ac.th/course/Download/0230805/Chapter9.doc) 9W �$��ก����� E-R Diagram

1) �����:�q (Entity) ������� '"���������#+��������� /�8���$��������-)�� s �������� �(+�#��&��/�8�%�� 6�����%/�8��������%� -���(+� /')� ���� ������� ������� ก�ก�*� ����4�/����-�4#�W��������%(�)���&��������ก(�)��/����-�4�"��#�W�������� /����-�4�/0���4/��ก&)� /����-�4�)��.�) (Weak Entity) -�&��)��/')� /����-�4�&�-��� ��&��� ��ก���/�8�/����-�4'��+�)��.� / ������y%�ก/����-�4 ��ก����.��& /����-�4��4%(�)���&������/ �(�)��&)�/�8��&�-���� ��ก�����#+

-&%�� ��� ��กy�ก1�

1.1

��������กy�ก1�

��กy�ก1�

-&%�� 0��ก�y�ก1�

1.3

-&%�� Password

1.2

/���

1.4

������0��ก�y�ก1�

�����กy�ก1� ��������กy�ก1�

�����กy�ก1�

0��ก�y�ก1� �����กy�ก1� �����&�'�

���&�'�/ 0��ก�y�ก1�

24

E�!��� 2-6 ��.�+���{��ก15!���/����-�4

2) ������� �" (Attributes) ����������/���+���������#�/����-�4����� s 6���/�8��������#'��$� ����5��ก15���/����-�4����� s ���&������/+��&ก��ก� t|�+!�"�/�-������ .���� �&-! ��.���� �&-!�ก� +�&������������)&���&�ก��6�����%.�ก/�8�6"��.���� �&-!�)��(+���ก .���� �&-!�������5�� �-���)����4 /��ก&)� .���� �&-!��� (Composite Attributes) -�&��)��/')� .���� �&-!������) /�8�.���� �&-!�������ก� +�&������� ���/����� ��� 6�� �*�/0� %���&�+ .����(�15��! 6��������.�ก��ก/�8�.���� �&-!�)��(+���ก (���-���ก�) /')� .�ก/�8�.���� �&-!������) 1 6����ก� +�&� ���/����� ��� 6�� �*�/0� .�.���� �&-!������) 2 6����ก� +�&� %���&�+ .� ���(�15��! /�8�-�� ��ก%�ก��4 .���� �&-!��%%(�)���)����-�&/�� .-)��������)�(+�%�ก.���� �&-!�"�� s /')� .���� �&-!���� ������*��&5(+�%�ก.���� �&-!&��/ก�+ /�8�-�� .���� �&-!�������5�� �-���)����4 /��ก&)� .���� �&-!�����ก.���)��� (Derived Attribute)

E�!��� 2-7 ��.�+���{��ก15!���.���� �&�!

25

$���E����� ��9 �! �l"��J W�������:�q �&����� ��$! (Relationships) �"� '"�����.�+��&����� ��$!�&)��/����-�4�"���%

��กก&)� 2 /����-�4ก7(+�.-)#�ก���ก. W������������ �%�5��&����� ��$!�&)�� 2 /����-�4�*��� /����-�4.-)�-�&��%/ก�+�&����� ��$!(+���กก&)� 1 �&����� ��$! �&����� ��$!�&)��/����-�4 . )���ก/�8� 3 �/0� �"� - � ��9 �! �l"��J�r��:W�J�r�� (one s to - one)

%#'���{��ก15! 1:1 .���&����� ��$!. �����-)������ 6����&����� ��$!. ��4%/�8��&����� ��$!�������'�ก�������ก����/����-�4 ���&����� ��$!ก� ���'��������ก������ก/����-�4����� .-)�/��-�-�4���&����� ��$!-)�ก�� ,+����*�ก�����/'"����&)��.-)�/��-�-�4 /')� ���� � �"���#�{)ก� ,�/��� /�8�-��

E�!��� 2-8 ��.�+��&����� ��$!. �����-)������

- � ��9 �! �l"��J�r��:W�ก�8W� (One-to-many Relationship) (1:N) /�8�ก�.�+��&����� ��$!������������/����-�4�����&)����&����� ��$!ก� ����������ก� ��ก/�7���-�4����� /')� ��ก���ก� ����/��,�y� �!�"��"� �"� ��%��!�����ก1�ก� ��ก/���

E�!��� 2-9 ��.�+��&����� ��$!. �����-)�ก��)� - � ��9 �! �l"��ก�8W�:W�ก�8W� (Many-to-many Relationship) (M:N) �&����� ��$!�&)�����������/�7���-�4. ก��)�-)�ก��)� (M:N) /�8�/"�������)������%��)���ก#�ก���ก. W�������� /')� ��%%���?{��#�+������ก��� ��� .ก�(�������,+����&(�%����/�7���-�4#��)��4��� (Associative Entity) / "��/�8�/�7���-�4���/'"����&����� ��$!ก� ���/�7���-�4/+�� ,+���&�-������!/ "���� �&����� ��$!#�����)#�����������-)�ก��)� (1:M) /')� ��ก/���ก� &�'�������/ ��� �"� �����ก� ,��ก����� ���

26

E�!��� 2-10 ��.�+��&����� ��$!. ก��)�-)�ก��)�

�) Data Dictionary Data Dictionary �"� %����ก������� ������� %/�8�-�& �ก��5��ก15������������

#'�#����!ก .�/�8�-�&�*���{�*��� ��ก&�/���! #�ก� �c�� / �%/�8�-�&')&�#��������.����#'� ��ก�� �+���������-�&/+��&ก�� /�"����������4����)#�����ก�5!���-)��ก�� /')� ���)���.��ก.-)#'�������-�&/+��&ก�� /�8�-��

#�ก�/����.��0� ก�(����������� (Data Flow Diagram: DFD) /�8�ก�/����ก &�ก��*����-)��s #� ��� .-)���/���+���������-)��s �����กd#� ��� .��0� ก�(����������� (DFD) (�)������*�/���(+���4���+ +����4�#�ก�&�/���!.���ก. %��-�����ก�/�����*��$� �������� (Data Description) �"� %����ก������� (Data Dictionary) 6���/�8�ก�/ก7 & &���������4���+ ���/���+ �*��$� ��������-)��s #� ��� %����ก���������%.�ก/����(+�+��-)�(���4 http://www.geocities.com/S_Analysis/FlowChart1_new.html)

27

bk������b �: ก�����6"4� (Purchase Order) _̀�9�����k� : Somsak ����9���� : 10/07/49

:������� 2-4 .�+�-����/�'���

Attibute Description Data type Key Domain Remark

Po_no /�����# ����6"4������ก��� �������6"4�������/�����

Char(10) PK /�8�����/���������. �������"� yy-mm-nnnn

yy �"� 2 ���ก������� .y. mm �"� /+"��nnnnn �"� ����/��# ����6"4����.-)�/+"��

PO_Date &���������6"4������ �"�&�������ก# ����6"4�

Date /�8�������&������������. ������ mm/dd/yy

mm �"� /+"�� dd �"� &����� yy �"� 2 ���ก������� .y.

Cust_id �����ก����������6"4� Char(8) FK /�8�.���� �&�!������&����� ��$!ก� .���� �&�! Cust_id #��/�'�� Customer

Prod_id ���������������# /�7%��4

Char(5) FK /�8�.���� �&�!������&����� ��$!ก� .���� �&�! Prod_id #��/�'�� Product

Po_qty %*��&��������6"4� Numeric -�&/��%*��&�/-7����)�-�4�.-) 1 ��� 9999

Po_unitprice ���-)���)&�������(�)&�0�1�����)�/ ���

Float -�&/��%*��&�%�����/ก7 �y����(+�

28

2.1.4 ����ก��P Uก��v������`�

2.1.4.1 � ��J����������`� ������ �"� ���/�7%%�� /ก���&ก� /�-�ก�5! �"�������+� ������(�)�)��ก���&��� ���(�)���&������#�ก� �*�(�#'���� ��������%/�8�-�&/�� -�&��ก1 ��{��ก15! ��0� /���� �"�0� /��"���(�& (�� &5 ��)���&5�-�! 2545 : 9)

#���9�����������`�$��ก��U� � #�ก�%�+/-���������/�����)��4�-��ก���&��� ������%-���(+�� ก�%�+#�����)#�

��. ���/�"������ �&/-�!������ (+� �"� ก�%�+,����������������ก� +�&��)&�-)��s +����4

t|�+! (Field) �"�ก��)����-�&��ก� -��/���"���{��ก15! �/y1-)��s������&����� ��$!ก��.�+���ก15�"��&��������)��#+��)������� ,+����&(�t|�+!�����. )���ก(+�/�8� 3 �/0� �"�

- t|�+!-�&/�� (Numeric Field) �"� t|�+!���/�8�ก��)����-�&/��%*��&�/-7� /���y���� %*��&�/-7� &ก %*��&�/-7�� - t|�+!-�&��ก1 (Alphabetic Field) �"� t|�+!���/�8�ก��)����-�&��ก1���/�8�-����ก1�"�')��&)�� �&)��-�&��ก1 - t|�+!��ก� (Alphanumeric Field) �"� t|�+!���/�8�ก��)������ก����/�8�-�&/���"�-�&��ก1

/���!+ (Record) �"� ก��)����t|�+!������&����� ��$!ก��#���. #+��. ����� /���!�ก� +�&�t|�+!-)���/0�ก��&�ก��/�8�'�+ ,+� "4�W�����/���!+%-�����t|�+!���#'����������)������ 1 t|�+!6���/��ก&)����!t|�+! (Key Field) .�t|�+!���#'�/�8����!t|�+!#�.-)�/���!+��4�%-���(�)64*�ก�� (t�! (File) �"�ก��)����/���!+�����/���!+������&����� ��$!ก��#�+���#++��������+����4�(t�!%���ก� +�&�/���!+����s/���!+��&�ก��

W�������� (Database) �"�W���������ก� +�&�(t�!������&����� ��$!ก�� ,+�#'����กก�(�)#�����������&��64*�ก�� �����/��ก#'����(+���ก-���.�&+/7&6���/��ก&)� ก�%�+ก�W��������

29

2.1.4.2 � ��J������v������`� W�������� ������� ก�& &�������������&����� ��$!ก����&�(&�+�&�ก��.���ก%�+

(&�/�8� / "���)��-)�ก�%�+ก�.���&��� %�กก�#'� ก�%�+ก�W�������� (Database Management System) ก�/������������#�W��������%��%*�/�8�-����� ก�%�+ก�W����������')&�/��ก&)� database management system (DBMS) /')� Microsoft Access, Microsoft SQL Server 2000, Oracle 6���%')&�#�����#'������%�+ก�ก� ������-���&��-���ก�(+� #���)&����#�{) s��%��W����������กก&)� 1 W��������/')� W�������� ����ก W����������ก��� W�������������� /�8�-��

2.1.4.3 � ��J������ก��P Uก��v������`� ก�%�+ก�W��������(Database Management) �"� ก� ���.��)������������ก/ก7

& &�(&����y���!ก��� / "��-� ����-)�ก�#'������)��������$�0� .��+ก�64*�6������������ &���4��+�&����+.���������������/ก�+��4�0��#����!ก+�&�

/�"���%�ก��������4���+��ก/ก7 (&�#�-��� .-) W����������4�(�)���{�-#����ก�-�+-)�ก� ������������)0��#�(+�,+�-� -���ก�*��)�� %�+ก�W�������� (Database Management System) �"� DBMS %��%#'����������(+� ����������ก��� DBMS �"� �*�#��ก�/��ก#'�������%�กW��������/�8����%�ก�)&���!+.&! (Data Independence) ,+��*��������%�+ก�.��& ����&����ก-��� �&��64*�6��� .��&����� ��$!�&)��������0��#�W��������.��,�.ก�/��! �)���#�����#'������/��ก#'�������%�กW��������(+�,+�(�)-����� ���,���������ก��0� ���������#�+� ��ก. /+��&ก� ,�.ก�/��! �*�#��ก�#'����W��������ก%��(����ก��)����#'����&(�(�)%*�ก�+���)/} �#�ก��)�,�.ก�/��!/��"�� #��+�-��ก-)�(�

E�!��� 2-11 ก�%�+ก�W��������

30

���"$��ก���������v������`� W���������)&�#�{) /�8� �����ก��*���� �&/-�!/�����')&�#�ก�%�+/ก7 ������ . )���ก/�8� 4 �/0� �"�

ก. ��!+.&! (Hardware) #� W�����������������$�0� �&����!+.&!-)�� s ��� ���%�*��&� �&�� �+&ก#�ก� ���W��������(+���)��������$�0�

�. ,�.ก�(Program) #�ก���&���W����������4�-���#'����������. %��%*�/�8�%-����� ,�.ก�����*��������-)�� s (+� /')� �& ���+�.�W�������� ����W�������� ��������� %�+ก������ /�8�-�� /��ก&)� %�+ก�W�������� (Database Management: DBMS) ,+�,�.ก�/��)���4�*��������%�+ก�W��������.�/�8��"��ก����&)�����#'�.�,�.ก����ก-!-)�� s }��4� %�+ก�W��������%�����������+����4 - ก*���+ .�/ก7 ,������W�������� (Define and Store Database Structure) - ก� %�������%�กW�������� (Load Database) - /ก7 .�+�.������� (Store and Maintain Data) - �������ก� �d� �-�ก� (Operating System) - ')&��& ����&�����+0�� (Security Control) - ก�%�+�*��������*���.�ก�ก�� (Backup and Recovery)

- �& ���ก�#'������� ���ก��������#'�#� (Concurrency Control) - �& ����&�� �50� ��������� (Integrity Control) - �*��������%�+�*� %����ก������� (Data Dictionary)

�. ������ (Data) W��������/�8�ก�/ก7 & &�������#��/�8�y���!ก�����������)���� 6���������/��)���4�����/��ก#'�)&�ก��(+� - ����ก (People) ��+����4 - ���#'����&(� (User) - ��ก����d� �-�ก� (Operator)

- ��ก&�/���!.���ก. (System Analyst) - ���/����,�.ก����ก-!#'���� (Programmer)

- ��� ���W�������� (Database Administrator: DBA) - ��4�-��ก��d� �-���� (Procedures)

31

�. ���#'� (User) ���#'� �"� ������/��ก#'�������%�ก W�������� �����. )���ก/�8� 3

ก��)� (+�+����4 - ��� �c��,�.ก� (Application Programmer) (+�.ก) �������*�������� �c��,�.ก� / "��/��ก#'�������%�ก W���������� ��&���,+�,�.ก���� �c����4��)&�#�{) ��ก%#'�ก� �*�����#�ก��)� Data Manipulation Language (DML) ��� Query Language / "��/��ก#'�������

- ก��)����#'� (End User) ก��)����#'�(+�.ก) �������*�������%�กW��������(�#'���� - ���%�+ก�W�������� (Database Administrator/DBA) ���%�+ก�W��������(+�.ก) ��� �������*���������& ���.�-�+���#%/ก���&ก� W����������4���+ /')� ก�ก*���+,������W�������� &�$�ก�%�+/ก7 ������ �&�����+0��-)�� (http://pioneer.chula.ac.th/~vduangna/2200199/page3.html)

2.1.5 � ��J������ก����� Normalization ก &�ก���!���(�/6'���(The Normalization Process) �"� ��4�-���"�ก &�ก�

���#'��*��� %�+/ �� , %�+��. , %�+,������ , �+�&��64*�6����������������*�ก�%�+/ก7 #�.-)�-��� / "��#��(+����������/ก7 ���)���&���)�/'"���"�(�)��+.���ก��/��

#�ก��*� Normalization (�)%*�/�8�-���/�����4�-��ก��*� First Normal Form .���4���+#���4�-��ก��*���� First Normal Form /���(� ก��*� Normalization % �%�5�%�ก,����������������*����*� Normalization ��4� &)�%�+���)#�,�����������������4�-��#+ .��&%��/����*� Normalization %�ก��4�-����4/�8�-��(� (y�0'�� �� ���', 2549)

1. � q�:��ก����� First Normal Form (1NF) �/�'��#+%���)#���. ��+W��+� ��� 1 (1NF) (+� �/�'����4�%-�������5�� �-�-)�(���4

1) /�8��/�'����������!���ก����/�'�� 2) (�)��ก��)�������64*� (repeating groups) ���)#��/�'���"�ก�)�&��ก���������"� .-)

�')���"�/6� (Cell) ����/�'��%-���/ก7 ������/ ���������)� (atomic value) /�)���4� 3) .���� �&�!��ก.���� �&�!���(�)#')���! (Nonkey attributes) %-�����4�ก� .���

� �&�!���/�8����!���ก��)���� �5!

32

2. � q�:��ก����� Second Normal Form (2NF) �/�'��#+������)#���. ��+W��+� ��� 2 (2NF) %����5�� �-�+��-)�(���4

1.) �/�'����4����)#���. 1NF 2) -���(�)��ก���4�-)�ก��/ ��� ���)&� (Partail dependencies) ก�)�&�"� -���(�)��

.���� �&�!���(�)#')���!-�&#+��4�ก� �)&�#+�)&������������!���ก (������!���ก�ก� +�&�.���� �&�!��กก&)������-�&��4�(�) �ก/&��ก���4�-)�ก��. ���6���t%����������)(+�#��/�'���������. 2NF

3. � q�:��ก����� Third Normal Form (3NF) �/�'��#+������)#���. ��+W��+� ��� 3 (3NF) %-�������5�� �-�+��-)�(���4

1) �/�'����4����)#���. ��+W��+� ��� 2 (2NF) 2) -���(�)��ก���4�-)�ก��. ���6���t (transitive dependencies) ก�)�&�"� -���

(�)��.���� �&�!���(�)#')���!-�&#+��4�ก� .���� �&�!�"�� 6���/�8�.���� �&�!���(�)#')���!/')�/+��&ก�� 2.1.5 ���#�#������"#��U

���"#��U ( Bar Code ) �"� ��{{��ก15!���.�)����#'�.��������-�&/������ก15/�8�.� ���&����� ��.-ก-)��

ก����4����)ก� -�&/�����ก*�ก� ���)�����)�� ก��)��������%��y�����กก������.�� / "���)��������/���/ก7 #���� �&/-�!,+�-�(�)-����)��ก�ก+�������.�X� �� ! ��4/�8���-W����ก��������#'�ก�����&,�ก ก��*�/���������%�ก���.� ���������/�8�&�$����&+/7&.��&���)�/'"���"�(+���������������.�#���&���+&ก.ก)���#'����(+�+� ก�#'� �!,��+/ "���&��&+/7&�������-)�/�-�ก�5!

�J 9���"#��U �ก� +�&� 3 �)&� �"� �)&����/���6���/�8����/�������& (,�)�#�) .���+*� �����+�&��ก&���������/���-����-W��.-)�'��+��� �!,��+ �)&�������-�&��ก1/�8��)&����.�+��&������������������/����*��� #���)��/���#%(+� .��)&���+����.� &)�� (Quiet Zone) /�8��)&����/�"����)�� �!,��+#'�ก*���+�� /�-��� �!,��+.�ก*���+�)�#��ก� ����& (�&��/������ก������.��#������ "4���&.-)�'��+���#'�.������&) ,+�.-)�/���%���&����&/�)�ก��/���-���*�+� #�.�&���%�ก6���(��&� 6���/�8��,�'�!-)�/�"����)�� �!,��+ (Barcode Scanner) #�ก��)����������� ����ก(&�

33

��:�v�����"#��U ก�ก*���+��-W�� �!,��+ /�8�&����ก�ก���ก. ��{{��ก15! (Symbol Technology)���/������.�������� / "��#��/�"�����/�7ก����ก�!������)��������(+�,+���-,���-� ,+������. ��� �!,��+ ( bar code format ) �����ก����'��+/ "�� �c��#��/�����ก� ก�#'����#��?%%� �� .-)�'��+����5�� �-������. /} ����%�+�*�/�8���-W�� �!,��+ 6���/��� �c��ก����-�4�.-)���y&1 .y. 2510 .���-W�� �!,��+�����#'�ก����ก �"� EAN (European Article Number) 6���ก*���+��-W��,+� EAN International ( International Article Numbering Association : http://www.ean.be ) .� UPC (Universial Product Code) 6���ก*���+��-W��,+� Uniform Code Council.Inc (http://www.uc-council.org)

ก�������� ก��*������� �!,��+��4���y����{��ก15!���/�8�-�& �!,��+/�� ก� /�"������#'��)�����

�!,��+��4���ก��/�8������� ,+� �!,��+ 1 ��-���4�����ก15/�8�.�)���+*�.���&��� ก�� #'�.��������(+���4���4� 13 -�&��ก1 �)&� �!,��+ 2 ��-���4�����ก15���-)����ก(�-��'��+��� �!,��+ /')� &�ก�� ���/������%�-����"����/�������"���� ,+�ก���ก. #�� %�������(+���4�.�&-�4�.�.�&��� �*�#������� %�������(+���ก��4� ,+������ %�������(+����5 4,000 -�&��ก1 ��������� %�#� �!,��+ 2 ��-���4������#'�(+�����0�1� /')� 0�1����ก�1 0�1�{������ 0�1�%�� 0�1�/ก���� /�8�-�� ก��)����� �!,��+ 2 ��-���4������*�(+�.���� �!,��+%/���� ก�� ��& �"�.��ก������0� �!,��+ ���)&�/������ก7������)��������(+� ���ก5!#�ก��)��.���+��� �!,��+ 2 ��-�������'��+/')� /�"����)��. /�/6�! �������#'�ก�� &�(����,�y� �!�"��"�. ��ก�����)����#�-�&6���-���-�+-�4�,�.ก���+���(&� �?%%� ����ก�#'���� �!,��+ 2 ��-���)��ก&����&��#������/�y /')� {������ /ก���� %�� (-��&�� �/��ก� /����� ,+��*�(����ก-!#'����(+�������. -����ก15ก�#'���� ,+�. )�/�8�ก�#'���������� %�#� �!,��+ 2 ��-�,+�-� /')� ก�%�+/ก7 ������.����/���+/ก���&ก� ������.����-0�5�! ก�/ก7 �&�-������&�,+�#'�����+����"������ �!,��+-�+���) ก�/ก7 ������.��&�-��������� ��� .���ก�#'� �!,��+ 2 ��-���������"� ก� %�������'"��/&7 (6-!��(�#� �!,��+ ,+����#'�-����*�,�y� �!�"��"�-�+ก���������ก�-�+-�4�6�t�!.&!�)�� �!,��+ 2 ��-�(&�(��)����� �!,��+ %�)�����.��&�*�ก�/'"���-)�(����/&7 (6-!��4�(+�,+�-� -�&��)��/')�ก�+�&�!,��+0� / �� /����/��ก/����*��� ,�y� �!�"��"� �"�������/ก���&ก� ก�,=15�-)��s

34

���#�#������"#��U �?%%� ��/��,�,��� �!,��+�����-�ก*����/���(�/������.���ก &�ก����- ก�-�+-�� .�ก�+�.��ก1�������#���-���ก�-)��s ��)����ก ,+� �1��&�%��-��+���'"��&)� t��-! .��+! 6����.&� �&)� .� ��/�'��������-�ก*����(+�� ก��� #'���กก&)�/��,�,��� �!,��+�������-�������/�)� ก��� #'����/ �����4�/�8�����%�กก���� �!,��+�����-������-� �����&��-���ก�+��������� ก� � .��&�������#�ก�-�+-�� %/�7�(+�&)� �&������� "4�W�����/��,�,��������-�(+�/������.�����)��&+/7& .�#���&���)�/'"���"�#�+���ก�&����������/ก���&ก� ก�%�+�)� ������ '�4��)&��"��)&��ก� ��{��ก15!�����-����&�������/ ��� ����%&���������%}�����#'�#�ก�-�+���#%.�#���ก15ก��*����-)��s ��� ������. /+���*�(�)(+� ����4� �!,��+�����-���%/��ก(+�&)�/�8� �W��������. ก �� �"� �(t�!������. ก �� ��ก%�ก��4 ก��� ���/��,�,��� Area Imaging #��+���4�ก7(+�ก*�%�+���%*�ก�++���ก�#'���� �!,��+�����-���ก(�(+���)����ก .� ��/�'��������-�%����ก���&)�%/�����/������.���ก�+*�/���������$�ก�%(+���)����ก ���+�����������{��ก15!�����-������)ก7�"��&�������#�ก�/���������������/ ��� �-)�ก�#'����.� ��/�'������(�)%*�/�8�-���/������W�������� -�&��)��/')� .� ��/�'���+���ก� �ก�0������ ���(�)�����/������W��������%�ก�(ก�(+� ��ก���������.ก�,��+�����-����-�&���ก5!(+�,+��)��/ "��/ก7 ������/} ���4���+.�������ก�ก*���+�)����%*�/�8�-)���� �ก�(+���)��� ��&� %/�7�(+�&)���������� �,0�.���-���ก���(+��,�'�!%�กก�#'� �!,��+�����-�#�+������/�"�ก���ก�/������W����������)����ก ,+�������-�������*��� ��� �,0�.�������-�������#'� �!,��+�����-�/ "��/ ���/-��}��ก�������%*�-�&�����,��+��ก��4�.�&�������+���� ������+��ก�)�&��ก#'�-��+��4� 6� ���/'�/ "����� ����ก�-�+���#%.�ก &�ก����%�*�#��.�)#%(+�&)�ก�����/&����-7�ก/�8�(� ��)��/����� ก����)�/7&��4� ก*�%�+���-0�5�!������(�)(+���ก%�ก������������ .��*��&��&���+&ก#�ก�-�+-��.�/��ก�"�(+���)��������$�0� /�"���%�ก������/+�����(� ���ก� ���-0�5�! ก�/������ ���������������-������%��/�8���������*���{��ก .�.�)���&)����#�� �ก�,�%��-�ก �������)� ���������ก .����!ก�"��s #�6� ���/'������� ������/} �-�&���������.�&�������+����(+�,+�-� ก� �c����� �!,��+�����-� ��%���(+�+����4

35

������/} �-�&��������� ,��+/���ก6! � %�0�5�!��������� �,0������/ ���/-����{��ก15! U.P.C./EAN �����'�+�������"�,��+%*��&���ก.������#'�/ "��� ���&����ก-������������(+� �5��4 GS1 ก��)�������-W���&)���/�y 6���/�8����������{��ก15!.� U.P.C./EAN ก7ก*������� ����#����ก��*� �!,��+�����-�(�#'�#�-��+������ก��ก��4� ��.����0� �������W#����W-���ก����&�-����������� %��-�����ก�-�+-��+�&�ก�#��,��+�"�����/��/} �-�& �?%%� ����ก��*���!/�t(�+�(�#'�#�����.� ��/�'��� .-) �!,��+�����-������%�+ก�-)��&��-���ก�������.�&� ��4�6� ���/'�(+��)��ก&)� ��ก%�ก��4��{��ก15! �!,��+�����-���������#'�/�8�����+����"������&�(+�.�.� ��/�'�����4���+�/��"��%/-� ,-��)��&+/7&#�����#�� �ก�+���ก�+�.����0� /�"���%�ก��{��ก15!��������+ก��+�+��� �!,��+�����-������.ก��?{��/+��s ��� �!,��+(+� �����"��.ก�/��!������)����{��ก15! �!,��+(+���4���+.��%���)&����,����� ��ก��4���������/������������(+���กก&)�.�)#�)����/���%*�-�&��������&� ��-���ก� �?%%� ����-W�� �!,��+�����-������#'���� ����ก�-�+-��.�ก����-��-,���-�#���-���ก���ก�y��� ���-! ก��,�� ��/�7ก����ก�! /6�����+�ก/-�! .�,������� �*�#��(�).��ก�����-���ก�/��)���4%�����#'� �!,��+�����-���ก��4� �&��ก��&�������/��,�,��� %�ก���%*�ก�++���/��,�,������ Area Imaging �*�#��ก�/������%�ก.� ��/�'��� �!,��+�������-�(�#'���{��ก15!�����-�/�8�(�(+���ก /�"���%�ก�.ก�/��!/�/6�!(�)������)����. �����-�(+���4���+ �.ก�/��! Area Imager 6���/�8�/��y+���ก��)�������-�/����4�ก7(�)������)��,��+�����-��(ก�ก&)��&����&.��(+� ก�/�"�ก/��,�,���ก��.ก��*��� �!,��+�����-�ก)��������4%��/�8�/"���%*�/�8���)����ก/�"���%�ก(�)���.ก�/��!/�"���/+��&��������#��ก���� ���� ��{��ก15! �.ก�(+�#��(ก� ���&���)�/'"���"� .��.ก�(+���)��&+/7& .-)+�&��&���������� Area imager (+�.ก) ก��)�� �!,��++�&�ก�%� 0� ��4���+�����{��ก15!.�#'�6�t-!.&!��&���0� / "����+���0� .�������)�� �!,��+. /���-�/+�� . 6��� .�. /���ก6!#�������y��� (Omnidirectional) �*�#�����#'�(�)-���%�+/����"�%�+.�& �!,��+/ "���)��/��"��/+�� �*�#���)��(+�/7& ��ก%�ก��4 ก� �c���.ก�/��! Area Imager �)�#��) #��������)��(+���4�. /���-�

36

.� �!,��+�����-�#��-�4�.-)(�)ก����4&(�%����ก&)� 50 t�- /�8�����%�ก�&��ก��&����#�+���ก��)��0� +�%���� ,+�/} �%�กก��)��0� ���,�y� �!�"��"� ,+� Area Imager �)�#��)#'�ก��� .��. ��-,���-� ����*�#��ก�������,�y� �!�"��"������#'����(+���4�#��#ก�� ก��� .�(ก� 6����*�(+�+�ก&)�����.ก�/��!. /�/6�!%�*�(+� ��ก��4����#��ก���� ���� �!,��+(+�����'��++�&� ��4���4 �1�� ���/-�!/�� ���&�-ก�+���/��,�,����.ก�������� ก�5!����&��� (+�#'�ก� �c��+��ก�)�&��')&�#�ก��*�&�%��.� �c��/ "�����- Area Imager -�&.ก���������)��(+��#ก��.�(ก�(+� .������"� Intermec Intellibeam? EX25 Area Imager ,+� Intermec Intellibeam EX25 /�8�ก�(ก�.ก� Area Imager -�&.ก���������)�� �!,��+�����-����6���ก�� �����-�. /���ก6! .� �!,��+�������-� #���y���#+ก7(+���4�#��#ก��.�(ก� ,+���+����)��(+�/��� /��� #��/�7�����&��.-ก-)���&)�� Intellibeam EX25 ก� �.ก�/�/6�!#�ก��)����{��ก15! �!,��+�������-�.������-�#��������+ ��4��#ก�� ก��� .�(ก� ��ก%�ก��4 ก�(ก�.ก���� Intellibeam EX25 ����������&ก/���ก� ��� �&/-�!.��.ก�/��!��� �1��-)��s (+�,+�-� .������� ก�%� 0� ���(�)#') �!,��+ 6��������#'��ก� #�/�ก��ก��)��� .�� ������ -��+%� ����ก0� ���/67�/ "��/�8����กW��#�ก��)��� (+� /�8�-�� ���U����� ��9����?aJ�W �&��ก��&����/��)���4�*�#������d� �-���������#'��.ก�/��!/�"���/+��&#�ก�%� ก��*�������������/} �-�&������-0�5�!���������.ก�(+�%�ก�#ก��.�(ก� (�)&)�%#'���{��ก15! �!,��+. #+ก7-�� �&���������4/���ก� ������-���-���ก�/������������%*��&���ก ����ก����/��/} �-�& ������ก�ก*���+�)��"��������"��s ���/ก���&ก� ���-0�5�!6���.� � %�0�5�!(+���กก&)� �!,��+�������-�. /+�� -�&��)��/')� #�������-'�4��)&����-!'�4��*��������(+�#'��,�'�! Intellibeam EX25 #�ก��� ���ก�-�+-��'�4��)&�.��*�#�� �!,��+/+�� ����)�������#'����(+�+�&� ��ก%�ก��4 ก�/������%�ก �!,��+/���-��������-�(�/�8���{��ก15! �!,��+�����-�. /���ก6! ')&�#�� �1�������/������������/} ��"��s (+���ก��4� .���������-&%%� ������'�4��)&�+�&��.ก�/��!/+��& ���#'����(+���4�� ������ -�+-�� .��.ก�}��ก���)�����ก(+� ,+� Intellibeam EX25 /�8����ก5!/+��&���������)����{��ก15! �!,��+(+����ก���� (�)&)�%/�8� �!,��+/���-� . 6��� . /���ก6! &���4� UCC/EAN, Code 39, Code 128,

37

PDF417 .� Data Matrix 6���������)��(+�#��������.-ก-)��ก�� .����������)�� �!,��+%�ก������/�7ก���+ 12 ��y�(+� .�%�กก��+�� &)�������.ก�(+�/7&ก&)�/�"����)��. /�/6�!��� 66 /��!/67�-!

2.2 ���ก�������ก��� ����

����P��J�W��9������������������mUox�$��"���"� �.��k�� P.������mU +�ก.ก�& /&���/��7ก ���%�+�*� %*���)�����������������/�7+(�/��!��!� �./�"�� %.���/�7+ ��ก �c����4�,+� Program Microsoft Visual Studio 2005 #'�#�ก�/����,�.ก� .�#'� Program Microsoft Access XP /�8�W�������� %�+�*���4�/ "��#��/ก�+�&���+&ก/�8�/ �� #�ก�/ก7 ������ก�6"4���� #���)��-)�ก��+�� .�-&%�� /�"��/ก�+��4���+ ��+ �+&ก#�ก��*��&5��+/��� ��ก�y�ก1�,�.ก� ���/�8������������+��� �%#'����%��(+� ���/+�����(�)������$�0� #�ก�-�+�-��ก������ ')&�#�� ������&���+&ก������4� �?{��.������ �"� ก���ก. t�!�ก���� #��)&����ก����������#��ก� ��ก��� /�"���*�ก� ����ก������ ������(�)��ก ����ก�� �W��������

�����bW�gkq� ��P Uoh���"�?P ก������:"

ก�{%�� �('�y� ���%�+�*� +�5� '� �& ���%�+�*�

/')�6"4� .�%�+(t.���!�%�ก�����-! ��ก �c����4�,+� Program Microsoft Access 2000 #'�#�ก�/����,�.ก� .�#'�/�8�W�������� %�+�*���4�/ "��')&�#�ก�%�+ก�����%�ก�����-! ���&���+&ก ��ก-��� ��)��������$�0� / "������+/&��#�ก��*���� / �%')&�#��(�)-���/���/&��#�ก�%�+/ก7 /�ก�� / "�����%������������-)�(�#�����- ��%�กก�y�ก1�,�.ก� ก�/')�6�� �*�#��ก��*����/�8� ��ก��*���4�-��ก��*������� /')�6"4��%�ก�����-!.����������y�ก1���&�/���!��ก. #����ก�#'����(+�%�� �����%�+�*������-)�� s ���/ก���&ก� ���/���+�%�ก�����-!(+� �?{��.����%*�ก�+ �?{��%/ก�+ก� ��� �c�� ,+����(�)��ก��+�� �&����+ ��+ ��� �c�����(�)���&����#�ก�#'� Program Microsoft Access 2000 /�)�����& .������� ����)����� �1��(�)��%/�|+/��(+�

top related