Professional Documents
Culture Documents
Lecture 1,2
Lecture 1,2
• Database design:
1. Power designer, data architect, ERDplus.com, Toad data modeler, or MySQL Workbench:
Visual Database Design
2. Vertabelo: https://vertabelo.com/ Online
3. Navicat Data Modeler: https://navicat.com/en/products/navicat-data-modeler Online
4. Visual Paradigm: https://www.visual-paradigm.com/ Online
5. SQLDBM: https://sqldbm.com/Home/ Online
• Database programming:
1. Python programming language (MySQL python connector).
• Database application with GUI interface (python):
1. Desktop application using Tkinter, PyQT, Kivy, WxPython, Bottle, and PyGUI
2. Web application Flask, Django, CherryPy, Pyramid, Web2Py, Tornado, Bottle, BlueBream,
Quixote
Projects
Information Systems for different entities:
• SIS
• Pharmacy IS
• School IS
• Airport IS
• MIS
• LMS
• Inventory control management
• Electronic health record – Hospital management system
• Online retail application
• Railway management system
• Library management system
• Restaurant management system
• Hotel management system
• Salary management system
• Bank management system
• Electricity bill management system
• Telecommunication company management system
Student groups
• Groups of five students.
• Each group takes one project.
• Working on projects is from the first day.
• Project’s 25 marks are distributed while the semester.
Steps to create a database system
The database life cycle
• This is plus implementing the app
that will provide the business
logic.
Steps
Steps
Steps
https://medium.com/coderby
te/understanding-mysql-
logical-architecture-
526eaf72f66e
Database management system components
The Architecture of a Relational DBMS
Web Forms Application Front Ends SQL Interface
SQL Commands
Ted Codd
Turing Award 1981
CODD’S 12 RULES FOR RDBMS
• Rule 1 : The information rule. All information in the database should be represented in the same way, and stored in tables in the
form of rows and columns.
• Rule 2 : The guaranteed access rule. All data must be accessible logically using the table name, primary key (identifying the
row) and column (attribute value).
• Rule 3 : Systematic treatment of null values. The Null values in a database should be handled systematically and uniformly. No
math expression with Null. Null is Null.
• Rule 4 : Active online catalog. The structure of the entire database must be stored in an online catalog, as a data dictionary.
This data dictionary can be queried by users employing the same query language as used to query other tables in the database.
• Rule 5 : The comprehensive data sub language rule. The system must support at least one relational language that 1. Has a
linear syntax 2. Can be used both interactively and within application programs 3. Supports data definition operations, data
manipulation operations, security and integrity constraints, and transaction management operations. This rule necessitates a query
language like SQL.
• Rule 6 : The view updating rule. All views that can be updated theoretically, must be updated by the system.
• Rule 7 : High-level insert, update, and delete. The system must support insert, update, and delete operations on the database. It
should also support operators that manipulate a set of rows instead of just a single row.
• Rule 8 : Physical data independence. Data stored in the database should be independent of how it is being accessed by external
applications.
• Rule 9 : Logical data independence. Any changes in the logical data should not impact the applications using it.
• Rule 10 : Integrity independence. The database should be able to enforce its own integrity rather than using other programs. Key
and Check constraints, trigger etc., should be stored in Data Dictionary. This also make RDBMS independent of front-end.
• Rule 11 : Distribution independence. The distribution of data to different servers and locations should be hidden from the user.
The user should not get impacted by the distribution of data.
• Rule 12: The non-subversion rule. The database system access should never bypass a relational security or integrity constraint.
The Relational Model: An Example
▪ Let us consider the student entity in a university database
Students Schema
Students(sid: string, name: string, login: string, dob: string, gpa: real)
Columns
Rows
A Sample Relational Database
Example of a Database
(with a Conceptual Data Model)
• Mini-world for the example:
• Part of a UNIVERSITY environment.
• Some mini-world entities:
• STUDENTs
• COURSEs
• SECTIONs (of COURSEs)
• (academic) DEPARTMENTs
• INSTRUCTORs
Example of a Database
(with a Conceptual Data Model)
• Some mini-world relationships:
• SECTIONs are of specific COURSEs
• STUDENTs take SECTIONs
• COURSEs have prerequisite COURSEs
• INSTRUCTORs teach SECTIONs
• COURSEs are offered by DEPARTMENTs
• STUDENTs major in DEPARTMENTs
• Note: The above entities and relationships are typically expressed in a conceptual
data model, such as the ENTITY-RELATIONSHIP data model (see Chapters 3, 4)
Example of a simple database
Data Independence
▪ One of the most important benefits of using a DBMS is data
independence.
▪ With data independence, application programs are insulated from how
data are structured and stored.
▪ Data independence entails two properties:
▪ Logical data independence: The capacity to change the conceptual
schema without having to change the external schemas and their
associated application programs.
• Physical data independence: The capacity to change the internal
schema without having to change the conceptual schema. For example,
the internal schema may be changed when certain file structures are
reorganized, or new indexes are created to improve database
performance
Levels of Abstraction
▪ The data in a DBMS is described at three levels of abstraction, the conceptual (or
logical), physical and external schemas
▪ The conceptual schema describes data in terms of a specific data model (e.g., the relational
model of data)
▪ The physical schema specifies how data described in the conceptual schema are stored on
secondary storage devices
▪ The external schema (or views) allow data access to be customized at the level of individual
users or group of users (views can be 1 or many)
Levels of Abstraction
• Mappings among schema levels
are needed to transform requests
and data.
• Programs refer to an external
schema, and are mapped by the
DBMS to the internal schema for
execution.
• Data extracted from the internal
DBMS level is reformatted to match
the user’s external view (e.g.
formatting the results of an SQL
query for display in a Web page)
Views
▪ A view is conceptually a relation
▪ Records in a view are computed as needed and usually not stored in a DBMS
• First decade of the 21st century has seen tremendous growth in user generated data
and automatically collected data from applications and search engines.
• Social Media platforms such as Facebook and Twitter are generating millions of
transactions a day and businesses are interested to tap into this data to “understand”
the users
• Cloud storage, processing power, and backup are making unlimited amount of
storage available to users and applications with the ability to process these data,
maybe in real time.
Extending Database Capabilities (3)
• Emergence of Big Data Technologies and NOSQL databases
• New data storage, management and analysis technology was necessary to deal with
the onslaught of data in petabytes a day (10**15 bytes or 1000 terabytes) in some
applications – this started being commonly called as “Big Data”.
• Hadoop (which originated from Yahoo) and Mapreduce Programming approach to
distributed data processing (which originated from Google) as well as the Google
file system have given rise to Big Data technologies. Further enhancements are
taking place in the form of Spark based technology.
• NOSQL (Not Only SQL- where SQL is the de facto standard language for relational
DBMSs) systems have been designed for rapid search and retrieval from
documents, processing of huge graphs occurring on social networks, and other
forms of unstructured data with flexible models of transaction processing.
Thank you