* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download What is a Database?
Survey
Document related concepts
Serializability wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Concurrency control wikipedia , lookup
Relational model wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
Advanced Computer Programming Databases 1 Overview What is a database? Database Basics Database Components Data Models Normalization Database Design 2 What is a Database? A database stores large amounts of information to be retrieved or compared through a series of queries and relationships. Databases can retrieve information very quickly. They can even be used to synthesize new data from information that is stored; a process called data mining. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 3 Database Basics Database Management is an important part of working with a database. This is usually done through a Database Management System (DBMS). A DBMS is software that guides the creation and maintenance of a database. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 4 Database Basics Most common tasks with a database are called transactions or queries. A transaction or query can be placement, retrieval or modification of data within the database. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 5 Database Basics Other database management tasks are: Creating an organized structure for the data Creating a simple to use interface for the data Setting up reporting for inquires and response Creating backup copies of the database Recovering data from a backup Manage security on the database Provide a language for searching the database Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 6 Database Components Entity An entity is a person, place, thing or event that can be modeled in a data base. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 7 Database Components Field A field is an attribute of an entity, such as a name, address, cost, or quantity in stock. Fields are defined with three properties: Data type such as a String, number or date Identifier -- a name to classify the data Size usually in characters -- how large the data is Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 8 Database Components Record A record is a collection of related fields. For example, a person’s name, address and phone number might be a complete record for a contacts database. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 9 Database Components Table A table is a collection of records of the same type -- a collection of names and addresses as in a contacts list, for example. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 10 Database Components Key A key is a field or attribute used to identify information in a database. Keys are typically used to store and retrieve information in the database. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 11 Database Components Primary Key The key to an entity that is usually the most important piece of information about the entity. The primary key needs to be as unique as possible. Names, for example, are very poor keys while ID numbers, account numbers or work order numbers are better. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 12 Data Models There are several types of Data Models that can be used to store information in a database: Flat file Relational Object Oriented Multimedia Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 13 Data Models A Flat File database is a basic database model that simply stores information without taking into account any other concerns. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 14 Data Models A Relational database stores relationships between different data items and can be used to retrieve and store information based on those relationships. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 15 Data Models Object Oriented databases (OO) are based on object models used in computer programs. An OO database is typically used to store complete software objects. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 16 Data Models A Multimedia database is specifically designed to hold videos and music files as well as other types of multimedia. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 17 Data Models In addition, there are functional models: Operational databases are designed to allow interactive transactions such as inventory control. Data Warehouse databases store static information intended for lookup and data mining. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 18 Normalization Normalization is a process which removes redundancy from a database and helps remove inconsistencies. Normalization is done in a series of forms where information is grouped into evernarrowing categories. Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 19 Database Design Steps to Database Design: 1. Requirements analysis 2. Create fields necessary to store data 3. Create tables and normalize them 4. Define data Relationships 5. Evaluate performance and determine if the database meets the client’s needs Copyright © Texas Education Agency, 2013 IT: Advanced Computer Programming – Databases 20