Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
The-Manga-guide-to-databases.pdf
Скачиваний:
5
Добавлен:
17.11.2024
Размер:
36.39 Mб
Скачать

Answers

Q1

Sta

Q2

B k

Q3

Students

Q4

Customer

 

member

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

m

 

m

1

 

Managing

 

Lending

 

A ending

 

Opening

 

N

 

N

 

N

 

N

 

 

 

 

 

 

 

 

 

Customers

 

Students

 

Lectures

 

A ount

 

 

 

 

 

 

 

 

 

 

 

 

 

m

 

m

 

 

 

 

 

Teaching

 

Management

 

 

 

 

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

Teacher

 

Bank

 

 

 

 

 

 

 

 

Q5  Second normal form

Q6  Third normal form

Q7

Staff member code

 

Month

Member’s sales

 

 

 

 

 

 

 

 

 

 

 

 

 

Staff member code

 

Staff member name

Department code

 

 

 

 

 

 

 

 

Department code

Department name

 

 

 

 

 

 

 

 

82  Chapter 3

Q8

Order-taking code

 

Date

Customer code

 

Representative code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Customer code

 

Customer name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Order-taking code

 

Product code

 

 

Quantity

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Product code

Product name

Unit price

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Representative code

 

Representative name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Q9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Order-taking code

 

Date

Customer code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Customer code

 

Customer name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Order-taking code

 

Product code

 

 

Quantity

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Product code

Product classification code

Product name

Unit price

 

 

 

 

 

 

 

 

 

 

 

 

Product classification code

Product classification name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Let's Design a Database!  83

Designing a Database

In this chapter, you learned how to design a relational database. However, there are other database design methods. Usability and efficiency of a database depend on an analysis and design method. Therefore, it is important to create an appropriate database in the design stage.

In the database design stage, you need to perform various tasks in addition to table design. For example, you need to consider a datatype to use in the table. You may also need to specify columns indicating numerical values, currencies, and character strings. In addition, you need to devise a search method so you can carry out fast searches. Sometimes, you must create a design while keeping physical file organization in mind. And you have to control which users can access the database to ensure security. There are many factors you need to think about when designing a database. We’ll look at some of these factors in the following chapters.

84  Chapter 3

4

Let's Learn About SQL!