Chapter one Mysql Flashcards
What is a database?
A very large collection of related data
Database Management System (DBMS):
A Software package/system designed to define, manipulate, Retrieve , and manage data in a database
Why Study Database?
Shift from computation to data (information)
- Always true for corporate computing
- More and more true in the scientific world
- Web
- social media generate ever increasing amount of data,
sensor devices generate also huge datasets
Including DBMS encompasses much of CS in a practical discipline
l OS, languages, theory, logic
Data Models
Data modelling is a way for describing data, data relationships, data semantics, data constraints there is four different categories
Starting off with number one Relational model?
In a relational model a table is known as a relation
- All the data is stored in various tables the columns and attributes are commonly the top names such as dept_name and salary
What is a database schema
It is a description of a database, which is specified during database design and is not expected to change to frequently
= The information stored in the catalog
Database State
The data in the database at a particular moment, also called the current set of instances.
= The data currently in the database
Three schemas Physical level
describes how a record (e.g., instructor) is stored in a
storage media
Three schemas Logical level
describes data stored in database, and the relationships
among the data
Three schemas View level
application programs hide details of data types. Views can
also hide information (such as an employee’s salary) for security
purposes.
Data Definition Language (DDL)
Data Definition Language (DDL)
- Specification notation for defining the database schema
Data Manipulation Language (DML)
Language for accessing and manipulating the data as organized by the appropriate data model.
Example From the textbook
- Retrieval of information stored in the database
- Insertion of new information into the database
- Deletion of information stored in the database
- Modification of information stored in the database
Two Types of data-manipulation languages Procedural
It requires a user to specify what data are
needed and how to get those data (steps such as 1. go to kitchen 2, get the sugar and milk, 3 mix and cook over fire, 4 put it in the cup and bring it)
Two Types of data-manipulation languages Nonprocedural / Declarative
It requires a user to specify what data are needed without specifying how to get those data. (1. Get me a cup of Tea)
Data Dictionary
Data dictionary contains metadata
From text book it Stores metadata about the structures of the database, in particular the schema of the database
Database Design
The process of designing the general structure of the database
such as
- Conceptual Design
- Logical Design
- Physical Design
Conceptual Database Design
- Identifies important entities and the high-level relationships among them.
- No attribute/column is specified.
- No primary key is specified
Logical Database Design
Performed using E-R diagram & relational model.
Attributes are specified.
Primary keys are identified.
Constraints are mentioned