Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In 1971, conference on Data Systems Language (CODASYL) defined N/W Model Based on Mathematical Set Theory Permits Modeling of Many-to-many Relationship in data
Basic Modeling construct is Set Set contains Owner Record type, a Set Name, a member Record Type member Record Type achieves Many to many Relation Owner Record type may be member of Owner in another set Data Model is Simple N/W Links and Intersections record Types may exist and sets between them Complete N/W of Relationship is represented by several pair wise sets In Each set some Record Types are Owner and one or more record types are Members Usually set defines 1:M relationship, 1:1 also permitted
Copyright SevenPeaks Academy
DATABASE LANGUAGES
Data Definition Language (DDL) DDL is to Specify the Database Schema, Create, destroy database and database object, Storage Structure, access method statements Commands for Data Administrators Provides facility of Constraints like integrity constraints, domain constarints Data Manipulation Language (DML) /Query Language DML to express database queries and updates Allows the users to manipulate data as organized by appropriate data model Used to retrieve, Insert, & modify database information Two types: 1. Procedural & 2. Non Procedural Procedural DML: What data r needed and how to get that data.
DML
DML to express database queries and updates Allows the users to manipulate data as organized by appropriate data model Used to retrieve, Insert, & modify database information Two types: 1. Procedural & 2. Non Procedural Procedural DML: What data r needed and how to get that data Used to transfer cause data between a run unit & database It relies on the host language for framework to provide procedural activities required to manipulate. Basic DML Commands are: SELECT SELECT * INSERT UPDATE DELETE MERGE
DCL
Domain Constraints: * Domain-Set of Possible Values for each attribute associated with an entity set. * Specify important constraints that each instance of relation must satisfy Referential Integrity: Property of data which, when satisfied, requires every value of one attribute(column) of relation (table) to exists as a value of another attribute in a different (or the same) relation (Table) Assertions: Condition that database must always satisfy e.g. Domain Constraint and Referential Integrity Authorization: Read Authorization Insert Authorization Update Authorization Delete Authorization DDL Commands: CREATE DATABASE & TABLE USE ALTER ADD DROP DATABASE & TABLE
Copyright SevenPeaks Academy
DATABASE DESIGN
Process of producing a detailed data model of Database contains all logical and physical design choices and Physical storage parameter Fully attributed data model contains detailed attributes for each entity. Design carried out by 1. find the relationship between different Data elements, 2. Superimpose a logical structure upon data on the basis of these relationship To design information s/m that is based in database, the conceptual data model is mapped to logical data model (relational model); this in turn mapped to a physical model during physical design. Both of these stages are referred as Physical Design.
Copyright SevenPeaks Academy
Entity-Relationship Model
This model is used during Requirement Analysis stage of Information System Design. Entity - a thing which is recognized as being capable of an independent existence & uniquely identified. E.g. Car, house etc. It can be set as noun Relationship - How two or more entities r related to one another. It can be set as Verb, linking two or more nouns. E.g. an owns relationship between Company and a computer, a performs relationship between an artist and a song. Attributes Entity and Relationship can both have attributes. E.g. An employee entity might have an Employee Id. attribute Proved relationship may have a Date attribute Every Entity must have a minimal set of uniquely identified attributes, called Entitys Primary Key Continue.
Copyright SevenPeaks Academy
Entity-Relationship Model
Diagrammatic conventions are used called Entity Relationship Diagrams (ERDs) Entity Set -> Rectangles Relationship Set -> Diamonds Attributes -> Ovals connected with Lines If Entity set participates in a relationship set, they are connected with a line. ERDs dont show single entities or single instance of relations. Continue
Copyright SevenPeaks Academy
Entity-Relationship Model
A Double line : A participation constraints i.e. totality or surjectivity: Relationship Set An arrow from entity set to relationship set : A key -> Diamonds constraint, i.e. injectivity A thick line indicates both, i.e. Attributes -> bijective Ovals connected with An underlined name of an attribute indicates that is a key Lines
Entity Set -> Rectangles
Copyright SevenPeaks Academy
Normalization
Normalization: Normalization is the process of efficiently organizing data in a database. There are two goals of Normalization process: 1. Eliminating Redundant Data 2. Ensuring data dependencies make sense There are five normal forms through which we can normalize the database. These forms are as following: 1. First Normal Form or 1NF 2. Second Normal Form or 2NF 3. Third Normal Form or 3NF 4. Fourth Normal Form or 4NF 5. Fifth Normal Form or 5NF
Out of these five normal forms only first three are used in practical. 4NF used occasionally and 5NF is used very rarely.
Continue.
Copyright SevenPeaks Academy
Normalization
First Normal Form (1NF) : First normal forms (1NF) sets the very basic rules for an organized database: 1. Eliminate duplicate columns from the Same Table 2. Create Separate table for each group of related data and identify each row with the unique column or set of columns (the primary key) Second Normal Form (2NF): Second Normal Form (2NF) further addresses the concept of removing the duplicate data. This can be achieved by following techniques, 1. Meet all requirement s of 1NF 2. Remove subsets of Data that apply to multiple rows of a table and place them in separate tables 3. Create relationship between these new tables and their predecessors through the use of Foreign Key
Copyright SevenPeaks Academy
Continue.
Normalization
Third Normal Form (3NF) : 3NF goes one step further; 1. Meet all requirement s of 2NF 2. Remove columns that are not dependent upon the primary key Fourth Normal Form (4NF) : Meet all requirement s of 3NF A Relation is in 4NF if it has no multi-valued dependencies. Normalization guidelines are cumulative. For the database to be in 2NF, it must full fill criteria of 1NF
Copyright SevenPeaks Academy
DDL Interpreter: 1. Interprates DDL Statements and records defn in the data dictionary. DML Compiler: 1. Translates DML Statemt in a query Language into a evaluation plan and performs query Optimization. 2. Evaluation plan consists of Low-Level instructions that the Query Evaluation Engine understand. 3. DML Compiler Also performs Query Optimization by picking the lowest cost evaluation plan among the alternatives Query Evaluation Engine: Executes the low level instructions generated by DML Compiler.
Copyright SevenPeaks Academy
Continue.
Question: What is mean by Data Mining and what are the tasks of Data Mining?
Copyright SevenPeaks Academy
Database Architecture:
Simple User User Application Interface Write Application Program Application Programmer User Query Tools Sophisticated User(Analyser) User Administration tools Database Administrator
DML Query
DDL Interpreter
Buffer Manager
File Manager Authorization & Integrity Manager Transaction Manager Storage Manager
The architecture of Database system in depends on the underlying Computer System on which the database is running. Accordingly the architecture is divided into: 1. Centralized 2. Client-Server 3. Parallel 4. Distributed Two-tier Architecture: * Application is partitioned into components that resides on client machine * Client Machine directly invoke database system at server level through Query Language Statemt.
Continue.
Copyright SevenPeaks Academy
Database Architecture
Database Architecture
Three-Tier Architecture: * Client Machine acts as merely a front-end and does not contain any direct call. * Usually the client end communicates with the application server through forms interface
User Application
T w o T i e r
A r c h i t e c t u r e
User Client
Application Client
Application Server
Database System
Server
T h r e e T i e r
Database System
A r c h i t e c t u r e