顯示具有 資料庫 標籤的文章。 顯示所有文章
顯示具有 資料庫 標籤的文章。 顯示所有文章

2018年9月16日 星期日

Qt

MariaDB


sudo cp /opt/lampp/lib/libmysqlclient_r.so.18 libmysqlclient_r.so.16

sudo apt-get install libqt5sql5-mysql

2013年3月13日 星期三

資料庫(3)


DB2 & SQL

每種query language 都有DDL and DML
a base table is “real” table實體存在
a view is a “virtual” table

2013年3月5日 星期二

資料庫(2)


第二章 Data Model

Data Model:A set of concepts to describe the structure of a database, and certain constraints that the database should obey.

Components of Data Model
1.Structures
2.Operations
3.Integrity Constraints

Data Model為了將資料抽象化,storage detail隱藏

Relational Data Model
Hierarchical Data Model
Network Data Model

Primary Key:滿足uniquenessminimalitycandidate key
Foreign key:a foreign key is an attribute of relation R2 whose values are refer to the primary key of some relation R1.

資料庫(1)


第一章 Why using a DB?
Database System:DBMS+data
一個資料庫就是一群有關系的資料所成的集合

Operations on a DB
1.add/remove files
2.insert/delete/update data in existing files
3.retrieve data 最常用read-only (select)

field(attribute) → record(tuple) → file

一個資料庫系統能提供資料分享,整合,一致性,標準化,安全限制及避免重複資料的儲存

(ADV.)
1.Redundancy
2.Inconsistency(Avoided)
3.Shared
4.Standards
5.Security restrictions
6.Integrity
7.Conflicting requirements
8.Data Independence

an architecture for a DB
Three layers:Internal, Conceptual, External → 資料庫有三層

Internal schema → storage structures and access paths
Conceptual schema → structure and constraints
External schema → user views

1.Logical Data Independence
2.Physical data Independence
3.Mapping

Data Definition Language(DDL):Used by the DBA and database designer to specify the conceptual schema of a database.
Data Manipulation Language(DML):Used to specify database retrievals and updates.
DML commands(data sub-language)

Objects of Database Design
1.easy to use
2.easy to maintain
3.cost effective