Data Base Concepts. Course Guide 2

Similar documents
Introduction to Databases

Fundamentals of Information Systems, Seventh Edition

Database System Concepts and Architecture

CS313D: ADVANCED PROGRAMMING LANGUAGE

Data about data is database Select correct option: True False Partially True None of the Above

INTRODUCTION TO DATABASE

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

DATABASES SQL INFOTEK SOLUTIONS TEAM

INFORMATION TECHNOLOGY NOTES

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

DATABASE MANAGEMENT SYSTEMS PREPARED BY: ENGR. MOBEEN NAZAR

Database Management System 9

CGS 3066: Spring 2017 SQL Reference

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Relation Databases. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift Jaipur Region. Based on CBSE Curriculum Class -11. Neha Tyagi, PGT CS II Shift Jaipur

Relational Database Systems Part 01. Karine Reis Ferreira

Bonus Content. Glossary

Review for Exam 1 CS474 (Norton)

Course Outline and Objectives: Database Programming with SQL

Unit 7: Database Development (Basic)

1 Overview of Database Management

Course Introduction & Foundational Concepts

Relational Theory and Data Independence: Unfinished Business. Logical Data Independence and the CREATE VIEW Statement.

Database Processing. Fundamentals, Design, and Implementation. Global Edition

Outline. Definitions History Basic concepts of DBMS Data Models Relational database Normalization

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

Introduction to Computer Science and Business

STRUCTURED QUERY LANGUAGE (SQL)

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Introduction to DBMS DATA DISK. File Systems. DBMS Stands for Data Base Management System. Examples of Information Systems which require a Database:

Oracle Database 10g: Introduction to SQL

Basant Group of Institution

Mahathma Gandhi University

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C

Lecture 1: Relational Databases

John Edgar 2

DBMS Questions for IBPS Bank Exam

Databases CSCI 201 Principles of Software Development

Review -Chapter 4. Review -Chapter 5

SQL Data Definition Language: Create and Change the Database Ray Lockwood

Introduction to Computer Science and Business

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1

The functions performed by a typical DBMS are the following:

CS317 File and Database Systems

(ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK)

Database Systems Concepts *

Database Management System. Fundamental Database Concepts

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

DATABASE DESIGN I - 1DL300

SQL Interview Questions

Database Management Systems

MTA Database Administrator Fundamentals Course

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas

DATABASE PART 2. Components and Functions

Solved MCQ on fundamental of DBMS. Set-1

Using Relational Databases for Digital Research

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

DATABASE MANAGEMENT SYSTEM

COSC 304 Introduction to Database Systems. Database Introduction. Dr. Ramon Lawrence University of British Columbia Okanagan

Manual Trigger Sql Server 2008 Examples Insert Update

Definitions. Database Architecture. References Fundamentals of Database Systems, Elmasri/Navathe, Chapter 2. HNC Computing - Databases

CPS510 Database System Design Primitive SYSTEM STRUCTURE

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

Lecture 03. Spring 2018 Borough of Manhattan Community College

5. Single-row function

Brief History of SQL. Relational Database Management System. Popular Databases

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL

Chapter 6. Foundations of Business Intelligence: Databases and Information Management VIDEO CASES

File Processing Approaches

Data, Information, and Databases

Course Introduction & Foundational Concepts

! Define terms. ! Interpret history and role of SQL. ! Write single table queries using SQL. ! Establish referential integrity using SQL

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

The Relational Model. Roadmap. Relational Database: Definitions. Why Study the Relational Model? Relational database: a set of relations

Certification Exam Preparation Seminar: Oracle Database SQL

Chapter 2. DB2 concepts

Data, Databases, and DBMSs

Database System Concepts and Architecture

Introduction to SET08104

MySQL Introduction. By Prof. B.A.Khivsara

The Relational Model Constraints and SQL DDL

Course Details Duration: 3 days Starting time: 9.00 am Finishing time: 4.30 pm Lunch and refreshments are provided.

4/28/2014. File-based Systems. Arose because: Result

Review. The Relational Model. Glossary. Review. Data Models. Why Study the Relational Model? Why use a DBMS? OS provides RAM and disk

IBM DB2 UDB V7.1 Family Fundamentals.

Manual Trigger Sql Server 2008 Examples Update

SQL DDL. Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin

Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10

Database Technology Introduction. Heiko Paulheim

Sql 2008 Copy Tables Structure And Database To Another

Practical Database Design Methodology and Use of UML Diagrams Design & Analysis of Database Systems

Chapter 3: The Relational Database Model

Bottom line: A database is the data stored and a database system is the software that manages the data. COSC Dr.

Transcription:

MS Access Chapter 1

Data Base Concepts Course Guide 2

Data Base Concepts Data The term data is often used to distinguish binary machine-readable information from textual human-readable information. For example, some applications make a distinction between data files (files that contain binary data) and text files (files that contain ASCII data). Data base A Database is an organized collection of data. The Data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. For example, modeling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database Management System (DBMS) Database management systems (DBMSs) are specially designed applications that interact with the user, other applications, and the database itself to capture and analyze data. A general-purpose database management system (DBMS) is a software system designed to allow the definition, creation, querying, update, and administration of databases. Well-known DBMSs include MySQL, PostgreSQL, SQLite, Microsoft SQL Server,Oracle, SAP, dbase, FoxPro, IBM DB2, LibreOffice Base and FileMaker Pro. A database is not generally portable across different DBMS, but different DBMSs can by using standards such as SQL and ODBC or JDBC to allow a single application to work with more than one database. Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information. Databases are set up so that one set of software programs provides all users with access to all the data. A "database management system" (DBMS) is a suite of computer software providing the interface between users and a database or databases. Because they are so closely related, the term "database" when used casually often refers to both a DBMS and the data it manipulates. Course Guide 3

Relationship A Relationship, in the context of databases, is a situation that exists between two relational database tables when one table has a foreign key that references primary key of the other table. Relationships allow relational databases to split and store data in different tables, while linking disparate data items. Normalizations Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy and dependency. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database using the defined relationships. Database Components Fields - In computer science, data that has several parts can be divided into fields. Relational databases arrange data as sets of database records, also called rows. Each record consists of several fields; the fields of all records form the columns. Records - In the context of a relational database, a row also called a record or tuple represents a single, implicitly structured data item in a table. In simple terms, a database table can be thought of as consisting of rows and columns or fields. Each row in a table represents a set of related data, and every row in the table has the same structure. Tables - In relational databases and flat file databases, a table is a set of data elements (values) that is organized using a model of vertical columns (which are identified by their name) and horizontal rows, the cell being the unit where a row and column intersect. A table has a specified number of columns, but can have any number of rows. Each row is identified by the values appearing in a particular column subset which has been identified as a unique key index. Course Guide 4

Key Fields Primary Key - In a relational database, a "Primary Key" is a key that uniquely defines the characteristics of each row (also known as record or tuple). The primary key has to consist of characteristics that cannot be duplicated by any other row. The primary key may consist of a single attribute or a multiple attributes in combination. For example, a birthday could be shared by many people and so would not be a prime candidate for the Primary Key, but a social security number or Driver's License number would be ideal since it correlates to one single data value. Another unique characteristic of a Primary Key as it pertains to a relational database, is that a Primary Key must also serve as a Foreign Key on a related table. Foreign Key - In the context of relational databases, a foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table. In other words, a foreign key is a column or a combination of columns that is used to establish and enforce a link between the data in two tables. For example, consider a database with two tables, a CUSTOMER table that includes all customer data and an ORDER table that includes all customer orders. Suppose that the business requires that each order must refer to a single customer. To reflect this in the database, the primary key (e.g., CUSTOMERID) in the CUSTOMER table is added to the ORDER table, where it is called a foreign key. Since CUSTOMERID in the ORDER table uniquely identifies a row of the CUSTOMER table, it says which customer placed the order. Course Guide 5

Rationalization and Redundancy: Grouping logically-related fields into distinct tables, determining key fields, and then relating distinct tables using common key fields is called rationalizing a database. There are two major reasons for designing a database this way: To avoid wasting storage space for redundant data To eliminate the complication of updating duplicate data copies For example, in the Customers/Orders database, we want to be able to identify the customer name, address, and phone number for each order, but we want to avoid repeating that information for each order. To do so would take up storage space needlessly and make the job of updating multiple customer addresses difficult and time-consuming. To avoid redundancy: Place all the fields related to customers (name, address, etc.) into a Customer table and create a Primary key field which uniquely identifies each customer: Customer ID. Put all the fields related to orders (date, salesperson, total, etc.) into the Orders table. Include the Primary key field (Customer ID) from the Customer table in the table for Orders. The One-to-Many relationship between Customer and Orders is defined by the common field Customer ID. In the table for Customers (the "one" table) Customer ID is a primary key, while in the Orders table (the "many" table) it is a foreign key. Course Guide 6

What is SQL? SQL Structured Query Language is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS).SQL is pronounced SEQUEL. SQL was developed during the early 70 s at IBM. DML: A data manipulation language (DML) is a family of syntax elements similar to a computer programming language used for inserting, deleting and updating data in a database. Performing read-only queries of data is sometimes also considered a component of DML. A popular data manipulation language is that of Structured Query Language (SQL), which is used to retrieve and manipulate data in a relational database. Other forms of DML are those used by IMS/DLI, CODASYL databases, such as IDMS and others. Data manipulation language comprises the SQL data change statements, which modify stored data but not the schema or database objects. Manipulation of persistent database objects, e.g., tables or stored procedures, via the SQL schema statements, rather than the data stored within them, is considered to be part of a separate data definition language. In SQL these two categories are similar in their detailed syntax, data types, expressions etc., but distinct in their overall function. DDL: A data definition language or data description language (DDL) is a syntax similar to a computer programming language for defining data structures, especially database schemas. Short for Data Definition Language, DDL is a computer language that is used to define data structures. In Database Management Systems (DBMS), it is used to specify a database scheme as a set of definitions (expressed in DDL). In SQL, the Data Definition Language (DDL) allows you to create, alter, and destroy database objects. Course Guide 7

The Data Definition Language (DDL) is used to create and destroy databases and database objects. These commands will primarily be used by database administrators during the setup and removal phases of a database project. DDL: Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary RENAME - rename an object DML: Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples: SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates existing data within a table DELETE - deletes all records from a table, the space for the records remain MERGE - UPSERT operation (insert or update) CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency Course Guide 8