Lecture 5. Data base systems. Basics of database systems: concept and architecture. Data models. Basics of SQL. Lecture 5. Data base systems. Basics of.

Презентация:



Advertisements
Похожие презентации
Database Systems 1. The purpose of the lecture Learn to use database management software to develop data-intensive applications Become familiar with fundamental.
Advertisements

Computer software Operating systems. The objective of the lesson: To explain what the software is and why it exists; to learn to distinguish the system,
DATABASE MANAGEMENT SYSTEMS CMAM301. Introduction to database management systems What is Database? What is Database Systems? Types of Database. Database.
«MODERN IT TRENDS IN THE PROFESSIONAL SPHERE». What is information? The word "information" is used in many different ways. Originally, it comes from a.
Functional areas in World Class and in BCBF BELIKOVA ANASTASIA.
Amazon Web Services The Blue Book pages 19 onwards.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Applying Route-Maps as BGP Filters.
1 1 Chapter 1 Introduction to Database Management Database Management.
Prepared: Kurateva E.. According to the UN Committee on Crime Prevention and Control, computer crime has reached the level of one of the international.
An ICT role in key sectors of development of society. Standards in the field of ICT. Created by: Jabai Bakhytkhan.
Name: Yogesh Mehla Website: Phone:
Microsoft Excel Performed: Kerimbayeva Dana Group: 145.
In The Name Of Allah, Most Gracious And Most Merciful.
COMPUTER BASICS. TYPES OF COMPUTERS 1. SUPERCOMPUTERS are used to process very large amounts of information including processing information to predict.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Building a Simple Serial Network Exploring the Functions of Networking.
Relational Database 1Data model 2Relational Database 3 Relational algebra 4 Algebraic operations 4.1 Standard set-theoretic operations 4.2 Cartesian product.
Lecture # Computer Architecture Computer Architecture = ISA + MO ISA stands for instruction set architecture is a logical view of computer system.
The only way to dial. STAR PHONE – The only way to Dial "Hello and thank you for calling us... For management dial one ….For accounting department dial.
GROUP 33-1 NAME : DIANA SURNAME : SHEVKETOVA Networks.
Designing Network Management Services © 2004 Cisco Systems, Inc. All rights reserved. Designing the Network Management Architecture ARCH v
Транксрипт:

Lecture 5. Data base systems. Basics of database systems: concept and architecture. Data models. Basics of SQL. Lecture 5. Data base systems. Basics of database systems: concept and architecture. Data models. Basics of SQL. Information Communication technology

What is databases A set of information held in a computer Oxford English Dictionary One or more large structured sets of persistent data, usually associated with software to update and query the data Free On-Line Dictionary of Computing A collection of data arranged for ease and speed of search and retrieval Dictionary.com Nowadays we do not imagine the working of many financial, introduce, trade and other organizations. Databases allows structure, store information and retrieval its in optimize view.

Databases Web indexes Web indexes Library catalogues Library catalogues Medical records Medical records Bank accounts Bank accounts Stock control Stock control Personnel systems Personnel systems Product catalogues Product catalogues Telephone directories Telephone directories Train timetables Train timetables Airline bookings Airline bookings Credit card details Credit card details Student records Student records Customer histories Customer histories Stock market prices Stock market prices Discussion boards Discussion boards and so on… and so on…

Database Systems A database system consists of A database system consists of Data (the database) Data (the database) Software Software Hardware Hardware Users Users We focus mainly on the software We focus mainly on the software Database systems allow users to Database systems allow users to Store Update Retrieve Organize Protect their data.

Database Users End users End users Use the database system to achieve some goal Use the database system to achieve some goal Application developers Application developers Write software to allow end users to interface with the database system Write software to allow end users to interface with the database system Database Administrator (DBA) Database Administrator (DBA) Designs & manages the database system Database systems programmer Database systems programmer Writes the database software itself

Database Management Systems A database is a collection of information A database is a collection of information A database management system (DBMS) is the software than controls that information A database management system (DBMS) is the software than controls that information Examples: Examples: Oracle DB2 (IBM) MS SQL Server MS Access Ingres PostgreSQL MySQL

What the DBMS does Provides users with Provides users with Data definition language (DDL) Data definition language (DDL) Data manipulation language (DML) Data manipulation language (DML) Data control language (DCL) Data control language (DCL) Often these are all the same language Often these are all the same language DBMS provides DBMS provides Integrity Security Data independence Data Dictionary Data Dictionary Describes the database itself

Hierarchical Network Relational Essential Types of data models Data model

The Relational Model Each attribute has a unique name within an entity Each attribute has a unique name within an entity All entries in the column are examples of it All entries in the column are examples of it Each row is unique Each row is unique Ordering of rows and columns is unimportant Ordering of rows and columns is unimportant Each position is limited to a single entry. Each position is limited to a single entry.

Relational Systems Problems with early databases Problems with early databases Navigating the records requires complex programs Navigating the records requires complex programs There is minimal data independence There is minimal data independence No theoretical foundations No theoretical foundations Then, in 1970, E. Codd wrote A Relational Model of Data for Large Shared Databanks and introduced the relational model Then, in 1970, E. Codd wrote A Relational Model of Data for Large Shared Databanks and introduced the relational model

Relational Systems Information is stored as tuples or records in relations or tables Information is stored as tuples or records in relations or tables There is a mathematical theory of relations There is a mathematical theory of relations Most modern DBMS are based on the relational model Most modern DBMS are based on the relational model The relational model covers 3 areas: The relational model covers 3 areas: Data structure Data integrity Data manipulation

Database Operations Refers to the most common Database Operations: Refers to the most common Database Operations: Create Create Read Read Update Update Delete Delete Operations occur at all levels: Tables, Records, Columns Operations occur at all levels: Tables, Records, Columns

Database Tables Tables represent entities Tables represent entities Tables are always named in the singular, such as: Vehicle, Order, Grade, etc. Tables are always named in the singular, such as: Vehicle, Order, Grade, etc. It consists of rows and colomns It consists of rows and colomns

Attributes Characteristics of an entity Characteristics of an entity Examples: Examples: Vehicle (VIN, color, make, model, mileage) Vehicle (VIN, color, make, model, mileage) Student (SSN, Fname, Lname, Address) Student (SSN, Fname, Lname, Address) Fishing License (Type, Start_date, End_date) Fishing License (Type, Start_date, End_date)

Database Table Example Figure 2: An improved database table.. Figure 1: A simple – and flawed – table design.

Database Views A View is an individuals picture of a database. It can be composed of many tables, unbeknownst to the user. A View is an individuals picture of a database. It can be composed of many tables, unbeknownst to the user. Its a simplification of a complex data model Its a simplification of a complex data model It provides a measure of database security It provides a measure of database security Views are useful, primarily for READ-only users and are not always safe for CREATE, UPDATE, and DELETE. Views are useful, primarily for READ-only users and are not always safe for CREATE, UPDATE, and DELETE.

Database Keys Primary Key - Indicates uniqueness within records or rows in a table. Primary Key - Indicates uniqueness within records or rows in a table. Foreign Key - the primary key from another table, this is the only way join relationships can be established. Foreign Key - the primary key from another table, this is the only way join relationships can be established. There may also be alternate or secondary keys within a table. There may also be alternate or secondary keys within a table.

Relational Database Management System (RDBMS) NameAddressParcel # John Smith18 Lawyers Dr T. Brown14 Summers Tr Table A Table B Parcel #Assessed Value , ,000

Using SQL- Structured Query Language SQL is a standard database protocol, adopted by most relational databases SQL is a standard database protocol, adopted by most relational databases Provides syntax for data: Provides syntax for data: Definition Definition Retrieval Retrieval Functions (COUNT, SUM, MIN, MAX, etc) Functions (COUNT, SUM, MIN, MAX, etc) Updates and Deletes Updates and Deletes

SQL Examples CREATE TABLE SALESREP CREATE TABLE SALESREP Item definition expression(s) Item definition expression(s) {item, type, (width)} {item, type, (width)} DELETE table DELETE table WHERE expression WHERE expression

Data Retrieval SELECT list FROM table WHERE condition SELECT list FROM table WHERE condition list - a list of items or * for all items list - a list of items or * for all items WHERE - a logical expression limiting the number of records selected WHERE - a logical expression limiting the number of records selected can be combined with Boolean logic: AND, OR, NOT can be combined with Boolean logic: AND, OR, NOT ORDER may be used to format results ORDER may be used to format results

UPDATE tables SET item = expression SET item = expression WHERE expression WHERE expression INSERT INTO table INSERT INTO table VALUES ….. VALUES …..