잊지 않겠습니다.

SVC 설치법

기타 자료들 2009. 1. 7. 13:23
SubVersion 서버 설치 방법 :

1. 아파치 서버 또는 파일시스템 서버를 사용할 것인지를 결정
2. Repository를 작성시켜준다.
    svnadmin create c:\repository
3. password와 권한 설정을 시켜준다.
   권한은 none < read < write 순으로 된다.
4. Port를 설정시켜준다. Default 값은 3690 Port
5. svnserve를 실행
    svnserve -d -r c:\Repository

svn의 접속 :
  너무나 쉽다. 사용하기 쉬운것인 svn의 최대 강점인듯
 svn://IP주소/Repository 를 이용하면 아주 간단하게 svn에 접속 가능하다. 너무나 쉬워서 좋다. ^^


CollarLab의 SVN 사용법[영문]
CollabNet Subversion server installer for Windows
Version 1.4
Release Date: October 23, 2006
Contents
   1. Platform and configuration
   2. Overview
   3. Installation tips
   4. Post-installation instructions
   5. Limitations
   6. Making Subversion work for you
   7. About Subversion and CollabNet
   8. Support for CollabNet Subversion

1. Platform and configuration

   Product: CollabNet Subversion server 1.4
   Supported platform: Windows XP SP2
   Support: FSFS
   Apache Modules: ssl, mod_dav_svn, mod_dontdothat

   Pre-requisite: The user needs administrative privileges to install
                  and uninstall CollabNet Subversion.

2. Overview

   CollabNet Subversion is a free download of open-source Subversion,
   compiled and tested by CollabNet. For more information about
   CollabNet Subversion, visit http://open.collab.net, the online
   community dedicated to Subversion and CollabNet users. Register and
   get free member access to CollabNet Subversion add-ons and services,
   such as:
   - Commonly used GUI Clients
   - A free online training class
   - A support knowledge base
   - Peer to peer support forums
   - Best practices communities around Subversion
   - The openCollabNet Technical Newsletter
   - Release and patch notifications
   - Collaborative software projects
   If you are interested in professional services from CollabNet,
   the primary corporate sponsor of Subversion, go to:
   http://www.collab.net/subversion to read about:
   -  Technical support
   -  Online training
   -  Instructor-led training programs
   -  Migration services (from CVS, Microsoft VSS, etc.)
   -  Subversion consulting

3. Installation tips

     If you are installing an Apache server, the installer will ask you for a
     "Repository URL". This represents the prefix of the URL which users can
     use to connect to Subversion. If you set this URL to 'svn', then users
     will be able to checkout their repository from
        http://hostname/svn/repos-name
     We recommend that you use 'svn' as your URL prefix, as this is common
     practice.

4. Post-installation instructions

   A. Using svnserve
      ==============
   To use svnserve as your server, follow these steps:
     1. Open a new terminal (command prompt)
        NOTE: If you have an old command prompt open (from before Subversion
              was installed), remember to open a brand new command prompt.
     2. Create a subversion repository
        mkdir <Repository_Path>
        svnadmin create <Repository_Path>\<Repository_Name>
        E.g.
        mkdir C:\repositories
        svnadmin create C:\repositories\my-first-repos
     3. Setup a password database
        Edit the svnserve.conf file inside the conf directory of your
        repository using notepad.
        E.g. If your repository is C:\repositories\my-first-repos,
             svnserve.conf will be at
             C:\repositories\my-first-repos\conf\svnserve.conf
       Inside svnserve.conf, you will see the following information:
         ### The password-db option controls the location of the password
         ### database file.  Unless you specify a path starting with a /,
         ### the file's location is relative to the conf directory.
         ### Uncomment the line below to use the default password file.
         #password-db = passwd
       Follow the above instructions, and uncomment the "password-db=passwd"
       line, so that it simply says:
          password-db = passwd
     4. Setup some usernames and passwords
       Next, edit the 'passwd' file. This passwd file is located in the
       same directory as svnserve.conf.
       Inside the passwd file, you will see the following information:
       ### This file is an example password file for svnserve.
       ### Its format is similar to that of svnserve.conf. As shown in the
       ### example below it contains one section labelled [users].
       ### The name and password for each user follow, one account per line.
       [users]
       #harry = harryssecret
       #sally = sallyssecret
       To add a new user account, add your own username and password
       inside the [users] section. For example, if your name is "joe",
       and you want to set your password to "super-secret", add a
       new line like this:
         joe = super-secret
       Go ahead and add as many users as you like.

     5. Open Port on Windows firewall.

        Before starting the server, the firewall needs to be notified that
        this particular port is going to be used. To enable this port in the
        Windows firewall, please follow the instructions given in the below
        URL.
 http://www.microsoft.com/windowsxp/u...xceptions.mspx
        Note: svnserve.exe is the program name which needs to be added to the
        exceptions list. As an alternative, you can also use the port where
        you decide to run the server. By default, svnserve will be run on 3690.
     6. Start svnserve
        svnserve -d -r <Repository_Path>
        E.g. svnserve -d -r C:\repositories
     7. To provide read and write access to anonymous users, modify
        the conf/svnserve.conf file inside the repository.
        anon-access = write
        To restrict an anonymous user from the repository
        anon-access = none

     8. Checkout the repository
        svn co svn://localhost/<Repository_Name>
        E.g. svn co svn://localhost/my-first-repos
     Tip: If you are checking out your Subversion repository from a different
     computer, you should replace 'localhost' with the ip address or hostname
     of the machine which is hosting the Subversion repository.
     9. Setup svnserve so that it starts every time your computer starts
        Open the Windows Explorer and navigate to your CollabNet Subversion
        Server installation. By default, this path is:
           C:\Program Files\CollabNet Subversion Server
        Right click on the "svnserve" executable and select "Create new
        shortcut". A new "Shortcut to svnserve" will appear.

        Right click on this shortcut and select "Properties". Edit the
        "Target" field inside the "Shortcut" tab to match the svnserve
        command you typed in step 5.
        E.g. svnserve -d -r C:\repositories
        Right click on your shortcut again and select "Cut".
        Open the start menu and navigate to:
           All programs > Startup

        Right click on the "Startup" icon and select "Open All Users".
        The "Startup" folder will appear in a new Explorer window. Right click
        in this window and select "Paste".

   B. Using Apache
      ============
   To use Apache as your server, follow these steps:
     1. Open a new terminal (command prompt)
        NOTE: If you have an old command prompt open (from before Subversion
              was installed), remember to open a brand new command prompt.
     2. Configure Apache
        Edit the httpd.conf file inside the httpd\conf directory of your
        CollabNet Subversion Server installation using notepad.
        Tip: By default, httpd.conf will be in the following directory:
             C:\Program Files\CollabNet Subversion Server\httpd\conf\httpd.conf
        At the bottom of the httpd.conf file, you will see a directive that
        location directive that looks something like this:
          <Location /svn>
            DAV svn
            SVNParentPath C:\repositories
          </Location>

        Change the above section to look like the following:
          <Location /svn>
            DAV svn
            SVNParentPath C:\repositories
            SVNListParentPath On
            Require valid-user
            AuthType Basic
            AuthName "Subversion repository"
            AuthUserFile C:\repositories\password-file
          </Location>
     3. Create Subversion users
        You need to now create usernames with passwords, that could be used to
        authenticate with Apache. Use the htpasswd command to create usernames
        and passwords for the Apache server.
        Type the following at the command prompt.
          htpasswd -cm <password-file> <username>
        This command would prompt you for a password for the user. Enter the
        password and re-type the password when prompted.

        E.g. If you wish to create a user 'joe', and the file at
             "C:\repositories\password-file", type the following at the
             command prompt:
               htpasswd -cm C:\repositories\password-file joe
             Enter the desired password for the user and retype the password
             when prompted.

        Go ahead and add as many users as you like.
     4. Create a Subversion repository
        svnadmin create <Repository_Path>\<Repository_Name>
        E.g. svnadmin create C:\repositories\my-first-repos
     5. Open Port on Windows firewall.

        Before starting the server, the firewall needs to be notified that
        this particular port is going to be used. To enable this port in the
        Windows firewall, please follow the instructions given in the below
        URL.
 http://www.microsoft.com/windowsxp/u...xceptions.mspx
        Note: apache.exe is the program name which needs to be added to the
        exceptions list. As an alternative, you can also use the port where
        you decide to run the server. By default, apache will be run on 80.
     6. Start apache
        Type "apache" at the command prompt
     7. Checkout the repository
        svn co http://localhost/svn/<Repository_Name>
        E.g. svn co http://localhost/svn/my-first-repos
        Tip: If you are checking out your Subversion repository from a different
        computer, you should replace 'localhost' with the ip address or hostname
        of the machine which is hosting the Subversion repository.
     8. Setup apache so that it starts every time your computer starts
        Open the Windows Explorer and navigate to the httpd\bin directory
        in your CollabNet Subversion Server installation. By default, this
        path is:
          C:\Program Files\CollabNet Subversion Server\httpd\bin
        Right click on the Apache executable and select "Create new shortcut".
        A new "Shortcut to Apache" will appear. Right click on this shortcut and
        select "Cut".
        Open the start menu and navigate to:
           All programs > Startup

        Right click on the "Startup" icon and select "Open All Users".
        The Startup folder will appear in a new Explorer window. Right click
        in this window and select "Paste".     

5. Limitations

   * These installation instructions were written for Windows XP.
     We have not tested this installer on any other platforms at this time.
   * CollabNet Subversion does not support Berkeley DB based repositories.

6. Making Subversion work for you

   CollabNet extends Subversion with products such as CollabNet Enterprise
   Edition and Subversion on Demand. These are some of the features CollabNet
   products add:
   - X509 certificates, VPNs, leased lines and server data encryption.
   - Role-based Subversion access at the file, directory, operation and
     branch levels.
   - Highly configurable Web-based controls for project owners.
   - Improved search, data migration tools and repository synchronization.
   - Extensive scalability testing of Subversion to ensure it is
     enterprise-ready.
   To find out more about CollabNet solutions and how you can scale a
   Subversion implementation from version control to fully enabling
   distributed development teams, visit http://www.collab.net

7. About Subversion and CollabNet

   CollabNet launched the open-source Subversion project in 2000 in
   response to the demand for an open standard for Web-based software
   configuration management that could support distributed development.
   CollabNet continues to support the Subversion community with development
   resources and hosting. CollabNet also offers Subversion support, training
   and consulting services. CollabNet provides the most widely used
   collaborative development environment in the world. More than 800,000
   developers and IT projects managers collaborate online through CollabNet.
   The company is transforming the way software is being developed by enabling
   organizations to leverage global development talents to deliver better
   products and innovate faster. Using CollabNet Enterprise Edition, with
   Subversion at its core, project members can work as one team throughout the
   lifecycle of a project, regardless of their location. Unlike traditional
   software development tools, CollabNet supports globally distributed teams
   cost-effectively. The savings come from reduced development infrastructure
   costs, increased productivity, improved project visibility and shared access
   to software assets. Visit CollabNet at http://www.collab.net for general
   information.

8. Support for CollabNet Subversion

   You can get technical information and community support for Subversion
   at http://open.collab.net.
   Support for this CollabNet Subversion Installer is provided under the
   terms of your support agreement with CollabNet. For information about
   technical support from CollabNet, go to http://www.collab.net/subversion.
Posted by Y2K
,
설치 방법
  1. SVN 설치 : 직접 받아서 설치하는 것이 좋다.
  2. Python2.5 설치
  3. SVN, Python의 Path 등록
  4. PySQL의 설치
  5. EasyInstaller의 설치
  6. GenShi의 설치
  7. Trac 설치
  8. SVN-TRAC Bind ( easy_install -Z http://subversion.tigris.org/downloads/svn-python-1.4.3.win32-py2.5.exe )

trac bind를 잘 해주는 것이 중요. 오늘은 이것 빼먹어서 한참을 해맸다.

Trac 에서의 한글 처리 문제

문제점 : Trac 에서 한글화일 중 euc-kr 로 인코딩 된 화일을 볼 때 한글이 제대로 나오지 않는 현상

해결 : 해당 프로젝트의 trac.ini 화일의 default_charset 을 euc-kr 로 바꿔주면 됩니다.

Posted by Y2K
,

:긁어온 글입니다. 내용이 너무나 맘에 들어서 혹시 페이지가 닫히면 어쩌나.. 하는 걱정에 들고왔습니다. ^^

(from http://blog.arzz.com/298)

[1]

IE6은 워낙에 문제가 많아, 각종핵과 온갖편법을 동원해야 그나마 FF과 비슷한 모양새를 만들 수 있었고, IE7은 몇가지 부분만 제외하곤 거의 FF와 비슷한 모양을 만들어낼 수 있습니다.

이번글에서 IE계열과 FF계열에서 똑같이 보이게 하기위한 몇가지 작은팁을 소개해 볼까 합니다. 경험에서 우러나온 것이다보니, 약간의 오류가 있을 수 도 있습니다.

하나, 문서타입을 HTML문서 최상단에 반드시 정의하자

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

위의소스처럼 현재문서가 어떤언어로 제작되었는지 DOCTYPE 을 정의해주어야 합니다.
사실 이 한줄로 대다수의 브라우져가 비슷하게 보이게 될 것입니다.
DOCTYPE이 정의되어 있지 않을경우, 각각의 브라우저마다 다른 기준으로 가지고 HTML문서를 랜더링 하기때문에 화면에 보이는 모습이 제각각일 수 밖에 없습니다.
DOCTYPE은 브라우져가 어떤방식으로 HTML을 해석할지 알려주는 중요한 부분이라고 할 수 있겠죠. 저기에 보이듯이 -//W3C//DTD XHTML 1.0 Transitional//EN 부분이 브라우져에게 XHTML 1.0 호환모드로 랜더링 해주세요. 라고 알려주는 부분입니다.
아래의 소스중 원하는 모드로 바꿔주시면 되겠습니다.
 물론 자신이 만든 HTML문서가 어떤모드에 최적화되어있는지부터 알아야겠죠?

HTML 4.01 호환모드
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
가장 최근의 CSS 규격을 따름. 엘리먼트 배치가 자유로움, 스크롤링 레이어 같은건 사용불가능, position, display 속성과 구현 방법의 차이가 상이, frame 사용 불가능

HTML 4.01 엄격모드
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
1999년 12월 24일 확정 규격. 권장하지 않는 element, attribute, frame 사용불가, 엘리먼트 배치가 엄격함, 일부태그가 완전히 먹통, 가장 이상적인 문서작성시 사용.

XHTML 1.0 호환모드
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm...ansitional.dtd">
1999년 12월 24일 확정된 프레임문서. frameset이 사용가능. 하지만 넷스케이프.. FF(파이어폭스)쪽의 frame은 전혀 작동 되지 않음

XHTML 1.0 엄격모드
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

위의 소스들을 간략하게 해석하자만, "해당 문서 HTML출력용 문서이고 W3W의 HTML DTD 4.01을 기반(소스마다 기반이 다름)으로 (Transitional:호환/Strict:엄격)방식으로 랜더링하며 영어로 출력하며, http://www.w3.org/TR/html4/loose.dtd문서를 참고하면 된다. 라고 해석되어집니다.

여기서 Transitional은 DTD타입을 뜻하는 것으로 아래와 같은 단어로 바꾸어 사용할 수 있습니다.

Strict : 권장 표준안
Transitional : Strict 보단 완화된 표준안
Frameset : 프레임을 나눌경우 프레임페이지에 사용되는 표준안


두울, margin과 padding 등 의 기본값이 다른 브라우져들

줄간격, margin, padding의 기본값이 다른 브라우져들 때문에 컨텐츠의 높이가 달라서 문서전체, 또는 테이블의 높이 등을 맞추기가 힘든경우가 많습니다.
이럴경우에는 전체선택자를 이용하여 기본값을 정의해줍니다. (2008.01.23 23:40 수정)

* {padding:0px; margin:0px; line-height:100%;}


세엣, float 버그

IE의 버그를 해결하고, FF에 영향을 미치지 않도록 앞서 설명한 CSS핵을 이용해보도록 하겠습니다. 
참고 : 2008/01/15 - [이럴땐, 이렇게!/프로그래밍] - 많이 쓰이는 CSS 핵

IE6에서 대표적인 버그로는 float:left; 속성을 주었을때 margin 이 2배로 적용되는 것이 있다.
이를 해결하기위해 언더바(_)을 이용하여 잡아주면 해결됩니다.

.LayerFloatLeft {float:left; _display:inline;}

display 속성을 inline으로 잡아주면 해당버그가 고쳐지며, FF와 IE7에서는 float 이 정의되어있을때 자동으로 inline으로 인식하므로 정상적으로 동작하는 브라우져를 제외시키기 위하여 언더바핵을 사용해서 정의하였습니다.


네엣, input 태그의 아래위 여백문제
사용자 삽입 이미지

IE7에서도 FF과 다르게 input 태그 아래위로 여백이 들어가 있음을 알수있다.


위와 같은 문제를 해결하기 위해, 스타(*)핵을 이용하여 모든 IE계열에서 margin 값을 조정해주면 됩니다.
참고 : 2008/01/15 - [이럴땐, 이렇게!/프로그래밍] - 많이 쓰이는 CSS 핵

**html input, *html input {margin:-1px 0px -1px 0px;}



다섯, 테이블은 가급적 table-layout:fixed 를 사용해서 쓰자.

테이블의 가로폭은 브라우저마다 제각각입니다.(안타깝게도) 안의 내용에 따라 크기가 재정리될수도 있고, 크기가 늘어난다던가 세로가 변한다던가 등의 문제가 항상 머리를 아프게 하죠.

그때 테이블태그에 아래와같이 style 을 지정해두면, 정의한 사이즈가 고정이되며, 한줄한줄 보여지기때문에, 랜더링속도도 훨씬 빨라집니다.
한가지 주의할점은 아래소스를 쓸때 테이블의 제일 첫줄에 가로폭이 반드시 정의되어 있어야 한다는 점입니다.. (또는 아래 예처럼 <col> 태그를 사용해도 됩니다.)

<table style="table-layout:fixed;">
<col width="50%" /><col width="100" /><col width="20" />
<tr>
    <td></td>
    <td></td>
    <td></td>
</tr>
</table>


여섯, 이미지의 쓸데없는 공백문제

사용자 삽입 이미지

IE에서는 이미지 하단과 옆 일부분에 공백이 생겨있다.


위의 그림에서 볼 수 있듯이 IE에서는 <img> 태그에 정렬값(align)이 없을경우 저렇게 공백이 생겨버립니다. 이로인해 약 2~3px 의 공간차가 생겨버리게 되죠.
이럴경우 IE를 위해 아래와 같이 <img> 태그에 align 값을 넣어주면 해결됩니다.

<img src="주소" align="(middle:줄중간|top:줄상단|bottom:줄바닥|absmiddle:줄높이중간(?),단, absmiddle 은 비표준.)" />

2008.01.24 17:56 추가
UTF-8 모드에서 align 을 잘못사용시, Hover:underline 이벤트에 문제가 생길 수 있다고 합니다. (댓글참조)


일곱, TABLE에서 COL 태그와 padding 태그 사용에 따른 문제
사용자 삽입 이미지

padding 값에 따라 길이가 달라진다.


위와같이 FF는 COL 태그에 지정된 100px 에서 안쪽으로 10px 이 여백이 생겼고, IE는 지정된 100px에서 밖으로 10px의 여백이 생겼습니다.
이문제를 해결하려면 2가지 방법이있습니다.

IE에 맞추는 방법
<table>
<tr>
    <td style="width:100px; padding:5px;"></td>
</tr>
</table>

위의 소스처럼 하였을 경우에는 IE, FF 모두 100px 에서 바깥쪽으로 10px 이 증가하게 됩니다.
하지만 가로폭을 여백과 상관없이 꼭 100px로 맞추어야 한다면 아래와 같이 하면 됩니다.

FF에 맞추는 방법
<table style="table-layout:fixed">
<col width="100" />
<tr>
    <td><div style="padding:10px;"></div></td>
</tr>
</table>

위의 소스처럼 TD 엘리먼트안에 DIV나 TABLE을 하나더 넣어 그곳에 padding 값을 정의하면 FF에서처럼 IE도 100px 로 고정되게 됩니다.


IE와 FF에서 같게 보이는 것은 사실 웹표준을 맞춘다기보다 브라우저의 특성을 파악해 맞추는 작업이라는 의미가 강합니다.
완벽하게 웹표준을 맞춰 코딩을 해도, 브라우저의 해석여부에 따라 보이는 모습이 달라지기때문에, 결국 각각에 맞게 맞춰줄수밖에 없는 것이죠.

몇가지 IE와 FF 의 모습을 맞추는 방법을 소개했는데, 다음에 좀더 다양한 내용과 자바스크립트등의 내용을 포함하여 2탄을 준비해볼 생각입니다.

  

Posted by Y2K
,

SELECT
(SELECT SUM(m01) FROM T_DATA WHERE sensor_id = 64 AND [date] > '2007-04-03 11:00:00' AND [date] < '2007-04-03 11:10:44' AND m01 < 99999.0),
(SELECT SUM(m01) FROM T_DATA WHERE sensor_id = 64 AND [date] >= '2007-04-03 00:00:00' AND [date] < '2007-04-03 11:10:44' AND m01 < 99999.0),
(SELECT SUM(m01) FROM T_DATA WHERE sensor_id = 64 AND [date] >= '2007-01-01' AND [date] < '2007-04-03 11:10:44' AND m01 < 99999.0)

  

Posted by Y2K
,

SELECT TOP 10 customerID, CompanyName, ContactName, PhoneNumber FROM Customers ORDER BY CustomerID

로 얻은 후에

SELECT TOP 10 customerID, CompanyName, ContactName, PhoneNumber FROM Customers ORDER BY CustomerID > [Last Occured ID]


를 이용하면 값을 그 다음 값으로 10개를 얻는 것이 가능하다.

ps : DataAdapter에 구현되어있는 방법이 있다. 그러나, 이 경우에는 모든 값을 다 가져온 후에 일부를 select 하는 것으로 무거운 단점이 있다. <- 그래도 이게 더 편하다. -_-

Posted by Y2K
,
DECLARE @second INT
DECLARE @sensor_id INT
DECLARE @columncount INT

SET @sensor_id = 21

SELECT @second = MIN(abs(DATEDIFF(ss, '2007-01-25 17:00:01', [date]))) FROM T_DATA WHERE sensor_id = @sensor_id
SELECT @columncount =
        COUNT(*) FROM T_DATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, @second, '2007-01-25 17:00:01')

IF @columncount = 0
SELECT * FROM T_DATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, -@second, '2007-01-25 17:00:01')
ELSE
SELECT * FROM T_DATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, @second, '2007-01-25 17:00:01')

  

DECLARE @second INT
DECLARE @sensor_id INT
DECLARE @columncount INT

SET @sensor_id = 6

SELECT @second = MIN(abs(DATEDIFF(ss, '2007-01-25 17:00:01', [date]))) FROM T_IDATA WHERE sensor_id = @sensor_id
SELECT @columncount =
        COUNT(*) FROM T_IDATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, @second, '2007-01-25 17:00:01')

IF @columncount = 0
SELECT * FROM T_IDATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, -@second, '2007-01-25 17:00:01') ORDER BY depth
ELSE
SELECT * FROM T_IDATA WHERE sensor_id = @sensor_id AND date = DATEADD(ss, @second, '2007-01-25 17:00:01') ORDER BY depth

 
Posted by Y2K
,
필드 정밀 조정
  1. 이름이 설명적이고, 전체 조직에서 의미가 있는가?
  2. 필드 이름이 명확하고 명료한가?
  3.  필드이름으로 두문자어 또는 약어를 사용하고 있는가? 
    1. 수정해야지 된다. 필드 이름이 후ㅞ손된 상태이다.
  4.  한가지 특성이상의 특성을 가지고 있는가? 
    1. 수정 사항이다. 두개 이상의 필드로 나누는 것을 고려해본다.
필드의 구조 조정
  1. 필드가 테이블 조제의 특별한 특성을 나타내는지 확인한다. 
    1. 테이블과 밀접한 관계가 없는 경우 제거한다.
  2. 필드가 단일 값을 가지고 있는지 확인한다.
  3. 필드가 계산이나 연결 결과를 저장하지 않는지 확인한다. 
    1. 계산된 필드는 잘 설계된 데이터베이스에서 허용되지 않는다.
    2. 계산을 하는 경우에는 이를 SELECT 문에 넣는 것을 권장한다.
  4. 필드가 전체 데이터베이스에서 단 한번만 나타나도록 한다.  
    1. 이 규칙의 예외는 외래키로서 이용되는 단 두번의 표현 뿐이다.
  • 다중 부분 필드 해결하기
    • 데이터 무결성을 파괴하기 때문에 문제 발생을 피하기 위해서 해결해야지 된다.
    • "이 필드의 값을 뽑아서 더 작고 확실한 부분으로 분할 할 수 있을까?" 라는 질문에 답으로서 필드를 설계해야지 된다.
  • 다중값 필드 해결하기 
    • 다중 값의 경우, 예외 없이 여러개의 쉼표를 통해서 여러개의 값으로서 사용된다.
    • 데이터베이스에서 다른 다대다 관계와 같이 다대다 관계의 연결 테이블로 해결 할 수 있다.
    • 주 필드의 복사본을 새 테이블을 위한 기초로 사용한다.[외래키로 사용한다.]
테이블 정밀 조정
  • 테이블은 단일 주제를 나타내야지 된다. 
    • 이름이 고유하고, 전체 조직에서 의미가 있을 만큼 충분히 설명적인가?
    • 이름이 정확하고 모호하지 않게 테이블의 주제를 식별하는가?
    • 이름이 물리적인 특성을 나타내는 단어를 포함하는가?
    • 테이블의 이름이 두문자어나 약어를 사용했는가?
    • 암시적 또는 명시적으로 하나 이상의 주제를 식별하는 이름을 사용했는가?
  1. 테이블이 단일 주제를 나타내는지 확인한다.
  2. 각 테이블이 주 키를 가지고 있는지를 확인한다.
  3. 테이블이 다중 부분 또는 다중 값 필드를 포함하지 않는지 확인한다.
  4. 테이블에 계산된 필드가 없는지 확인한다.
  5. 테이블에 불필요한 이중 필드가 없는지 확인한다. 
    1. 다른 테이블로서 이중 필드를 포함시키는 경우에는 설계가 잘못된 것이다.
    2. 이중 필드의 제거는 다른 Table을 key로 연결하는 방법으로 해결을 한다.
키값의 이용
  • Primary Key는 각 레코드를 유일하게 식별하는 하나의 필드 또는 필드 그룹
    • Simple Primary Key : 하나의 필드로 구성된 주 Key
    • Composite Primary Key : 하나 이상의 필드로 구성된 주 Key
  1. 필드가 테이블 내의 각 레코드를 유일하게 식별 가능한가?
  2. 필드가 고유값을 가지게 되는가?
  3. 필드가 미지의 값을 포함할 수 있는가?
    1. 미지의 값을 사용하게 될 경우에는 Primary Key로서 사용이 불가능하다.
  4. 필드의 값이 선택적일 수가 있는가?
    1. 만약에 선택적인 값이 들어갈 수 있다면 Primary Key로서 사용이 불가능하다.
  5. 부분 다중 필드가 아니여야 된다.
  6. 필드값은 언제나 고정되어야지 된다. 임의로 바뀔 여지가 없는 값이여야지 된다.

견실한 관계의 설정
  • 일대일 관계 설정
    • 외래키가 종속테이블의 Primary Key가 된다.
    • Primay 테이블의 Primary key를 종속 테이블에 넣음으로서 설정한다.
  • 일대다관계 설정
    • 일(one)측 테이블의 Primary Key를 다(many)측 테이블에 삽입함으로서 일대다 관계를 설정
    • 종속 테이블에서는 Primary Key가 따로 존재하고, foregien Key로서 Primary 테이블의 key가 사용된다.
    • 다대다관계 설정
      • 관계가 맺어진 각테이블의 Primary키들을 새 테이블의 구조를 만들기 위해 사용한다.
      • 외래키와 주키로서 이어지는 연결 테이블을 구성한다.
    Posted by Y2K
    ,
    명명된 파라미터 지원
    • MS SQL, MySQL
    • 파라미터 이름은 각각의 Field Name에 '@'을 붙여서 사용한다.

      

    순차적 파라미터 지원
    • MS Access, Oracle
    • 순서대로 파라미터를 쓰고, 사용한다.
    • '?'기호를 사용한다.
    • "UPDATE Customer SET CompanyName=? Where CustID=?" 로 사용가능
    Posted by Y2K
    ,

    http://www.connectionstrings.com/?carrier=mysql

    Microsoft Access

    DSN이 없는 경우

    Set Cnn = Server.CreateObject("ADODB.Connection")

    Cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\mydatabase.mdb"

    OLE DB

    Set Cnn = Server.CreateObject("ADODB.Connection")

    Cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:\mydatabase.mdb"

    파일 DSN

    Set Cnn = Server.CreateObject("ADODB.Connection")

    Cnn.open "FILEDSN=ADSN"

    DSN은 있고 사용자 ID/암호는 없는 경우

    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.open "DSNname" 

    DSN과 사용자 ID/암호가 모두 있는 경우

    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.open "DSNname","username","password" 

    DSN 없이 실제 경로를 참조로 사용하는 경우

    Set Conn = Server.CreateObject("ADODB.Connection")

    DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "

    DSNtest=dsntest & "DBQ=c:\mydatabase.mdb"

    Conn.Open DSNtest

    DSN 없이 Server.MapPath를 사용하는 경우

    참고: Server.MapPath는 웹 서버 루트에서의 경로로 기본값은 C:\Inetpub\Wwwroot입니다.

    Set Conn = Server.CreateObject("ADODB.Connection")

    DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "

    DSNtest=dsntest & "DBQ=" & Server.MapPath("/databases/mydatabase.mdb")

    Conn.Open DSNtest

      

    Microsoft SQL Server

    OLE DB
    Set cnn = Server.CreateObject("ADODB.Connection")
    cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=mydatabase "
    DSN이 있는 경우

    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.open "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydatabase"

    DSN이 없는 경우

    Set Conn = Server.CreateObject("ADODB.Connection")

    DSNtest="DRIVER={SQL Server};SERVER=ServerName;UID=USER;PWD=password;DATABASE=mydatabase"

    Conn.open DSNtest

      

    Microsoft Visual FoxPro

    SN이 없는 경우

    <%
    Set Conn = Server.CreateObject("ADODB.Connection")
    ConnStr= "Driver=Microsoft Visual Foxpro Driver; UID=userID;SourceType=DBC;SourceDB=C:\databases\mydatabase.dbc"
    Conn.Open ConnStr
    %>

      

    Oracle

    DSN이 있는 ODBC

    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.cursorlocation=adUseClient

    ' requires use of adovbs.inc; numeric value is 3

    Conn.open "DSN=test;UID=name;PWD=pass"

    OLE DB

    Set Conn = Server.CreateObject("ADODB.Connection")

    Conn.cursorlocation=adUseClient

    ' requires use of adovbs.inc; numeric value is 3

    DSNTest="Provider=MSDAORA.1;Password=pass;User ID=name;Data Source=data.world"

    Conn.open DSNtest

      

      

      

    Posted by Y2K
    ,

    하얀색 바탕에 기본 셋팅이 눈에 잘 안들어와서..

    여간해서는 셋팅을 완전히 바꿔서 사용한다.

     

    특히 주로 사용하는 Resharper의 Rename 기능이 간간히 심각한 버그를 나타내는 것때문에 절대로 사용하지 않기 위해서..

    CTRL+R *2 에 대한 Keyboard short cut을 변경해서 기본적으로 사용하는중.

     

    폰트는 Envy Code R VS를 Size를 10상태로 사용하는 것이 가장 깔끔.

    폰트 다운로드는 다음 URL에서..

    http://damieng.com/blog/2008/05/26/e...eased#comments

     

    Code Page

    CodePage.png

     

    Web Page

    WebCode.png

     

    Xml Code (Web.Config)

    xmlCode.png

    Posted by Y2K
    ,