SlideShare a Scribd company logo
1 of 21
Database management concepts
• Database Management Systems (DBMS)
• An example of a database (relational)
• Database schema (e.g. relational)
• Data independence
• Architecture of a DBMS
• Types of DBMS
• Basic DBMS types
• Retrieving and manipulating data: query processing
• Database views
• Data integrity
• Client-Server architectures
• Knowledge Bases and KBS (and area of AI)
• DBMS tasks:
• Managing large quantity of structured data
• Efficient retrieval and modification: query processing and optimization
• Sharing data: multiple users use and manipulate data
• Controlling the access to data: maintaining the data integrity
• An example of a database (relational):
• Relations (tables)
• Attributes (columns)
• Tuples (rows)
• Example query: Salesperson='Mary' AND Price>100.
• Database schema (e.g. relational):
• Names and types of attributes
• Addresses
• Indexing
• Statistics
• Authorization rules to access data etc.
• Data independence: separation of the physical and logical data
• Particularly important for distributed systems
• The mapping between them is provided by the schema
• Architecture of a DBMS - three levels: external, conceptual and internal schema
• Types of DBMS
• The data structures supported: tables (relational), trees, networks, objects
• Type of service provided: high level query language, programming primitives
Basic DBMS types
• Linear files
• Sequence of records with a fixed format usually stored on a single file
• Limitation: single file
• Example query: Salesperson='Mary' AND Price>100
• Hierarchical structure
• Trees of records: one-to-many relationships
• Limitations:
• Requires duplicating records (e.g. many-to-many relationship)
• Problems when updated
• Retrieval requires knowing the structure (limited data independence):
traversing the tree from top to bottom using a procedural language
• Network structure: similar to the hierarchical database with the implementation
of many-to-many relationships
• Relational structure
• Object-Oriented structure
• Objects (collection of data items and procedures) and interactions between them.
• Is this really a new paradigm, or a special case of network structure?
• Separate implementation vs. implementation on top of a RDBMS
Relational structure
• Relations, attributes, tuples
• Primary key (unique combination of attributes for each tuple)
• Foreign keys: relationships between tuples (many-to-many).
Example: SUPPLIES defines relations between ITEM and SUPPLIER tuples.
• Advantages: many-to-many relationships, high level declarative query language (e.g. SQL)
• SQL example (retrieve all items supplied by a supplier located in Troy):
SELECT ItemName
FROM ITEM, SUPPLIES, SUPPLIER
WHERE SUPPLIER.City = "Troy" AND
SUPPLIER.Supplier# = SUPPLIES.Supplier# AND
SUPPLIES.Item# = ITEM.Item#
• Programming language interfaces: including SQL queries in the code
Retrieving and manipulating data: query processing
• Parsing and validating a query: data dictionary - a relation listing all relations and
relations listing the attributes
• Plans for computing the query: list of possible way to execute the query,
estimated cost for each. Example:
SELECT ItemNames, Price
FROM ITEM, SALES
WHERE SALES.Item# = ITEM.Item# AND Salesperson="Mary"
• Index: B-tree index, drawbacks - additional space, updating;
indexing not all relations (e.g. the keys only)
• Estimating the cost for computing a query: size of the relation, existence/size of the indices.
Example: estimating Attribute=value with a given number of tuples and the size of the index.
• Query optimization: finding the best plan (minimizing the computational cost and
the size of the intermediate results), subsets of tuples, projection and join.
• Static and dynamic optimization
Database views
• Creating user defined subsets of the database
• Improving the user interface
• Example:
CREATE VIEW MarySales(ItemName,Price)
AS SELECT ItemName, Price
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary"
Then the query:
SELECT ItemName
FROM MarySales
WHERE Proce>100
translates to:
SELECT ItemName
FROM ITEM, SALES
WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary" AND Price>100
Data integrity
Integrity constraints: semantic conditions on the data
• Individual constraints on data items
• Uniqueness of the primary keys
• Dependencies between relations
Concurrency control
• Steps in executing a query
• Concurrent users of the database, interfering the execution of one query by another
• Transaction: a set of operations that takes the database from one consistent state to another
• Solving the concurrency control problem: making transactions atomic operations (one at a time)
• Concurrent transactions: serializability theory (two-phase locking), read lock (many), write lock (one).
• Serializible transactions: first phase - accumulating locks, second phase - releasing locks.
• Deadlocks: deadlock detection algorithms.
• Distributed execution problems:
• release a lock at one node (all locks accumulated at the other node?)
• strict two-phase locking
The Transaction Model
• Examples of primitives for transactions.
Primitive Description
BEGIN_TRANSACTION Make the start of a transaction
END_TRANSACTION Terminate the transaction and try to commit
ABORT_TRANSACTION Kill the transaction and restore the old values
READ Read data from a file, a table, or otherwise
WRITE Write data to a file, a table, or otherwise
The Transaction Model
a) Transaction to reserve three flights commits
b) Transaction aborts when third flight is unavailable
BEGIN_TRANSACTION
reserve WP -> JFK;
reserve JFK -> Nairobi;
reserve Nairobi -> Malindi;
END_TRANSACTION
(a)
BEGIN_TRANSACTION
reserve WP -> JFK;
reserve JFK -> Nairobi;
reserve Nairobi -> Malindi full =>
ABORT_TRANSACTION
(b)
Distributed Transactions
a) A nested transaction
b) A distributed transaction
Writeahead Log
• a) A transaction
• b) – d) The log before each statement is executed
x = 0;
y = 0;
BEGIN_TRANSACTION;
x = x + 1;
y = y + 2
x = y * y;
END_TRANSACTION;
(a)
Log
[x = 0 / 1]
(b)
Log
[x = 0 / 1]
[y = 0/2]
(c)
Log
[x = 0 / 1]
[y = 0/2]
[x = 1/4]
(d)
Concurrency Control (1)
• General organization of managers for handling transactions.
Serializability
• a) – c) Three transactions T1, T2, and T3
• d) Possible schedules
BEGIN_TRANSACTION
x = 0;
x = x + 1;
END_TRANSACTION
(a)
BEGIN_TRANSACTION
x = 0;
x = x + 2;
END_TRANSACTION
(b)
BEGIN_TRANSACTION
x = 0;
x = x + 3;
END_TRANSACTION
(c)
Schedule 1 x = 0; x = x + 1; x = 0; x = x + 2; x = 0; x = x + 3 Legal
Schedule 2 x = 0; x = 0; x = x + 1; x = x + 2; x = 0; x = x + 3; Legal
Schedule 3 x = 0; x = 0; x = x + 1; x = 0; x = x + 2; x = x + 3; Illegal
(d)
Two-Phase Locking (1)
• Two-phase locking.
Two-Phase Locking (2)
• Strict two-phase locking.
Data integrity
Backup and recovery
• The problem of keeping a transaction atomic: successful or failed
What if some of the intermediate steps failed?
• Log of database activity: use the log to undo a failed transaction.
• More problems: when to write the log, failure of the recovery system executing the log.
Security and access control
• Access rules for relations or attributes. Stored in a special relation (part of the data dictionary).
• Content-independent and content-dependent access control
• Content-dependent control: access to a view only or query modification
(e.g. and-ing a predicate to the WHERE clause)
• Discretionary and mandatory access control
Knowledge Bases and KBS (and area of AI)
• Information, Data, Knowledge (data in a form that allows reasoning)
• Basic components of a KBS
• Knowledge base
• Inference (reasoning) mechanism (e.g. forward/backward chaining)
• Explanation mechanism/Interface
• Rule-based systems (medical diagnostics, credit evaluation etc.)
dbms.ppt

More Related Content

Similar to dbms.ppt

Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Tushar Wagh
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-introEhtisham Ali
 
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...NETWAYS
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbmsRupali Rana
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In DepthFabio Fumarola
 
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreOracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreDataWorks Summit
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Dios Kurniawan
 
Data Stream Management
Data Stream ManagementData Stream Management
Data Stream Managementk_tauhid
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database FundamentalGong Haibing
 
2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_uploadProf. Wim Van Criekinge
 
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...Thibaud Desodt
 

Similar to dbms.ppt (20)

Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-intro
 
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth
 
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreOracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
 
Data Stream Management
Data Stream ManagementData Stream Management
Data Stream Management
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
 
Database part2-
Database part2-Database part2-
Database part2-
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload2019 03 05_biological_databases_part3_v_upload
2019 03 05_biological_databases_part3_v_upload
 
Hbase hivepig
Hbase hivepigHbase hivepig
Hbase hivepig
 
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
 
Dbms
DbmsDbms
Dbms
 
Sql server
Sql serverSql server
Sql server
 

More from KRISHNARAJ207

INTERNSHIP PRESENTATION.pptx
INTERNSHIP PRESENTATION.pptxINTERNSHIP PRESENTATION.pptx
INTERNSHIP PRESENTATION.pptxKRISHNARAJ207
 
22BAB09-OPERATION MANAGEMENT.pptx
22BAB09-OPERATION MANAGEMENT.pptx22BAB09-OPERATION MANAGEMENT.pptx
22BAB09-OPERATION MANAGEMENT.pptxKRISHNARAJ207
 
BATCH-4 PROJECT PPT.pdf
BATCH-4 PROJECT PPT.pdfBATCH-4 PROJECT PPT.pdf
BATCH-4 PROJECT PPT.pdfKRISHNARAJ207
 
BATCH-4 PROJECT .pdf
BATCH-4 PROJECT .pdfBATCH-4 PROJECT .pdf
BATCH-4 PROJECT .pdfKRISHNARAJ207
 
ankurjobrotation-140217103220-phpapp02.pptx
ankurjobrotation-140217103220-phpapp02.pptxankurjobrotation-140217103220-phpapp02.pptx
ankurjobrotation-140217103220-phpapp02.pptxKRISHNARAJ207
 
methodsofperformanceappraisal-170222015553.pptx
methodsofperformanceappraisal-170222015553.pptxmethodsofperformanceappraisal-170222015553.pptx
methodsofperformanceappraisal-170222015553.pptxKRISHNARAJ207
 
work culture ppt.pptx
work culture ppt.pptxwork culture ppt.pptx
work culture ppt.pptxKRISHNARAJ207
 
Elements of Systems Design.ppt
Elements of Systems Design.pptElements of Systems Design.ppt
Elements of Systems Design.pptKRISHNARAJ207
 
ultrasonic-welding-828-SNggldd.pptx
ultrasonic-welding-828-SNggldd.pptxultrasonic-welding-828-SNggldd.pptx
ultrasonic-welding-828-SNggldd.pptxKRISHNARAJ207
 
budgets-1222199522318591-8.pptx
budgets-1222199522318591-8.pptxbudgets-1222199522318591-8.pptx
budgets-1222199522318591-8.pptxKRISHNARAJ207
 

More from KRISHNARAJ207 (20)

INTERNSHIP PRESENTATION.pptx
INTERNSHIP PRESENTATION.pptxINTERNSHIP PRESENTATION.pptx
INTERNSHIP PRESENTATION.pptx
 
22BAB09-OPERATION MANAGEMENT.pptx
22BAB09-OPERATION MANAGEMENT.pptx22BAB09-OPERATION MANAGEMENT.pptx
22BAB09-OPERATION MANAGEMENT.pptx
 
22BA005.pptx
22BA005.pptx22BA005.pptx
22BA005.pptx
 
BATCH-4 PROJECT PPT.pdf
BATCH-4 PROJECT PPT.pdfBATCH-4 PROJECT PPT.pdf
BATCH-4 PROJECT PPT.pdf
 
BATCH-4 PROJECT .pdf
BATCH-4 PROJECT .pdfBATCH-4 PROJECT .pdf
BATCH-4 PROJECT .pdf
 
ankurjobrotation-140217103220-phpapp02.pptx
ankurjobrotation-140217103220-phpapp02.pptxankurjobrotation-140217103220-phpapp02.pptx
ankurjobrotation-140217103220-phpapp02.pptx
 
UNIT-1.ppt
UNIT-1.pptUNIT-1.ppt
UNIT-1.ppt
 
methodsofperformanceappraisal-170222015553.pptx
methodsofperformanceappraisal-170222015553.pptxmethodsofperformanceappraisal-170222015553.pptx
methodsofperformanceappraisal-170222015553.pptx
 
Unit 5 ED.pptx
Unit 5 ED.pptxUnit 5 ED.pptx
Unit 5 ED.pptx
 
work culture ppt.pptx
work culture ppt.pptxwork culture ppt.pptx
work culture ppt.pptx
 
Control.ppt
Control.pptControl.ppt
Control.ppt
 
22BA001 IE S 2.pptx
22BA001 IE S 2.pptx22BA001 IE S 2.pptx
22BA001 IE S 2.pptx
 
22BA001 IE 1.pptx
22BA001 IE 1.pptx22BA001 IE 1.pptx
22BA001 IE 1.pptx
 
22BA003 IE 1.pptx
22BA003 IE 1.pptx22BA003 IE 1.pptx
22BA003 IE 1.pptx
 
Elements of Systems Design.ppt
Elements of Systems Design.pptElements of Systems Design.ppt
Elements of Systems Design.ppt
 
Financial IS.pptx
Financial IS.pptxFinancial IS.pptx
Financial IS.pptx
 
DFD1.ppt
DFD1.pptDFD1.ppt
DFD1.ppt
 
group behaviour.ppt
group behaviour.pptgroup behaviour.ppt
group behaviour.ppt
 
ultrasonic-welding-828-SNggldd.pptx
ultrasonic-welding-828-SNggldd.pptxultrasonic-welding-828-SNggldd.pptx
ultrasonic-welding-828-SNggldd.pptx
 
budgets-1222199522318591-8.pptx
budgets-1222199522318591-8.pptxbudgets-1222199522318591-8.pptx
budgets-1222199522318591-8.pptx
 

Recently uploaded

Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756dollysharma2066
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailAriel592675
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCRsoniya singh
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCRsoniya singh
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...lizamodels9
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...Khaled Al Awadi
 

Recently uploaded (20)

KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)
 
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detail
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Keshav Puram 🔝 Delhi NCR
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
 

dbms.ppt

  • 1. Database management concepts • Database Management Systems (DBMS) • An example of a database (relational) • Database schema (e.g. relational) • Data independence • Architecture of a DBMS • Types of DBMS • Basic DBMS types • Retrieving and manipulating data: query processing • Database views • Data integrity • Client-Server architectures • Knowledge Bases and KBS (and area of AI)
  • 2. • DBMS tasks: • Managing large quantity of structured data • Efficient retrieval and modification: query processing and optimization • Sharing data: multiple users use and manipulate data • Controlling the access to data: maintaining the data integrity • An example of a database (relational): • Relations (tables) • Attributes (columns) • Tuples (rows) • Example query: Salesperson='Mary' AND Price>100.
  • 3.
  • 4. • Database schema (e.g. relational): • Names and types of attributes • Addresses • Indexing • Statistics • Authorization rules to access data etc. • Data independence: separation of the physical and logical data • Particularly important for distributed systems • The mapping between them is provided by the schema • Architecture of a DBMS - three levels: external, conceptual and internal schema • Types of DBMS • The data structures supported: tables (relational), trees, networks, objects • Type of service provided: high level query language, programming primitives
  • 5.
  • 6. Basic DBMS types • Linear files • Sequence of records with a fixed format usually stored on a single file • Limitation: single file • Example query: Salesperson='Mary' AND Price>100 • Hierarchical structure • Trees of records: one-to-many relationships • Limitations: • Requires duplicating records (e.g. many-to-many relationship) • Problems when updated • Retrieval requires knowing the structure (limited data independence): traversing the tree from top to bottom using a procedural language • Network structure: similar to the hierarchical database with the implementation of many-to-many relationships • Relational structure • Object-Oriented structure • Objects (collection of data items and procedures) and interactions between them. • Is this really a new paradigm, or a special case of network structure? • Separate implementation vs. implementation on top of a RDBMS
  • 7. Relational structure • Relations, attributes, tuples • Primary key (unique combination of attributes for each tuple) • Foreign keys: relationships between tuples (many-to-many). Example: SUPPLIES defines relations between ITEM and SUPPLIER tuples. • Advantages: many-to-many relationships, high level declarative query language (e.g. SQL) • SQL example (retrieve all items supplied by a supplier located in Troy): SELECT ItemName FROM ITEM, SUPPLIES, SUPPLIER WHERE SUPPLIER.City = "Troy" AND SUPPLIER.Supplier# = SUPPLIES.Supplier# AND SUPPLIES.Item# = ITEM.Item# • Programming language interfaces: including SQL queries in the code
  • 8. Retrieving and manipulating data: query processing • Parsing and validating a query: data dictionary - a relation listing all relations and relations listing the attributes • Plans for computing the query: list of possible way to execute the query, estimated cost for each. Example: SELECT ItemNames, Price FROM ITEM, SALES WHERE SALES.Item# = ITEM.Item# AND Salesperson="Mary" • Index: B-tree index, drawbacks - additional space, updating; indexing not all relations (e.g. the keys only) • Estimating the cost for computing a query: size of the relation, existence/size of the indices. Example: estimating Attribute=value with a given number of tuples and the size of the index. • Query optimization: finding the best plan (minimizing the computational cost and the size of the intermediate results), subsets of tuples, projection and join. • Static and dynamic optimization
  • 9. Database views • Creating user defined subsets of the database • Improving the user interface • Example: CREATE VIEW MarySales(ItemName,Price) AS SELECT ItemName, Price FROM ITEM, SALES WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary" Then the query: SELECT ItemName FROM MarySales WHERE Proce>100 translates to: SELECT ItemName FROM ITEM, SALES WHERE ITEM.Item#=SALES.Item# AND Salesperson="Mary" AND Price>100
  • 10. Data integrity Integrity constraints: semantic conditions on the data • Individual constraints on data items • Uniqueness of the primary keys • Dependencies between relations Concurrency control • Steps in executing a query • Concurrent users of the database, interfering the execution of one query by another • Transaction: a set of operations that takes the database from one consistent state to another • Solving the concurrency control problem: making transactions atomic operations (one at a time) • Concurrent transactions: serializability theory (two-phase locking), read lock (many), write lock (one). • Serializible transactions: first phase - accumulating locks, second phase - releasing locks. • Deadlocks: deadlock detection algorithms. • Distributed execution problems: • release a lock at one node (all locks accumulated at the other node?) • strict two-phase locking
  • 11. The Transaction Model • Examples of primitives for transactions. Primitive Description BEGIN_TRANSACTION Make the start of a transaction END_TRANSACTION Terminate the transaction and try to commit ABORT_TRANSACTION Kill the transaction and restore the old values READ Read data from a file, a table, or otherwise WRITE Write data to a file, a table, or otherwise
  • 12. The Transaction Model a) Transaction to reserve three flights commits b) Transaction aborts when third flight is unavailable BEGIN_TRANSACTION reserve WP -> JFK; reserve JFK -> Nairobi; reserve Nairobi -> Malindi; END_TRANSACTION (a) BEGIN_TRANSACTION reserve WP -> JFK; reserve JFK -> Nairobi; reserve Nairobi -> Malindi full => ABORT_TRANSACTION (b)
  • 13. Distributed Transactions a) A nested transaction b) A distributed transaction
  • 14. Writeahead Log • a) A transaction • b) – d) The log before each statement is executed x = 0; y = 0; BEGIN_TRANSACTION; x = x + 1; y = y + 2 x = y * y; END_TRANSACTION; (a) Log [x = 0 / 1] (b) Log [x = 0 / 1] [y = 0/2] (c) Log [x = 0 / 1] [y = 0/2] [x = 1/4] (d)
  • 15. Concurrency Control (1) • General organization of managers for handling transactions.
  • 16. Serializability • a) – c) Three transactions T1, T2, and T3 • d) Possible schedules BEGIN_TRANSACTION x = 0; x = x + 1; END_TRANSACTION (a) BEGIN_TRANSACTION x = 0; x = x + 2; END_TRANSACTION (b) BEGIN_TRANSACTION x = 0; x = x + 3; END_TRANSACTION (c) Schedule 1 x = 0; x = x + 1; x = 0; x = x + 2; x = 0; x = x + 3 Legal Schedule 2 x = 0; x = 0; x = x + 1; x = x + 2; x = 0; x = x + 3; Legal Schedule 3 x = 0; x = 0; x = x + 1; x = 0; x = x + 2; x = x + 3; Illegal (d)
  • 17. Two-Phase Locking (1) • Two-phase locking.
  • 18. Two-Phase Locking (2) • Strict two-phase locking.
  • 19. Data integrity Backup and recovery • The problem of keeping a transaction atomic: successful or failed What if some of the intermediate steps failed? • Log of database activity: use the log to undo a failed transaction. • More problems: when to write the log, failure of the recovery system executing the log. Security and access control • Access rules for relations or attributes. Stored in a special relation (part of the data dictionary). • Content-independent and content-dependent access control • Content-dependent control: access to a view only or query modification (e.g. and-ing a predicate to the WHERE clause) • Discretionary and mandatory access control
  • 20. Knowledge Bases and KBS (and area of AI) • Information, Data, Knowledge (data in a form that allows reasoning) • Basic components of a KBS • Knowledge base • Inference (reasoning) mechanism (e.g. forward/backward chaining) • Explanation mechanism/Interface • Rule-based systems (medical diagnostics, credit evaluation etc.)