database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
ㆍMS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MS-SQL Q&A 4203 게시물 읽기
No. 4203
도움 부탁드림니다.
작성자
초보자
작성일
2008-05-13 21:12
조회수
3,669

처음 접해 보는거라 모르겟네요... 이해도 안가고요... 테이블을 생성하라 이러는거 같은데...


죄송하지만....설명 점 부탁드립니다.


※ You want to make a database that consist of following four tables.

Table Name

Column Name

Data Type

NULL

Primary

Key

Foreign

Key

FK Table

FK Column

etc

customer

id

varchar(10)

not null

PK

name

varchar(30)

null

address

varchar(100)

null

 

Table Name

Column Name

Data Type

NULL

Primary

Key

Foreign

Key

FK Table

FK Column

etc

product

id

varchar(10)

not null

PK

name

varchar(30)

null

description

varchar(100)

null

price

integer

null

q

integer

null

 

Table Name

Column Name

Data Type

NULL

Primary

Key

Foreign

Key

FK Table

FK Column

etc

orders

id

varchar(20)

not null

PK

in_date

datetime

null

due

datetime

null

clerk

varchar(30)

null

terms

varchar(100)

null

customer_id

varchar(10)

null

FK

customer

id

 

Table Name

Column Name

Data Type

NULL

Primary

Key

Foreign

Key

FK Table

FK Column

etc

order_detail

state

varchar(10)

not null

order_id

varchar(20)

not null

PK

FK

orders

id

product_id

varchar(10)

not null

PK

FK

product

id

 

1. Write SQL sentences for creation of database with four tables.

(Here, the name of database is shop)

2. Add columns of 'h_phone' and 'o_phone' to CUSTOMER table.

3. Delete column of 'h_phone' in CUSTOMER table.

4. Set the CHECK constraint at column of 'state' in ORDER_DETAIL table. (conditions: 'admin_order', 'complete_order', 'ready_post', 'complete_post')

5. Set the NOT NULL constraint at column of 'name' in CUSTOMER table.

[Top]
No.
제목
작성자
작성일
조회
4206group by 와 합에 관한 질문입니다. [1]
2008-05-14
4201
4205MS-SQL 전문검색(Full-text search) 순위가중치 조절
손님
2008-05-14
4427
4204한글 영어 정렬문제...ㅜ.ㅜ [1]
제로
2008-05-13
4181
4203도움 부탁드림니다.
초보자
2008-05-13
3669
4202Primary Key 에 의해 생성되는 index 에 대해... [1]
최석철
2008-05-13
4350
4201각각 db명이 다른 두 테이블간에 [1]
이호영
2008-05-13
3987
4200full백업 복원시 다음과 같은 에러가 발생하네요..
량디
2008-05-13
4613
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다