Slide 1 Database Design
Slide 1 Database Design
• Objectives
• Course Logistics
• Course outline
Office: 6120-J
Email: lavika.goel@pilani.bits-pilani.ac.in
15%
Quizzes
10%
45% Assignment
Midsem Examination
Comprehensive Examination
30%
IP Network Traffic: up to 1 Billion packets per hour per router. Each ISP has many
(hundreds) routers!
WWW
Weblog data (160 mn websites)
Email data
Satellite imaging data
Social networking sites data
• No. of pics on Facebook
– 15 bn unique photos
– 60 bn photos stored (4 sizes)
Company Product
Oracle Oracle 8i, 9i, 10g,11g, 12c, 18c
IBM DB2, Universal Server
Microsoft Access, SQL Server-2008
Sybase Adaptive Server
Informix Dynamic Server
Typical Applications:
Corporate databases Personnel management
Inventory and purchase order
Insurance policies and customer data
……
Main
function function data
Program
Physical Level:
– Relations stored as unordered files.
– Index on first column of Students.
View Level:
– Course_info(cid:string,enrollment:integer)
schema construct
Transaction 1
Transaction 2
Conflicting read/write
Coordinates all the activities of the database system; the database administrator has good
understanding of the enterprise’s information resources and needs.
Database administrator’s duties include:
– Schema definition Primary job of a database
– Specifying integrity constraints designer
Users are differentiated by the way they expected to interact with the system
Application programmers
– Develop applications that interact with DBMS through DML calls
Sophisticated users
– form requests in a database query language
– mostly one-time ad hoc queries
End users
– invoke one of the existing application programs (e.g., print monthly sales report)
– Interact with applications through GUI
Data independence.
– Abstraction - hiding lower level details
• Relational Model: models data and relationships in the form of tables with
fixed attributes.
• Entity-Relationship Model: models real world objects as entities and
relationships between these objects.
• Object-based Data Model: includes concepts like encapsulation,
inheritance etc. (Object relational data model)
• Semi-structured data model: allows more flexibility by permitting individual
data items of the same type to have different sets of attributes, ex. XML
• Network and Hierarchical data models.
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Relation
Source: Wikipedia
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Relational Database
Instructor relation
Course relation
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Terminology
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Relation
• A domain is atomic, if elements of domain are considered to
be indivisible units.
• Null value: signifies that value is unknown or does not
exist.
• Relational schema: list of attributes and their corresponding
domains (optional)
• Students(sid: string, name: string, age: integer, cgpa: real).
• Relational instance refers to specific instance of a relation,
containing specific set of rows.
• #Rows cardinality, #fields degree / arity
• Relation == variable
• Relational schema== type definition
• Relational instance == value of the variable
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Student relation
STUDENT
Name Student-id Age CGPA
Chan Kin Ho 99223367 23 8.19
Lam Wai Kin 96882145 17 10.00
Man Ko Yee 96452165 22 8.75
Lee Chin Cheung 96154292 16 10.00
Alvin Lam 96520934 15 9.65
Instructor relation
Department relation
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Ques
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus
Relation name, attributes, tuples,
cardinality , degree, relation schema ??
section
Database Design and Applications (CSI ZG518/ SSZG518) BITS Pilani, Pilani Campus