SlideShare a Scribd company logo
Business Information Systems Physical Data Modeling
Mapping Logical to Physical Model the entity names have been changed to table names, changed attribute names to column names, assigned nulls and not nulls, and datatype to each column.  Comment  Definition  Foreign Key  Relationship  Check Rule, Default Value Rule Non Unique Index Inversion Key  Unique Key or Unique Constraint Alternate Key Primary Key Constraint Primary Key  Column Attribute  Table Entity Represents the physical implementation of the model in a database.  Represents business information and defines business rules  Physical Data Model  Logical Data Model
The Physical Data Model Includes all required  tables, columns, relationships, database properties  for the physical implementation of databases.  Database performance, indexing strategy, physical storage and denormalization are important parameters of a physical model.  Logical data model is approved by functional team and there-after development of physical data model work gets started.  The transformations from logical model to physical model include imposing database rules, implementation of referential integrity, super types and sub types etc.
DBMS A database is a collection of organized and structured data, stored in the computer as files. Various data types like numeric, textual, image, multimedia etc., can be managed and maintained more efficiently in a database. Often used databases (RDBMS) in most of the practical applications are Oracle, Sql Server, Informix, Terradata, DB2 etc.,  Some Oracle Objects Instance Schema Table Column Datatype Primary Key Constraint Unique Constraint Check Constraint Null / Not Null Index Sequence View Materialized View Synonym Procedure Function Package Trigger
Overview of objects A database instance can have many schemas;  A schema  contains multiple database objects like tables, views Tables A set of related data, arranged in the form of rows and columns.  Columns Also known as Field that provides the structure for organizing the rows and contains the related information.  Datatype : This is set of property associated with a column, which helps to store and identify the type of data and its length.
Constructs for “constraints” Null / Not Null A value that indicates that the column contains should or should not have a valid data Primary Key Constraint This is a constraint imposed on the column so that all values in the column should be different from each other. This constraint can be imposed on one column or group of columns. he primary key will be always used as a parent key when adding a referential constraint by connecting it to a child table.  Unique Constraint: Unique + Null Values Primary Key Constraint: Unique + Not Null Values  Foreign Key Constraint This is a constraint imposed on the child table. Whatever values are present in the child table, their corresponding values should be present in the parent table. This constraint can be imposed on one column or group of columns and NULL values are allowed in the child table.  Check Constraint This is a constraint that is imposed to validate the data within some value or range of values. This constraint can be imposed on one column or group of columns.
Constructs for “better” access Index Index is a database object that enables faster retrieval of data. Unique Index, Bitmap Index etc., are the different types of Index.  Views This is a PSEUDO table that is not stored in the database and it is just a query.  Materialized Views are similar to a view but these are permanently stored in the database and often refreshed. This is used in optimization for the faster data retrieval and is useful in aggregation and summarization of data.
Constructs for ‘automatic’ processing Procedure This is a program that contains set of code, which will carry out a specific action when called by other programs.  Functions This is a program that contains set of code, which will do a specific action when called by other programs. It will return a single VALUE  Trigger This is a program that contains set of code for doing some useful action when a record is inserted or deleted or updated in a table.
Raw Data on Employees For the sample data provided in the table, as a Data Modeler you have to design logical data model, physical data model and generate DDL scripts. In order to do the above tasks, you need to create the following:  Create 2 tables  DEPARTMENT, EMPLOYEE. Assign correct datatypes to the columns. Create constraints like primary key, unique key, null, not null, check to the columns. Assign correct PHYSICAL names for tables and columns. Select  DEPARTMENT as parent table and EMPLOYEE as the child table and connect them.
Employee Table
DEPARTMENT Table  Since ‘dept’ will be repeated for several records in EMPLOYEE table, you have to design this lookup for saving disk space. Sometimes the detail table may not show all information For example nuances of department name Department could have additional information, viz location, manager You have to create a column Dept Code, which is not present in sample data and this column should be assigned Primary Key to validate the detailed data in EMPLOYEE table.
DDL : Creating Tables Create the Department Lookup Table CREATE TABLE DEPARTMENT ( DEPT_ID NUMBER(2) NOT NULL,  DEPT_NAME VARCHAR(50) NOT NULL, LOCATION  VARCHAR(10), MANAGER NUMBER(6), CONSTRAINT DEPARTMENT_PK PRIMARY KEY (DEPT_ID ), );  An Oracle database consists of DDL commands, which are useful to create, modify and drop the database objects. In this section, we will try to explain about important database CREATE commands that are used by a data modeller by relating it with our example data.
The Main Table Create the final employee detail table CREATE TABLE EMPLOYEE ( EMP_ID NUMBER NOT NULL, FIRSTNAME VARCHAR(30) NOT NULL, LASTNAME VARCHAR(30) NOT NULL, JOBDESC VARCHAR(10), JOINDATE DATE,  EMP_SAL NUMBER(7,2) NOT NULL, COMM NUMBER (3,2), DEPT_CD NUMBER(2) CONSTRAINT EMPLOYEE_PK PRIMARY KEY (EMP_ID ), CONSTRAINT EMPLOYEE_FK01 FOREIGN KEY (DEPT_CD ) REFERENCES DEPARTMENT );
More Automation Defining a sequence CREATE SEQUENCE SEQ_EMPLOYEE_DTL INCREMENT BY 1 START WITH 1 NOMAXVALUE NOMINVALUE NOCACHE NOCYCLE NOORDER ;  Defining a trigger CREATE OR REPLACE TRIGGER TRG_SEQ_EMPLOYEE_DTL BEFORE INSERT ON EMPLOYEE FOR EACH ROW BEGIN SELECT SEQ_EMPLOYEE.NEXTVAL INTO :NEW.EMP_ID FROM DUAL; END;  Installing a trigger Whenever a record is inserted into "EMPLOYEE_DTL" table, this trigger selects the next unique number from the sequence "SEQ_EMPLOYEE_DTL" and inserts into the column "EMP_ID".  In our INSERT STATEMENTS example, we have not provided values for the column "EMP_ID" and inserting values into "EMP_DTL_ID is taken care by sequence and trigger.
Altering Tables Add Columns ALTER TABLE EMPLOYEE ADD PASSPORT_NUM NUMBER(6);  Rename Columns ALTER TABLE EMPLOYEE RENAME column PASSPORT_NUM TO EMP_EXTID;  Modify Column ALTER TABLE EMPLOYEE MODIFY EMP_EXTID VARCHAR2(10);  Drop Column ALTER TABLE EMPLOYEE DROP COLUMN EMP_EXTID;
Implementing Constraints Add Constraints ALTER TABLE EMPLOYEE ADD CONSTRAINT CH_SAL CHECK(EMP_SAL BETWEEN 4000 AND 7000);  Unique Constraints ALTER TABLE EMPLOYEE ADD CONSTRAINT UN_ID UNIQUE(EMP_EXTID);  ALTER TABLE EMPLOYEE DISABLE CONSTRAINT UN_ID; ALTER TABLE EMPLOYEE ENABLE CONSTRAINT UN_ID; ALTER TABLE EMPLOYEE DROP CONSTRAINT UN_ID;  Additional indexes CREATE INDEX IND_UNID ON EMPLOYEE(UN_ID);
Structured Query Language  A high language to manipulate the database Data Description Language Data Manipulation Language Data Control Language SQL
Ad

More Related Content

What's hot (20)

Ch05
Ch05Ch05
Ch05
cs19club
 
Ch04
Ch04Ch04
Ch04
cs19club
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
Dhananjay Goel
 
Oraclesql
OraclesqlOraclesql
Oraclesql
Priya Goyal
 
Mysql cheatsheet
Mysql cheatsheetMysql cheatsheet
Mysql cheatsheet
Adolfo Nasol
 
View & index in SQL
View & index in SQLView & index in SQL
View & index in SQL
Swapnali Pawar
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
sweetysweety8
 
Sql.pptx
Sql.pptxSql.pptx
Sql.pptx
TanishaKochak
 
Assignment#02
Assignment#02Assignment#02
Assignment#02
Sunita Milind Dol
 
12 SQL
12 SQL12 SQL
12 SQL
Praveen M Jigajinni
 
advanced sql(database)
advanced sql(database)advanced sql(database)
advanced sql(database)
welcometofacebook
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
LakshmiSarvani6
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
VENNILAV6
 
WEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And AttributesWEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And Attributes
DataminingTools Inc
 
Assignment#04
Assignment#04Assignment#04
Assignment#04
Sunita Milind Dol
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
Balqees Al.Mubarak
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
Vibrant Technologies & Computers
 
Assignment#05
Assignment#05Assignment#05
Assignment#05
Sunita Milind Dol
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
Tetala Vishnu Vardhan Reddy
 

Viewers also liked (19)

Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Karen Lopez 10 Physical Data Modeling Blunders
Karen Lopez 10 Physical Data Modeling BlundersKaren Lopez 10 Physical Data Modeling Blunders
Karen Lopez 10 Physical Data Modeling Blunders
Karen Lopez
 
Scalable
ScalableScalable
Scalable
DaeMyung Kang
 
Aurora Project
Aurora ProjectAurora Project
Aurora Project
Moonryul Jung
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basics
renuindia
 
246 deview 2013 신기빈
246 deview 2013 신기빈246 deview 2013 신기빈
246 deview 2013 신기빈
NAVER D2
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화
Henry Jeong
 
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
Devgear
 
SSD 개념 및 활용_Wh oracle
SSD 개념 및 활용_Wh oracleSSD 개념 및 활용_Wh oracle
SSD 개념 및 활용_Wh oracle
엑셈
 
데이터베이스 모델링
데이터베이스 모델링데이터베이스 모델링
데이터베이스 모델링
Hoyoung Jung
 
Data Modeling Presentations I
Data Modeling Presentations IData Modeling Presentations I
Data Modeling Presentations I
cd_crisci
 
Db 진단 및 튜닝 보고 (example)
Db 진단 및 튜닝 보고 (example)Db 진단 및 튜닝 보고 (example)
Db 진단 및 튜닝 보고 (example)
중선 곽
 
Ssd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysqlSsd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysql
swkim79
 
컴퓨터 네트워크와 인터넷
컴퓨터 네트워크와 인터넷컴퓨터 네트워크와 인터넷
컴퓨터 네트워크와 인터넷
중선 곽
 
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
Akhila Dakshina
 
Data models
Data modelsData models
Data models
Anuj Modi
 
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
Ji-Woong Choi
 
Different data models
Different data modelsDifferent data models
Different data models
madhusha udayangani
 
SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQL
Yoshinori Matsunobu
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Karen Lopez 10 Physical Data Modeling Blunders
Karen Lopez 10 Physical Data Modeling BlundersKaren Lopez 10 Physical Data Modeling Blunders
Karen Lopez 10 Physical Data Modeling Blunders
Karen Lopez
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basics
renuindia
 
246 deview 2013 신기빈
246 deview 2013 신기빈246 deview 2013 신기빈
246 deview 2013 신기빈
NAVER D2
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화
Henry Jeong
 
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
XML, NoSQL, 빅데이터, 클라우드로 옮겨가는 시장 상황 속, 데이터모델링 여전히 중요한가
Devgear
 
SSD 개념 및 활용_Wh oracle
SSD 개념 및 활용_Wh oracleSSD 개념 및 활용_Wh oracle
SSD 개념 및 활용_Wh oracle
엑셈
 
데이터베이스 모델링
데이터베이스 모델링데이터베이스 모델링
데이터베이스 모델링
Hoyoung Jung
 
Data Modeling Presentations I
Data Modeling Presentations IData Modeling Presentations I
Data Modeling Presentations I
cd_crisci
 
Db 진단 및 튜닝 보고 (example)
Db 진단 및 튜닝 보고 (example)Db 진단 및 튜닝 보고 (example)
Db 진단 및 튜닝 보고 (example)
중선 곽
 
Ssd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysqlSsd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysql
swkim79
 
컴퓨터 네트워크와 인터넷
컴퓨터 네트워크와 인터넷컴퓨터 네트워크와 인터넷
컴퓨터 네트워크와 인터넷
중선 곽
 
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
09. Memory, Storage (RAM, Cache, HDD, ODD, SSD, Flashdrives)
Akhila Dakshina
 
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
[오픈소스컨설팅]Day #3 MySQL Monitoring, Trouble Shooting
Ji-Woong Choi
 
SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQL
Yoshinori Matsunobu
 
Ad

Similar to BIS06 Physical Database Models (20)

Database Basics
Database BasicsDatabase Basics
Database Basics
Abdel Moneim Emad
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
Ahsan Kabir
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
TheVerse1
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
Ahmed Elbaz
 
Fg d
Fg dFg d
Fg d
Taha Khan
 
Module02
Module02Module02
Module02
Sridhar P
 
Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of data
Dimara Hakim
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
Abrar ali
 
Sqlserver interview questions
Sqlserver interview questionsSqlserver interview questions
Sqlserver interview questions
Taj Basha
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
FaisalGhffar
 
Adbms
AdbmsAdbms
Adbms
jass12345
 
Integrity and security
Integrity and securityIntegrity and security
Integrity and security
Surendra Karki Chettri
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
Abhishek590097
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
DraguClaudiu
 
Ms sql server ii
Ms sql server  iiMs sql server  ii
Ms sql server ii
Iblesoft
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
Aditya Kumar Tripathy
 
Review of SQL
Review of SQLReview of SQL
Review of SQL
Information Technology
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
Er. Nawaraj Bhandari
 
Database testing
Database testingDatabase testing
Database testing
Pesara Swamy
 
lovely
lovelylovely
lovely
love0323
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
Ahsan Kabir
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
TheVerse1
 
Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of data
Dimara Hakim
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
Abrar ali
 
Sqlserver interview questions
Sqlserver interview questionsSqlserver interview questions
Sqlserver interview questions
Taj Basha
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
FaisalGhffar
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
Abhishek590097
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
DraguClaudiu
 
Ms sql server ii
Ms sql server  iiMs sql server  ii
Ms sql server ii
Iblesoft
 
Ad

More from Prithwis Mukerjee (20)

Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Prithwis Mukerjee
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3
Prithwis Mukerjee
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
Prithwis Mukerjee
 
Thought controlled devices
Thought controlled devicesThought controlled devices
Thought controlled devices
Prithwis Mukerjee
 
Cloudcasting
CloudcastingCloudcasting
Cloudcasting
Prithwis Mukerjee
 
Currency, Commodity and Bitcoins
Currency, Commodity and BitcoinsCurrency, Commodity and Bitcoins
Currency, Commodity and Bitcoins
Prithwis Mukerjee
 
Data Science
Data ScienceData Science
Data Science
Prithwis Mukerjee
 
05 OLAP v6 weekend
05 OLAP  v6 weekend05 OLAP  v6 weekend
05 OLAP v6 weekend
Prithwis Mukerjee
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6
Prithwis Mukerjee
 
Thought control
Thought controlThought control
Thought control
Prithwis Mukerjee
 
World of data @ praxis 2013 v2
World of data   @ praxis 2013  v2World of data   @ praxis 2013  v2
World of data @ praxis 2013 v2
Prithwis Mukerjee
 
BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2
Prithwis Mukerjee
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & Analytics
Prithwis Mukerjee
 
ইন্টার্নেট কি এবং কেন ?
ইন্টার্নেট কি এবং কেন ?ইন্টার্নেট কি এবং কেন ?
ইন্টার্নেট কি এবং কেন ?
Prithwis Mukerjee
 
Data mining clustering-2009-v0
Data mining clustering-2009-v0Data mining clustering-2009-v0
Data mining clustering-2009-v0
Prithwis Mukerjee
 
Data mining classification-2009-v0
Data mining classification-2009-v0Data mining classification-2009-v0
Data mining classification-2009-v0
Prithwis Mukerjee
 
Data mining arm-2009-v0
Data mining arm-2009-v0Data mining arm-2009-v0
Data mining arm-2009-v0
Prithwis Mukerjee
 
Data mining intro-2009-v2
Data mining intro-2009-v2Data mining intro-2009-v2
Data mining intro-2009-v2
Prithwis Mukerjee
 
PPM Lite
PPM LitePPM Lite
PPM Lite
Prithwis Mukerjee
 
Business Intelligence Industry Perspective Session I
Business Intelligence   Industry Perspective Session IBusiness Intelligence   Industry Perspective Session I
Business Intelligence Industry Perspective Session I
Prithwis Mukerjee
 
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Prithwis Mukerjee
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3
Prithwis Mukerjee
 
Currency, Commodity and Bitcoins
Currency, Commodity and BitcoinsCurrency, Commodity and Bitcoins
Currency, Commodity and Bitcoins
Prithwis Mukerjee
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6
Prithwis Mukerjee
 
World of data @ praxis 2013 v2
World of data   @ praxis 2013  v2World of data   @ praxis 2013  v2
World of data @ praxis 2013 v2
Prithwis Mukerjee
 
BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2
Prithwis Mukerjee
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & Analytics
Prithwis Mukerjee
 
ইন্টার্নেট কি এবং কেন ?
ইন্টার্নেট কি এবং কেন ?ইন্টার্নেট কি এবং কেন ?
ইন্টার্নেট কি এবং কেন ?
Prithwis Mukerjee
 
Data mining clustering-2009-v0
Data mining clustering-2009-v0Data mining clustering-2009-v0
Data mining clustering-2009-v0
Prithwis Mukerjee
 
Data mining classification-2009-v0
Data mining classification-2009-v0Data mining classification-2009-v0
Data mining classification-2009-v0
Prithwis Mukerjee
 
Business Intelligence Industry Perspective Session I
Business Intelligence   Industry Perspective Session IBusiness Intelligence   Industry Perspective Session I
Business Intelligence Industry Perspective Session I
Prithwis Mukerjee
 

Recently uploaded (20)

UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 

BIS06 Physical Database Models

  • 1. Business Information Systems Physical Data Modeling
  • 2. Mapping Logical to Physical Model the entity names have been changed to table names, changed attribute names to column names, assigned nulls and not nulls, and datatype to each column. Comment Definition Foreign Key Relationship Check Rule, Default Value Rule Non Unique Index Inversion Key Unique Key or Unique Constraint Alternate Key Primary Key Constraint Primary Key Column Attribute Table Entity Represents the physical implementation of the model in a database. Represents business information and defines business rules Physical Data Model Logical Data Model
  • 3. The Physical Data Model Includes all required tables, columns, relationships, database properties for the physical implementation of databases. Database performance, indexing strategy, physical storage and denormalization are important parameters of a physical model. Logical data model is approved by functional team and there-after development of physical data model work gets started. The transformations from logical model to physical model include imposing database rules, implementation of referential integrity, super types and sub types etc.
  • 4. DBMS A database is a collection of organized and structured data, stored in the computer as files. Various data types like numeric, textual, image, multimedia etc., can be managed and maintained more efficiently in a database. Often used databases (RDBMS) in most of the practical applications are Oracle, Sql Server, Informix, Terradata, DB2 etc., Some Oracle Objects Instance Schema Table Column Datatype Primary Key Constraint Unique Constraint Check Constraint Null / Not Null Index Sequence View Materialized View Synonym Procedure Function Package Trigger
  • 5. Overview of objects A database instance can have many schemas; A schema contains multiple database objects like tables, views Tables A set of related data, arranged in the form of rows and columns. Columns Also known as Field that provides the structure for organizing the rows and contains the related information. Datatype : This is set of property associated with a column, which helps to store and identify the type of data and its length.
  • 6. Constructs for “constraints” Null / Not Null A value that indicates that the column contains should or should not have a valid data Primary Key Constraint This is a constraint imposed on the column so that all values in the column should be different from each other. This constraint can be imposed on one column or group of columns. he primary key will be always used as a parent key when adding a referential constraint by connecting it to a child table. Unique Constraint: Unique + Null Values Primary Key Constraint: Unique + Not Null Values Foreign Key Constraint This is a constraint imposed on the child table. Whatever values are present in the child table, their corresponding values should be present in the parent table. This constraint can be imposed on one column or group of columns and NULL values are allowed in the child table. Check Constraint This is a constraint that is imposed to validate the data within some value or range of values. This constraint can be imposed on one column or group of columns.
  • 7. Constructs for “better” access Index Index is a database object that enables faster retrieval of data. Unique Index, Bitmap Index etc., are the different types of Index. Views This is a PSEUDO table that is not stored in the database and it is just a query. Materialized Views are similar to a view but these are permanently stored in the database and often refreshed. This is used in optimization for the faster data retrieval and is useful in aggregation and summarization of data.
  • 8. Constructs for ‘automatic’ processing Procedure This is a program that contains set of code, which will carry out a specific action when called by other programs. Functions This is a program that contains set of code, which will do a specific action when called by other programs. It will return a single VALUE Trigger This is a program that contains set of code for doing some useful action when a record is inserted or deleted or updated in a table.
  • 9. Raw Data on Employees For the sample data provided in the table, as a Data Modeler you have to design logical data model, physical data model and generate DDL scripts. In order to do the above tasks, you need to create the following: Create 2 tables DEPARTMENT, EMPLOYEE. Assign correct datatypes to the columns. Create constraints like primary key, unique key, null, not null, check to the columns. Assign correct PHYSICAL names for tables and columns. Select DEPARTMENT as parent table and EMPLOYEE as the child table and connect them.
  • 11. DEPARTMENT Table Since ‘dept’ will be repeated for several records in EMPLOYEE table, you have to design this lookup for saving disk space. Sometimes the detail table may not show all information For example nuances of department name Department could have additional information, viz location, manager You have to create a column Dept Code, which is not present in sample data and this column should be assigned Primary Key to validate the detailed data in EMPLOYEE table.
  • 12. DDL : Creating Tables Create the Department Lookup Table CREATE TABLE DEPARTMENT ( DEPT_ID NUMBER(2) NOT NULL, DEPT_NAME VARCHAR(50) NOT NULL, LOCATION VARCHAR(10), MANAGER NUMBER(6), CONSTRAINT DEPARTMENT_PK PRIMARY KEY (DEPT_ID ), ); An Oracle database consists of DDL commands, which are useful to create, modify and drop the database objects. In this section, we will try to explain about important database CREATE commands that are used by a data modeller by relating it with our example data.
  • 13. The Main Table Create the final employee detail table CREATE TABLE EMPLOYEE ( EMP_ID NUMBER NOT NULL, FIRSTNAME VARCHAR(30) NOT NULL, LASTNAME VARCHAR(30) NOT NULL, JOBDESC VARCHAR(10), JOINDATE DATE, EMP_SAL NUMBER(7,2) NOT NULL, COMM NUMBER (3,2), DEPT_CD NUMBER(2) CONSTRAINT EMPLOYEE_PK PRIMARY KEY (EMP_ID ), CONSTRAINT EMPLOYEE_FK01 FOREIGN KEY (DEPT_CD ) REFERENCES DEPARTMENT );
  • 14. More Automation Defining a sequence CREATE SEQUENCE SEQ_EMPLOYEE_DTL INCREMENT BY 1 START WITH 1 NOMAXVALUE NOMINVALUE NOCACHE NOCYCLE NOORDER ; Defining a trigger CREATE OR REPLACE TRIGGER TRG_SEQ_EMPLOYEE_DTL BEFORE INSERT ON EMPLOYEE FOR EACH ROW BEGIN SELECT SEQ_EMPLOYEE.NEXTVAL INTO :NEW.EMP_ID FROM DUAL; END; Installing a trigger Whenever a record is inserted into "EMPLOYEE_DTL" table, this trigger selects the next unique number from the sequence "SEQ_EMPLOYEE_DTL" and inserts into the column "EMP_ID". In our INSERT STATEMENTS example, we have not provided values for the column "EMP_ID" and inserting values into "EMP_DTL_ID is taken care by sequence and trigger.
  • 15. Altering Tables Add Columns ALTER TABLE EMPLOYEE ADD PASSPORT_NUM NUMBER(6); Rename Columns ALTER TABLE EMPLOYEE RENAME column PASSPORT_NUM TO EMP_EXTID; Modify Column ALTER TABLE EMPLOYEE MODIFY EMP_EXTID VARCHAR2(10); Drop Column ALTER TABLE EMPLOYEE DROP COLUMN EMP_EXTID;
  • 16. Implementing Constraints Add Constraints ALTER TABLE EMPLOYEE ADD CONSTRAINT CH_SAL CHECK(EMP_SAL BETWEEN 4000 AND 7000); Unique Constraints ALTER TABLE EMPLOYEE ADD CONSTRAINT UN_ID UNIQUE(EMP_EXTID); ALTER TABLE EMPLOYEE DISABLE CONSTRAINT UN_ID; ALTER TABLE EMPLOYEE ENABLE CONSTRAINT UN_ID; ALTER TABLE EMPLOYEE DROP CONSTRAINT UN_ID; Additional indexes CREATE INDEX IND_UNID ON EMPLOYEE(UN_ID);
  • 17. Structured Query Language A high language to manipulate the database Data Description Language Data Manipulation Language Data Control Language SQL