Review -Chapter 4. Review -Chapter 5

Similar documents
Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 8 Data Modeling Advanced Concepts

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query

EDUVITZ TECHNOLOGIES

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

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

MTA Database Administrator Fundamentals Course

Oracle Database 10g: Introduction to SQL

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

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Table of Contents. Oracle SQL PL/SQL Training Courses

Oracle Database 11g: SQL and PL/SQL Fundamentals

5. Single-row function

8) A top-to-bottom relationship among the items in a database is established by a

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

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

JSPM s Bhivarabai Sawant Institute of Technology & Research, Wagholi, Pune Department of Information Technology

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

Oracle Database: SQL and PL/SQL Fundamentals NEW

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

Sql Server Syllabus. Overview

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

Oracle SQL & PL SQL Course

Chapter 1 SQL and Data

THE RELATIONAL DATABASE MODEL

Oracle Syllabus Course code-r10605 SQL

Querying Data with Transact SQL

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

SQL Interview Questions

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 6 Normalization of Database Tables

- Database: Shared collection of logically related data and a description of it, designed to meet the information needs of an organization.

Non-overlappingoverlapping. Final outcome of the worked example On pages R&C pages R&C page 157 Fig 3.52

D.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK

Review for Exam 1 CS474 (Norton)

Basant Group of Institution

Course Outline Faculty of Computing and Information Technology

Mahathma Gandhi University

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

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

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

Assignment Session : July-March

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

Relational Model: History

Oracle Database: Introduction to SQL Ed 2

Mobile MOUSe MTA DATABASE ADMINISTRATOR FUNDAMENTALS ONLINE COURSE OUTLINE

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

20461: Querying Microsoft SQL Server 2014 Databases

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

ORACLE DATABASE 12C INTRODUCTION

FIT1004 Database Topic 6: Normalisation

Essentials of Database Management

Relational Model (cont d) & Entity Relational Model. Lecture 2

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: Introduction to SQL/PLSQL Accelerated

Chapter 4. In this chapter, you will learn:

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

Essential SQLite3. Section Title Page

Querying Microsoft SQL Server (461)

Objectives Definition iti of terms List five properties of relations State two properties of candidate keys Define first, second, and third normal for

Querying Data with Transact-SQL

After completing this course, participants will be able to:

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

COURSE OUTLINE MOC 20461: QUERYING MICROSOFT SQL SERVER 2014

Bonus Content. Glossary

AO3 - Version: 2. Oracle Database 11g SQL

Introduction to Computer Science and Business

Introduction to SQL/PLSQL Accelerated Ed 2

Week. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical

Solved MCQ on fundamental of DBMS. Set-1

Index *EXTIND option, ADDPFTRG command. See CL command Alias CREATE ALIAS for, 62, 64 for a column, 22, for a table, 15-17, 62, 66-67,

Chapter 4 Entity Relationship Modeling In this chapter, you will learn:

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Oracle Database: Introduction to SQL

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Chapter 7. Advanced SQL. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

Oracle Database: Introduction to SQL

DATABASE SYSTEMS. Chapter 5 Entity Relationship (ER) Modelling DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

Deccansoft softwareservices-microsoft Silver Learing Partner. SQL Server Syllabus

Teradata SQL Features Overview Version

A l Ain University Of Science and Technology

20761 Querying Data with Transact SQL

Entity Attribute STUDENT TABLE tuples single domain

Introduction to Computer Science and Business

Oracle Database 12c SQL Fundamentals

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

CPS510 Database System Design Primitive SYSTEM STRUCTURE

AVANTUS TRAINING PTE LTD

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I

Relational Database Systems Part 01. Karine Reis Ferreira


Oracle Database: Introduction to SQL

Sample Question Paper

UNIT-IV (Relational Database Language, PL/SQL)

Querying Microsoft SQL Server

Transcription:

Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships Attributes Includes connectivity and cardinality notations Includes weak vs strong entities and relationships Connectivity and cardinalities are based on business rules Review -Chapter 4 In the ER Model, M:N relationship is valid at conceptual level ERDs may be based on many different ER models including Chen and the Crowsfoot. Database designers are often forced to make design compromises Conflicting goals of data base design are a challenge of balancing design standards against processing speed and information requirements. Database design is iterative rather than linear or sequential process 1 2 Review -Chapter 5 Extended Entity Relationship (EER) model adds semantics to ER model via entity supertypes, subtypes, and clusters Generalization/Specialization Hierarchies Specialization hierarchy depicts arrangement and relationships between entity supertypes and entity subtypes Inheritance allows an entity subtype to inherit attributes and relationships of supertype Disjoint subtypes Entity Clustering & Virtual Entities Entity cluster is virtual entity type used to represent multiple entities and relationships in ERD Review -Chapter 5 Selecting Primary Keys Natural keys are identifiers which exist in the real world Surrogate primary keys are useful when there is no natural key for a primary key Composite keys are useful to represent M:N relationships and weak (strong-identifying) entities In a 1:1 relationship, place the PK of mandatory entity as foreign key in optional entity 3 4 1

Review -Chapter 5 Design Traps Time-variant data refers to data whose values change over time and whose requirements mandate that you keep a history of data changes Fan trap occurs when you have one entity in two 1:M relationships to other entities and there is an association among the other entities that is not expressed in model Data modeling checklist provides way for designer to check that the ERD meets set of minimum requirements Review -Chapter 6 Normalization & its role in database design Normalization is technique used to design tables in which data redundancies are minimized Normal forms most commonly encountered. 1NF, 2NF, 3NF Boyce-CoddNormal Form is a refinement of 3NFd 4th Normal Form - deleting Multi-valued attributes Normalization is an important part of the design process Whereas ERD s provide a macro view, normalization provides micro view of entities Focuses on characteristics of specific entities May yield additional entities 5 6 Review -Chapter 6 Formal Normalization properties Table is in 1NF when all key attributes are defined and when all remaining attributes are dependent on primary key Table is in 2NF when it is in 1NF and contains no partial dependencies Table is in 3NF when it is in 2NF and contains no transitive dependencies Table that is not in 3NF may be split into new tables until all of the tables meet 3NF requirements In Practice it is difficult to separate normalization from E-R diagramming designers will use both techniques. DML -Data manipulation language commands Select, Insert, Update, Delete, Commit, Rollback DDL commands -Data definition language commands Defines basic data base objects & manipulates their structures. DDL Commands -DBA Only: Create Database/Schema/Tablespace DDL Commands Create Table When defining attributes in a table, a column name and data type are required. 7 8 2

Create Table cont d When defining attributes in a table, a column name and data type are required. Attribute data typing The ANSI standard data types are supported by all RDBMS vendors in different ways Table Constraints Constraints used on columns including Not Null, Check, Default, and Unique. Constraints used on tables include Primary Key and Foreign Key. Create View Virtual tables or Views can be created to select pertinent columns from an existing table. Create Synonym Granting access rights Create Index -An index is a special object associated with a table which allows more efficient retrieval based on another key. Alter modifies the existing table structure Allows Adding column(s), Dropping columns or constraints, and Updating constraints. Drop deletes a database object Other Rename creates a new Table structure, insert the data from the original table, then drop the original table. Grant/Revoke allows giving privileges to other users for tables you own. Synonym creates shorter aliases for existing tables. Comment allows information about a table or column to be stored in the database. 9 10 More DML Commands Update Insert Delete A database transaction - Commit & Rollback includes all commands between a Commit (or session start) and the next Commit (or normal end of session). A copy of a table can be made by using a Create Table with a nested query to copy Column Data from the original table. Joining tables Standard or Natural join -uses join condition to match only rows with equal values in specified columns Cross join - creates a Cartesian product Recursive join -joining a table with itself Outer joins -are used to select rows that have no matching values in other related table Left Right Full -selects rows with no matching values from both tables in addition to the rows with matching values 11 12 3

Sequences a DB object used to auto-generate values which can then be assigned to a column s data. SQL built-in Functions -used to extract or transform data Numeric Character Date Data conversion Non-data typed functions (misc. & psuedocolumns) Updatable Views only using simple joins. No aggregate functions or set operators Relational Set Operators -part of the new SQL- 99 extensions. Union eliminates duplicate rows Union All retains duplicate rows Intersect combines rows from two queries, returning only rows in both queries Minus -combines rows from two queries, returning only rows appearing in the 1 st but not the 2 nd query. 13 14 Adv. ANSI standard Join Operators Cross Join Cartesian product Natural Join returns rows with matched columns having matching values Join Using -specify only the join column, therefore named the same in both tables Join On specify both table s join column, so can be differently named. Left/Right Outer Join returns matching rows & unmatched rows in Left/Right table. Full join returns both matched and unmatched rows. Not available in previous syntax. PL/SQL - Procedural Code Allows both SQL statements and 3GL control structures. A cursor is used to handle multiple rows returned by a SQL statement inside PL/SQL code. Embedded SQL refers to use of SQL statements within an application programming language Types of persistent procedural code stored in the database. Triggers executed based on events to a table. Procedures allows parameter input/output 15 16 4

Functions allows parameter input, and a single return value, and is executed by another trigger or procedure. Non- stored/persistent Procedural code Anonymous Blocks unnamed sets of code, not stored but for immediate execution Reading only -Not Covered in Class - Advanced - Nesting selects with Correlated queries as Attributes On the From clause On the Where clause On the Having clause 17 5