1 database: mid-term speaker: date:. 2 一. 名詞解釋 1. p.35 2. p.32 3. p.15 4. p.5 5. p.143 6....

13
1 Database: Mid-term Speaker: Date:

Upload: vernon-weaver

Post on 03-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

1

Database: Mid-term

Speaker:

Date:

Page 2: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

2

一 . 名詞解釋

1. P.352. P.323. P.154. P.55. P.1436. P.717. P.1548. P.209. P.1110. P.48

Page 3: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

3

二 . 1

Name NameGrade

Ssn Class Year

Number

Qtr Number

STUDENT S-D S-DSECTION COURSEM N 1N

Name NameGrade

Ssn Class Year

Number

Qtr Number

STUDENT S-S S-CSECTION COURSEM N 1N

Page 4: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

4

二 . 2

2.database approach: - self describing: has a catalog of meta-data, data to make up

a database, maybe some dbms stuff to help access that data. - insulation between programs and data, and data abstraction:

how the database or dbms access the files, constraints to the data, dependencies of file structure are no longer an issue.

- support of multiple views of the data: the database designer can make a user view. there can be different users and different user views for each type of user.

- sharing of data and multiple user transaction processing: management of users attempting to access the same resource at the same time. information is available to many users.

Page 5: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

5

二 . 2

database vs. traditional file system: - self describing:

file system does not have meta data that would be considered as data restrictions. file size doesn't

count. - insulation:

traditional file system may need a program that is dependent on how the data in the file is structured.

- multiple views: you get one view, the file system.

- sharing of data: no management and maybe the file system may even lock the resource being accessed and disallow

multiple user access due to no management.

Page 6: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

6

二 . 3-6

3. The DBA is responsible for authorizing access to the database, coordinating and monitoring its use and acquiring software and

hardware resources as needed.

Database designers are responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store this data.4. database schema : description of a database. database state : the data in the DB at a particular moment in time.5. 這是 inherent model-based constraints. 因為 relation 是集合,所 以集合中同一個元素不會出現兩次 .6. A superkey can have redundant attributes while a key can not.

Page 7: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

7

二 . 3-6

Superkey of R: Is a set of attributes SK of R with the following condition:

No two tuples in any valid relation state r(R) will have the same value for SK

That is, for any distinct tuples t1 and t2 in r(R), t1[SK] t2[SK] This condition must hold in any valid state r(R)

Key of R: A "minimal" superkey That is, a key is a superkey K such that removal of any attribute

from K results in a set of attributes that is not a superkey (does not possess the superkey uniqueness property)

In general: Any key is a superkey (but not vice versa) Any set of attributes that includes a key is a superkey A minimal superkey is also a key

Page 8: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

8

二 . 7

洪蘭:閱讀力;開拓視野,傳承前人智慧。閱讀,可以傳承古人經驗讓錯誤減少;為你打開視野,培養同理心。

易智言:哲學養成;有歷史感,才能坦然面對生命。哲學的知識,定位出生命歷史的位置。

Page 9: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

9

三 .1

Page 10: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

10

三 .2

<?php

define(“SIX”,6);

$zero=0;

echo $SIX . “\n”;

echo “+” . “\n” . “$zero;

?>

Ans: +0

Link:http://ms11.voip.edu.tw/~mac/db.php

Page 11: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

11

三 .3

Page 12: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

12

三 .4

(1) BANK, ACCOUNT, CUSTOMER, LOAN.

(2) Yes. BANK BRANCH Partial Key : Branch_no Identifying relationship : BRANCHES

(3) The partial key Branch_no specifies that the same Branch_no va

ule may occur under different BANKS. The identifying relationship BRANCHES specifies that Branch_no values are uniquely assigned for those BANK-BRANCH entities, that are related to the same BANK entity. Hence, the combination of BANK code and Branch_no together constitute a full identifier for a BANK-BRANCH.

Page 13: 1 Database: Mid-term Speaker: Date:. 2 一. 名詞解釋 1. P.35 2. P.32 3. P.15 4. P.5 5. P.143 6. P.71 7. P.154 8. P.20 9. P.11 10. P.48

13

三 .4