⑴ 怎麼樣建立資料庫,需要詳細的步驟。
我學過SQL
Server2005
在SQL
Server2005
裡面建資料庫
先是安裝SQL
Server2005
然後右擊資料庫選擇新建,然後輸入資料庫名稱,設置資料庫的大小,增長方式,和資料庫所在路徑,點擊確定即可!
⑵ 怎麼新建資料庫
方法/步驟
1、首先打開sql server管理系統工具,然後使用資料庫賬號登錄到數據管理系統。
⑶ 如何建立一個詳細的資料庫
安裝一個mysql,安裝完成後create database 資料庫名稱 default character set utf8;就創建一個資料庫 了
查看資料庫 show databases;
⑷ 怎樣建立資料庫呢
Office自帶的ACCESS,或者用VISUAL FOXPRO ,不過ACCESS不安全,VISUAL FOXPRO適合小型的資料庫。
⑸ 如何建立資料庫
手工創建資料庫的全部腳本及說明
系統環境:
1、操作系統:Windows 2000 Server,機器內存128M
2、資料庫: Oracle 8i R2 (8.1.6) for NT 企業版
3、安裝路徑:D:\ORACLE
建庫步驟:
1、手工創建相關目錄
D:\Oracle\admin\test
D:\Oracle\admin\test\adhoc
D:\Oracle\admin\test\bmp
D:\Oracle\admin\test\cmp
D:\Oracle\admin\test\create
D:\Oracle\admin\test\exp
D:\Oracle\admin\test\pfile
D:\Oracle\admin\test\ump
D:\Oracle\oradata\test
D:\Oracle\oradata\test\archive
2、手工創建初始化啟動參數文件:D:\Oracle\admin\test\pfile\inittest.ora,內容:
3、手工創建D:\Oracle\Ora81\DATABASE\inittest.ora文件,
內容:IFILE= 'D:\Oracle\admin\test\pfile\inittest.ora '
4、使用orapwd.exe命令,創建D:\Oracle\Ora81\DATABASE\PWDtest.ora
命令:D:\Oracle\Ora81\bin\orapwd file=D:\Oracle\Ora81\DATABASE\PWDtest.ora password=ORACLE entries=5
5、通過oradim.exe命令,在服務里生成一個新的實例管理服務,啟動方式為手工
set ORACLE_SID=test
D:\Oracle\Ora81\bin\oradim -new -sid test -startmode manual -pfile "D:\Oracle\admin\test\pfile\inittest.ora "
6、生成各種資料庫對象
D:\> svrmgrl
--創建資料庫
connect INTERNAL/oracle
startup nomount pfile= "D:\Oracle\admin\test\pfile\inittest.ora "
CREATE DATABASE test
LOGFILE 'D:\Oracle\oradata\test\redo01.log ' SIZE 2048K,
'D:\Oracle\oradata\test\redo02.log ' SIZE 2048K,
'D:\Oracle\oradata\test\redo03.log ' SIZE 2048K
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXLOGHISTORY 1
DATAFILE 'D:\Oracle\oradata\test\system01.dbf ' SIZE 58M REUSE AUTOEXTEND ON NEXT 640K
MAXDATAFILES 254
MAXINSTANCES 1
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET ZHS16GBK;
控制文件、日誌文件在上面語句執行時生成
connect INTERNAL/oracle
--修改系統表空間
ALTER TABLESPACE SYSTEM DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 50);
ALTER TABLESPACE SYSTEM MINIMUM EXTENT 64K;
--創建回滾表空間
CREATE TABLESPACE RBS DATAFILE 'D:\Oracle\oradata\test\rbs01.dbf ' SIZE 256M REUSE
AUTOEXTEND ON NEXT 5120K
MINIMUM EXTENT 512K
DEFAULT STORAGE ( INITIAL 512K NEXT 512K MINEXTENTS 8 MAXEXTENTS 4096);
--創建用戶表空間
CREATE TABLESPACE USERS DATAFILE 'D:\Oracle\oradata\test\users01.dbf ' SIZE 128M REUSE
AUTOEXTEND ON NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE ( INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--創建臨時表空間
CREATE TABLESPACE TEMP DATAFILE 'D:\Oracle\oradata\test\temp01.dbf ' SIZE 32M REUSE
AUTOEXTEND ON NEXT 640K
MINIMUM EXTENT 64K
DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) TEMPORARY;
--創建工具表空間
CREATE TABLESPACE TOOLS DATAFILE 'D:\Oracle\oradata\test\tools01.dbf ' SIZE 64M REUSE
AUTOEXTEND ON NEXT 320K
MINIMUM EXTENT 32K
DEFAULT STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--創建索引表空間
CREATE TABLESPACE INDX DATAFILE 'D:\Oracle\oradata\test\indx01.dbf ' SIZE 32M REUSE
AUTOEXTEND ON NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE ( INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
--創建回滾段
CREATE PUBLIC ROLLBACK SEGMENT RBS0 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS1 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS2 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS3 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS4 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS5 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS6 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS7 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS8 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS9 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS10 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS11 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS12 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS13 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS14 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS15 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS16 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS17 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS18 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS19 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS20 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS21 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS22 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS23 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
CREATE PUBLIC ROLLBACK SEGMENT RBS24 TABLESPACE RBS STORAGE ( OPTIMAL 4096K );
--使回滾段在線
ALTER ROLLBACK SEGMENT "RBS0 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS1 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS2 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS3 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS4 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS5 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS6 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS7 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS8 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS9 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS10 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS11 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS12 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS13 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS14 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS15 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS16 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS17 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS18 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS19 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS20 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS21 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS22 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS23 " ONLINE;
ALTER ROLLBACK SEGMENT "RBS24 " ONLINE;
--修改sys用戶的臨時表空間為TEMP
alter user sys temporary tablespace TEMP;
--創建數據字典表
@D:\Oracle\Ora81\Rdbms\admin\catalog.sql;
@D:\Oracle\Ora81\Rdbms\admin\catexp7.sql
@D:\Oracle\Ora81\Rdbms\admin\catproc.sql
@D:\Oracle\Ora81\Rdbms\admin\caths.sql
connect system/manager
@D:\Oracle\Ora81\sqlplus\admin\pupbld.sql
connect internal/oracle
@D:\Oracle\Ora81\Rdbms\admin\catrep.sql
exit
--生成SQL*Plus幫助系統
sqlplus SYSTEM/manager
@D:\Oracle\Ora81\sqlplus\admin\help\helpbld.sql helpus.sql
exit
--修改system用戶默認表空間和臨時表空間
svrmgrl
connect internal/oracle
alter user system default tablespace TOOLS;
alter user system temporary tablespace TEMP;
exit
7、將test實例啟動服務設置成自動啟動方式
D:\Oracle\Ora81\bin\oradim -edit -sid test -startmode auto
⑹ c語言中如何建立資料庫
取決於你用什麼資料庫,或者windows的話用ado,這些介面,最簡單的直接用文件管理吧。
⑺ 怎樣建立資料庫
CREATE TABLE AGENT_PACT(
ID NUMBER(20), --編號
grade integer,--等級
address varchar2(60) --地址
);
⑻ excel怎樣建立數據表
通過excel表格建立數據表可以得數據進行檢索方便對數據進行篩選對數據的整理,都是比較容易實現的。
⑼ 如何建立資料庫
Oracle 通過 DBCA 工具創建一個資料庫
創建完畢後,將產生一個「服務」,可通過該服務,啟動資料庫實例。
SQL Server
CREATE DATABASE [Test] ON PRIMARY
( NAME = N'Test',
FILENAME = N'E:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Test.mdf' ,
SIZE = 3072KB ,
FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Test_log',
FILENAME = N'E:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Test_log.ldf' ,
SIZE = 1024KB ,
FILEGROWTH = 10%)
GO
MySQL
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> CREATE DATABASE SQLDOC;
Query OK, 1 row affected (0.00 sec)
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| sqldoc |
| test |
+--------------------+
4 rows in set (0.00 sec)
⑽ 如何建立一個資料庫
首先你要裝一個資料庫軟體,裝好之後,在建一個資料庫用戶,schema,在建表。