Top Banner
44

ความรู้เบื้องต้นฐานข้อมูล 1

Apr 16, 2017

Download

Technology

wiwa
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ความรู้เบื้องต้นฐานข้อมูล 1
Page 2: ความรู้เบื้องต้นฐานข้อมูล 1

A database is a structured collection of records or data.

Page 3: ความรู้เบื้องต้นฐานข้อมูล 1

Database management systems (DBMS) are the software used to organize and maintain the database. Example is MS Access, SQL Server

Page 4: ความรู้เบื้องต้นฐานข้อมูล 1

Early 1970 the Database was used term in Europe and USA.

1960s, the first developed DBM by Charles Bachman.

1970, the relational model was proposed by E. F. Codd.

1990s, attention shifted to object-oriented databases.

2000s, the fashionable area for innovation is the XML database

Page 5: ความรู้เบื้องต้นฐานข้อมูล 1

Bit Byte Field Record File Entity Attribute Primary Key Foreign Key Field Type

Page 6: ความรู้เบื้องต้นฐานข้อมูล 1

A bit is a binary digit, taking a value of either 0 or 1.

Page 7: ความรู้เบื้องต้นฐานข้อมูล 1

A byte is a unit of measurement of information storage, most often consisting of eight bits.

Page 8: ความรู้เบื้องต้นฐานข้อมูล 1

1024 bytes= 1KB 1024 KB = 1MB 1024 MB = 1GB 1024 GB = 1 Terabyte (TB) Petabyte Exabyte Zettabyte Yottabyte Brontobyte

Page 9: ความรู้เบื้องต้นฐานข้อมูล 1

One or more related characters treated as a unit and constituting part of a record.

Page 10: ความรู้เบื้องต้นฐานข้อมูล 1

A group of related data, words, or fields treated as a meaningful unit.

Page 11: ความรู้เบื้องต้นฐานข้อมูล 1

A group of records in database.

Page 12: ความรู้เบื้องต้นฐานข้อมูล 1

an entity is an existing or real thing. Example: Customer, Student, Item

Page 13: ความรู้เบื้องต้นฐานข้อมูล 1

an attribute is an specification that defines a property of an object, element, or file.

Example:CustomerAttribute: Title, Firstname, Lastname,

Address, Telephone, Email

Page 14: ความรู้เบื้องต้นฐานข้อมูล 1

Primary key is that candidate key which is used to uniquely identify each and every attribute and instance of a particular entity.

Example – Purchase Order Master Table

Page 15: ความรู้เบื้องต้นฐานข้อมูล 1

A Foreign key is an attribute in some another entity which is already a primary key in some entity. Is used for the purpose of maintaining the integrity of the data.

Example – The Purchase Order Master and the Purchase Order Detail Relationship.

Page 16: ความรู้เบื้องต้นฐานข้อมูล 1
Page 17: ความรู้เบื้องต้นฐานข้อมูล 1

Text. Essentially the strings or number. 255 character maximum.

Number. This category includes Byte (unsigned 8-bit), Integer (signed 16-bit), Long (signed 32-bit), Single (signed 32-bit), and Double (signed 64-bit).

Page 18: ความรู้เบื้องต้นฐานข้อมูล 1

Currency. A 64-bit fixed point number, designed to give the accuracy needed for financial data. 15 digits of whole dollars, plus four decimal places (hundredths of a cent).

The AutoNumber is an automatically assigned number.

Page 19: ความรู้เบื้องต้นฐานข้อมูล 1

Date/Time. The 8-byte floating point numbers, the integer part refers to the day, and the fraction part refers to the time.

Yes/No. A Logical field can be displayed as Yes/No, True/False, or On/Off.

Memo. Many texts. Up to 64K of text.

Page 20: ความรู้เบื้องต้นฐานข้อมูล 1

OLE Object. Use this type to store pictures, audio, video, or other BLOBs (Binary Large OBjects).

Page 21: ความรู้เบื้องต้นฐานข้อมูล 1

User Operator System Analyst Programmer Database Administrator

Page 22: ความรู้เบื้องต้นฐานข้อมูล 1
Page 23: ความรู้เบื้องต้นฐานข้อมูล 1

It defines a set of operations that can be performed on the data.

Page 24: ความรู้เบื้องต้นฐานข้อมูล 1

Hierarchical database model Network database model Relational database model Object database models

Page 25: ความรู้เบื้องต้นฐานข้อมูล 1

Alternative › Star schema› XML database

Page 26: ความรู้เบื้องต้นฐานข้อมูล 1

hierarchical database model, data is organized into a tree-like structure. The structure allows repeating information using parent/child relationships: each parent can have many children but each child only has one parent.

Page 27: ความรู้เบื้องต้นฐานข้อมูล 1
Page 28: ความรู้เบื้องต้นฐานข้อมูล 1

network model is a database model conceived as a flexible way of representing objects and their relationships. the network model allows each record to have multiple parent and child records

Page 29: ความรู้เบื้องต้นฐานข้อมูล 1
Page 30: ความรู้เบื้องต้นฐานข้อมูล 1

A relational database model developed by E.F. Codd. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organised in tables. A table is a collection of records and each record in a table contains the same fields.

Page 31: ความรู้เบื้องต้นฐานข้อมูล 1
Page 32: ความรู้เบื้องต้นฐานข้อมูล 1

A data model is a logic organization of the real world objects (entities), constraints on them, and the relationships among objects. A DB language is a concrete syntax for a data model. A DB system implements a data model.

Page 33: ความรู้เบื้องต้นฐานข้อมูล 1
Page 34: ความรู้เบื้องต้นฐานข้อมูล 1

The star schema is the simplest style of data warehouse schema. The star schema consists of a few "fact tables" (possibly only one, justifying the name) referencing any number of "dimension tables".

Page 35: ความรู้เบื้องต้นฐานข้อมูล 1
Page 36: ความรู้เบื้องต้นฐานข้อมูล 1

An XML database is a data persistence software system that allows data to be stored in XML format.

XML Format› <firstname> Witoon </firstname>› <lastname>Thammatuch-aree</

lastname>

Page 37: ความรู้เบื้องต้นฐานข้อมูล 1

One to Many Many to One One to One Many to Many

Page 38: ความรู้เบื้องต้นฐานข้อมูล 1

One to Many relationship – occurs when one entity is related to many occurrences in another entity. For example, one club has many members.

Page 39: ความรู้เบื้องต้นฐานข้อมูล 1

A Many to One relation is the same as one-to-many, but from a different viewpoint.

Page 40: ความรู้เบื้องต้นฐานข้อมูล 1

A one-to-one relation is exception in databases. It can occur, but it's often a sign that the database design has opportunities for improvement.

Page 41: ความรู้เบื้องต้นฐานข้อมูล 1

Many to Many relationship – occurs when one entity is related to many occurrences in one entity. For example, one newspaper has many readers and one reader has many newspaper.

Page 42: ความรู้เบื้องต้นฐานข้อมูล 1

Avoid Inconsistency Data Sharing Reduce Redundancy Data Integrity Data Security Application and Database

Page 43: ความรู้เบื้องต้นฐานข้อมูล 1
Page 44: ความรู้เบื้องต้นฐานข้อมูล 1

Create Table and Relation for:› Group A = Customers› Group B = Suppliers› Group C = Employees› Group D = Items

Field name, Field type, Field size, Primary Key