MySQL(資料庫)

來源:互聯網
上載者:User

標籤:order by   cat   from   記錄   ges   資料   nbsp   student   資料結構   


資料庫概念:

資料庫(Database)是按照資料結構來組織、儲存和管理資料的倉庫
在實際應用中會遇到各式各樣的資料庫如nosql非關聯式資料庫(memcached,redis,mangodb),RDBMS關聯式資料庫(oracle,mysql等),還有一些其它的資料庫如hbase,在這些資料庫中,又會出現結構化資料,非結構化資料,半結構化資料,下面列出各種資料類型:

 結構化資料:
  能夠用資料或統一的結構加以表示,我們稱之為結構化資料,如數字、符號。傳統的關係資料模型、行資料,儲存於資料庫,可用二維表結構表示。
  半結構化資料:
  所謂半結構化資料,就是介於完全結構化資料(如關係型資料庫、物件導向資料庫中的資料)和完全無結構的資料(如聲音、影像檔等)之間的資料,XML、HTML文檔就屬於半結構化資料。它一般是自描述的,資料的結構和內容混在一起,沒有明顯的區分。
  非結構化資料:
  非結構化資料庫是指其欄位長度可變,並且每個欄位的記錄又可以由可重複或不可重複的子欄位構成的資料庫,用它不僅可以處理結構化資料(如數字、符號等資訊)而且更適合處理非結構化資料(全文文本、圖象、聲音、影視、超媒體等資訊)。
  非結構化資料,包括所有格式的辦公文檔、文本、圖片、XML、HTML、各類報表、映像和音頻/視頻資訊等等

關係型資料庫:

關聯式資料庫,是建立在關聯式模式基礎上的資料庫,藉助於集合代數等數學概念和方法來處理資料庫中的資料

Mysql管理工具navicat
建庫:建立資料庫

Mysql管理工具navicat
建庫:建立資料庫

Mysql管理工具navicat
建庫:建立資料表

 

 

 

 

Mysql管理工具navicat
填寫欄位名稱:一般情況下ID設為主鍵

Mysql管理工具navicat
填寫欄位名稱:添加欄位名稱

Mysql管理工具navicat
填寫欄位名稱:設定外鍵

結構化查詢語言 (SQL)介紹
Select * from table;
Select * from table where condition;
Select * from table where condition order by field order by ID asc|desc;
Select field from table where condition order by field order by ID asc|desc;
//select sname,sex,..... from students where sex=1;
Update table set fieldname=‘value’ where condition;
Insert into tablename (field1,field2,.......) values (‘value1’,’value2’,......);
//insert into demo.students (sname,sex) values (‘xxx‘,0);
Delete from table where condition;

 

MySQL(資料庫)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.