Podcast
Questions and Answers
The data in a database at a specific moment is known as a database ______ or snapshot.
The data in a database at a specific moment is known as a database ______ or snapshot.
state
The descriptions of schema constructs and constraints, stored in the DBMS catalog, are also known as ______.
The descriptions of schema constructs and constraints, stored in the DBMS catalog, are also known as ______.
meta-data
Each ______ schema describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group.
Each ______ schema describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group.
external
The ______ is sometimes called the intension, while a database state is called an extension of the schema.
The ______ is sometimes called the intension, while a database state is called an extension of the schema.
The three-schema architecture aims to separate user applications from the ______ database.
The three-schema architecture aims to separate user applications from the ______ database.
In a DBMS based on the three-schema architecture, each use group refers only to its own ______ schema.
In a DBMS based on the three-schema architecture, each use group refers only to its own ______ schema.
The ______ level in the three-schema architecture describes the physical storage structure of the database.
The ______ level in the three-schema architecture describes the physical storage structure of the database.
The process of transforming requests and results between levels in a DBMS is called ______.
The process of transforming requests and results between levels in a DBMS is called ______.
Earlier architectures used ______ computers to provide the main processing for all system functions, including user application programs and DBMS functionality.
Earlier architectures used ______ computers to provide the main processing for all system functions, including user application programs and DBMS functionality.
A ______ data model is used by the internal schema to describe the complete details of data storage and access paths for the database.
A ______ data model is used by the internal schema to describe the complete details of data storage and access paths for the database.
In a centralised DBMS, all the DBMS functionality, application program execution, and user interface processing were carried out on ______ machine.
In a centralised DBMS, all the DBMS functionality, application program execution, and user interface processing were carried out on ______ machine.
The ______ schema hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations, and constraints.
The ______ schema hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations, and constraints.
The shift towards utilizing processing power at the user side led to the development of / DBMS architectures.
The shift towards utilizing processing power at the user side led to the development of / DBMS architectures.
The external or ______ level includes a number of external schemas or user views tailored to specific user needs.
The external or ______ level includes a number of external schemas or user views tailored to specific user needs.
In client/server architecture, the ______ is responsible for managing the database and processing queries.
In client/server architecture, the ______ is responsible for managing the database and processing queries.
The stored data that actually exists is at the ______ level.
The stored data that actually exists is at the ______ level.
In a UNIVERSITY
database, information representing students, courses, grade reports, and prerequisites are stored as a ______ in a file.
In a UNIVERSITY
database, information representing students, courses, grade reports, and prerequisites are stored as a ______ in a file.
A student's record in a STUDENT
is related to their grades through records stored in the ______
file.
A student's record in a STUDENT
is related to their grades through records stored in the ______
file.
The ______
file relates two course records, one representing the course and the other representing its prerequisite.
The ______
file relates two course records, one representing the course and the other representing its prerequisite.
Medium and Large databases often contain many types of ______ and relationships.
Medium and Large databases often contain many types of ______ and relationships.
A key difference between the database approach and traditional file processing is that file processing involves each user defining and implementing files for a specific software ______.
A key difference between the database approach and traditional file processing is that file processing involves each user defining and implementing files for a specific software ______.
In traditional file processing, the redundancy in defining and storing data results in wasted ______ space.
In traditional file processing, the redundancy in defining and storing data results in wasted ______ space.
In contrast to file systems, in a database, the names or labels of data are defined ______, and used repeatedly by queries, transactions, and applications.
In contrast to file systems, in a database, the names or labels of data are defined ______, and used repeatedly by queries, transactions, and applications.
In the database approach, a single ______ of data that is defined once and then accessed by various users.
In the database approach, a single ______ of data that is defined once and then accessed by various users.
Each department has a unique name, a unique ______, and a particular employee who manages the department.
Each department has a unique name, a unique ______, and a particular employee who manages the department.
A department ______ a number of projects, each of which has a unique name, a unique number, and a single location.
A department ______ a number of projects, each of which has a unique name, a unique number, and a single location.
An employee is assigned to one department but may work on several ______, which are not necessarily controlled by the same department.
An employee is assigned to one department but may work on several ______, which are not necessarily controlled by the same department.
We want to keep track of the ______ of each employee for insurance purposes, including their first name, sex, birth date, and relationship to the employee.
We want to keep track of the ______ of each employee for insurance purposes, including their first name, sex, birth date, and relationship to the employee.
The ER model describes data as entities, relationships, and ______.
The ER model describes data as entities, relationships, and ______.
An entity may be an object with a physical existence (for example, a particular person, car, house, or employee) or it may be an object with a ______ existence (for example, a company, a job, or a university course).
An entity may be an object with a physical existence (for example, a particular person, car, house, or employee) or it may be an object with a ______ existence (for example, a company, a job, or a university course).
Each entity has ______ – the particular properties that describe it.
Each entity has ______ – the particular properties that describe it.
For example, an EMPLOYEE entity may be described by the employee’s name, age, address, ______, and job.
For example, an EMPLOYEE entity may be described by the employee’s name, age, address, ______, and job.
The ______
statement removes a table definition along with its data, indexes, triggers, constraints, and permission specifications.
The ______
statement removes a table definition along with its data, indexes, triggers, constraints, and permission specifications.
Views or stored procedures that reference a dropped table must be explicitly dropped using the DROP VIEW
or ______
statement respectively.
Views or stored procedures that reference a dropped table must be explicitly dropped using the DROP VIEW
or ______
statement respectively.
Data Control Language (DCL) is used to control ______
on database objects via statements like GRANT
, REVOKE
, and DENY
.
Data Control Language (DCL) is used to control ______
on database objects via statements like GRANT
, REVOKE
, and DENY
.
The ______
statement allows granting specific permissions to users or roles to execute Transact-SQL statements or work with data in the database.
The ______
statement allows granting specific permissions to users or roles to execute Transact-SQL statements or work with data in the database.
To remove a previously granted or denied permission from a user in the current database, the ______
statement is used.
To remove a previously granted or denied permission from a user in the current database, the ______
statement is used.
Unlike REVOKE
, the ______
statement prevents a user from inheriting permissions through their group or role memberships.
Unlike REVOKE
, the ______
statement prevents a user from inheriting permissions through their group or role memberships.
Data Manipulation Language (DML) is used for operations such as select, ______
, update, and delete on database objects.
Data Manipulation Language (DML) is used for operations such as select, ______
, update, and delete on database objects.
The ______
statement is used to retrieve rows from the database and can select rows or columns from one or many tables.
The ______
statement is used to retrieve rows from the database and can select rows or columns from one or many tables.
In SQL, a ______
is a conditional (Boolean) expression that identifies the tuples to be retrieved by the query.
In SQL, a ______
is a conditional (Boolean) expression that identifies the tuples to be retrieved by the query.
To retrieve data from multiple related tables, a ______
clause is commonly used to specify the joining conditions between the tables.
To retrieve data from multiple related tables, a ______
clause is commonly used to specify the joining conditions between the tables.
The ______
clause is used to sort the result-set of a query in ascending or descending order.
The ______
clause is used to sort the result-set of a query in ascending or descending order.
When an attribute name is used in multiple relations within a query, it is necessary to ______
the attribute name with the relation name to avoid ambiguity.
When an attribute name is used in multiple relations within a query, it is necessary to ______
the attribute name with the relation name to avoid ambiguity.
In SQL, the ______
keyword is used to specify the table(s) from which to retrieve data.
In SQL, the ______
keyword is used to specify the table(s) from which to retrieve data.
The ______
statement retrieves specific columns from a table in a database.
The ______
statement retrieves specific columns from a table in a database.
In SQL, ______
are used to assign temporary names to tables or columns, which can simplify queries and improve readability.
In SQL, ______
are used to assign temporary names to tables or columns, which can simplify queries and improve readability.
To filter employees who work for the Research department, the query must use the ______
clause to specify the condition DNAME='Research'
.
To filter employees who work for the Research department, the query must use the ______
clause to specify the condition DNAME='Research'
.
Flashcards
Class Representation
Class Representation
Representation of student class (e.g., 1 for First Year, 2 for Second Year).
Database File
Database File
A collection of records representing entities like students, courses, etc.
Record Relationships
Record Relationships
Links between records showing relationships (e.g., Smith's grades).
File Processing
File Processing
Signup and view all the flashcards
Data Redundancy
Data Redundancy
Signup and view all the flashcards
Data Repository
Data Repository
Signup and view all the flashcards
Consistent Data Naming
Consistent Data Naming
Signup and view all the flashcards
Database Interactions
Database Interactions
Signup and view all the flashcards
Database State (Snapshot)
Database State (Snapshot)
Signup and view all the flashcards
Current Instances
Current Instances
Signup and view all the flashcards
Meta-Data
Meta-Data
Signup and view all the flashcards
Intension
Intension
Signup and view all the flashcards
Extension
Extension
Signup and view all the flashcards
Three-Schema Architecture
Three-Schema Architecture
Signup and view all the flashcards
Internal Schema
Internal Schema
Signup and view all the flashcards
Conceptual Schema
Conceptual Schema
Signup and view all the flashcards
Mappings (in DBMS)
Mappings (in DBMS)
Signup and view all the flashcards
Centralized DBMS
Centralized DBMS
Signup and view all the flashcards
Schema Transformation
Schema Transformation
Signup and view all the flashcards
Schemas
Schemas
Signup and view all the flashcards
Mainframe Architecture
Mainframe Architecture
Signup and view all the flashcards
Client/Server Architecture
Client/Server Architecture
Signup and view all the flashcards
Physical Level
Physical Level
Signup and view all the flashcards
Entity
Entity
Signup and view all the flashcards
Attribute
Attribute
Signup and view all the flashcards
Department
Department
Signup and view all the flashcards
Project
Project
Signup and view all the flashcards
Employee
Employee
Signup and view all the flashcards
Dependent
Dependent
Signup and view all the flashcards
ER Diagrams
ER Diagrams
Signup and view all the flashcards
ER Model
ER Model
Signup and view all the flashcards
ALTER TABLE (ADD COLUMN)
ALTER TABLE (ADD COLUMN)
Signup and view all the flashcards
DROP TABLE
DROP TABLE
Signup and view all the flashcards
Data Control Language (DCL)
Data Control Language (DCL)
Signup and view all the flashcards
GRANT (SQL)
GRANT (SQL)
Signup and view all the flashcards
REVOKE (SQL)
REVOKE (SQL)
Signup and view all the flashcards
DENY (SQL)
DENY (SQL)
Signup and view all the flashcards
Data Manipulation Language (DML)
Data Manipulation Language (DML)
Signup and view all the flashcards
SELECT (SQL)
SELECT (SQL)
Signup and view all the flashcards
WHERE clause
WHERE clause
Signup and view all the flashcards
SELECT statement
SELECT statement
Signup and view all the flashcards
FROM clause
FROM clause
Signup and view all the flashcards
ORDER BY clause
ORDER BY clause
Signup and view all the flashcards
Qualifying attribute names
Qualifying attribute names
Signup and view all the flashcards
Aliasing
Aliasing
Signup and view all the flashcards
Ambiguous Attribute Names
Ambiguous Attribute Names
Signup and view all the flashcards
Tuple Variables
Tuple Variables
Signup and view all the flashcards
Study Notes
Introduction
- Databases and associated technology have significantly impacted computer usage across various sectors like business, e-commerce, engineering, medicine, law, education, and library science
- Relational databases are a collection of related data, representing facts with implicit meaning
- Databases represent a real-world aspect, or miniworld, with changes reflected in the data
- They are logically coherent, designed for a specific purpose, and have an intended user group
- A database management system (DBMS) allows users to create and maintain databases by defining data types, structures, and constraints, with definitions stored as meta-data
Database Management System Functions
- A DBMS manages data storage, provides querying capabilities, updates the database to match real-world changes, and generates reports
- It ensures data sharing among multiple users and programs
- Protection measures provided by DBMS involves protection against malfunctions and unauthorized access
- DBMS must evolve with changing requirements over time, by adapting to the data
- Database system = database + DBMS software
University Database Example
- A university database maintains data about students, courses, and grades, and is organized into five files: STUDENT, COURSE, SECTION, GRADE_REPORT, and PREREQUISITE
- Each file stores records of the same type
- STUDENT records include Name, Student_number, Class, and Major
- COURSE records include Course_name, Course_number, Credit_hours, and Department
- Types assigned to each data element within a record, such as Name of STUDENT being a string
- Coding schemes are used to represent data item values, like Class of a STUDENT: 1 for First Year, 2 for Second Year, etc.
Database Approach vs File Processing
- Traditional file processing involves each user defining and implementing files for specific software applications, leading to data redundancy and wasted storage
- The database approach maintains a single data repository, avoiding redundancy and ensuring data is up-to-date
- In databases, data element names are defined once and reused across queries, transactions, and applications
- Key characteristics of the database approach: self-describing nature, insulation between programs and data, support for multiple data views, and sharing with multiuser transaction processing
Self-Describing Database Systems
- Database systems contain a complete database structure with constraints
- Descriptions stored in the DBMS catalog include file structure, data item types, storage formats, and constraints
- Catalog information is named meta-data, describing the primary database structure
Insulation, Data Abstraction, and Multiple Data Views
- Traditional file processing embeds data file structure within application programs, requiring program changes with file structure changes
- DBMS access programs are not changed in most cases, giving program-data independence
- A database can have multiple users, each needing a different data perspective which creates a virtual data view
Sharing, Multiuser Transaction Processing, and History
- Multiuser DBMS allows concurrent database access
- DBMS includes concurrency control software to manage simultaneous updates, ensuring correct results
- Database origins began with libraries and governmental/medical records, with design principles evolving over time to enhance reliability
- In the 1960s, cost-effective computers and storage led to network (CODASYL) and hierarchical (IMS) models with low-level pointer operations that depended on storage details
- Adding a database field required rewriting the access/modification scheme, due to physical structure knowledge
Relational Model and Subsequent Developments
- E.F. Codd's relational model, proposed in 1970-72, separated the logical organization (schema) from physical storage, becoming a standard
- The 1970s saw debates over competing systems and database theory advancements, leading to relational system prototypes such as Ingres (UCB) using QUEL. & System R (IBM) using SEQUEL
- The term RDBMS (Relational Database Management System) was coined during this period
- In 1976, P. Chen proposed the Entity-Relationship (ER) model for database design, to focus designers on data use rather than logical table structure
Commercialization, Standards, and the Rise of SQL
- Commercial relational systems boomed with the growth of computer purchasing in the early 1980s
- Mid-1980s: SQL (Structured Query Language) became an intergalactic standard and DB2 became IBM's lead product
- Network/hierarchical models faded, while the IBM PC spurred DB companies like RIM, RBASE 5000, PARADOX, and Watcom SQL
The Internet, Object Databases, and Modern Trends
- Early 1990s: An industry shakeout resulted in fewer companies with complex, expensive products centered on application development tools
- The client-server model became standard and personal productivity tools like Excel/Access emerged
- Object Database Management Systems (ODBMS) began prototyping
- Mid-1990s: The Internet/WWW caused a frenzy for remote access to legacy data, popularizing the client-server approach
Web/Database Integration
- The late 1990s saw investments in Internet companies fueling tools for Web/Internet/DB connectors (e.g., Java Servlets, JDBC) with open-source solutions like Apache and MySQL
- Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP) matured with point-of-sale technology
- Early 21st century: The Internet industry declined, but DB applications grew, integrating PDAs, POS transactions, and vendor consolidation with IBM, Microsoft, and Oracle dominating
Future Trends
- Future trend is the growth of very large database systems, requiring innovative ways to handle and analyze data, including applications in science, national security, and clickstream analysis: Data mining, data warehousing, and data marts are now common techniques
- Mobile database use is growing. The focus would be to standardize SQL successors, possibly overtaken by XML and emerging techniques
- Distributed transaction processing is becoming standard for business planning
Database System Concepts and Architecture
- Data abstraction suppresses data organization and storage details, emphasizing essential features
- Data models provide concepts to describe database structure, data types, relationships, and constraints
- Basic data model operations specify retrievals and updates
Categories of Data Models
- High-level or conceptual data models are are close to user perception
- Low-level or physical data types describe the storage of data in a computer for technical specialists.
- Representational or implementation data models are understandable to end-users but also close to how data is organized in the computer
Conceptual Data Models
- Conceptual data models use entities, attributes, and relationships: An entity is a real-world object
- An attribute is a property of interest of the entity
- A relationship is the relationship among the two or more entities
Schemas, Instances, and Database State
- Database schema describes database and is specified during design with conventions for displaying as diagrams
- Schema diagrams display record type structure without actual data instances; schema constructs are objects like STUDENT or COURSE
- A database state or snapshot is the actual data at a point in time and changes frequently as new data is added, and is known as the current set of occurences or instances in the database
Three-Schema Architecture
- The goal of the three-schema architecture is to separate user applications and the physical database with an internal, conceptual, and external level.
- The internal level has an internal schema & describes physical storage structure using a physical data model
- The conceptual level has a conceptual schema & describes database structure for all users using an implementation conceptual schema on a high-level model
- The external or view level includes external schemas or user views describing database portions for user groups using representative data model
Centralized and Client/Server Architectures
- Centralized architectures used mainframe computers for all system functions via terminals
- As hardware prices declined, users switched from terminals to independent PCs
- A client/server architecture deals with networks of PCs, workstations, and servers in which servers have specialized functionality, being accessed by many client machines
Two-Tier and Three-Tier Architectures
- Client/server architecture is increasingly incorporated into commercial DBMS packages: User interfaces and application programs moved to the client-side
- SQL provided a client and server dividing point
- The query and transaction functionality was SQL-related and remained on the server
- Open Database Connectivity (ODBC) supplies an API for client programs to make calls, processing the queries at server sites and sending results back to the client
- Two-tier architectures divide software components over two systems
- The emergence of the Web led to three-tier architecture, adding an intermediate layer between the client and DB server
Three-Tier Architecture
- Many Web applications use a three-tier architecture with a middle tier that stores business rules
- The middle-tier server improves database protection by checking client credentials before sending database requests
- Clients contain GUIs and some business rule
- Intermediate servers get user requests, process the request and then sends the results back
- Presentation layers display information: Business logic layers handle rules/constraints & data is passed up/down to DBMS
- Bottom layers include data management services with possible split in between the Web Server and the DMBS
Data Modeling With The Entity-Relationship Model
- Conceptual modeling is an important phase in database design so developers can translate a real world business model into technical specifications
- A database application includes a database & programs that uses database queries and updates
- User-friendly graphical user interfaces (GUIs) facilitate end-user access to database through menus or other interface
ER Model Applications
- The ER model is a popular high-level conceptual data model that uses a diagrammatic notation (ER diagrams)
- ER tools are used today by DBAs to make conceptual design and constraint decisions
Usage of Conceptual Data Models
- The first step shown is requirements collection and analysis that interviews prospective users
- This involves documenting their data needs
- The result is concisely written set of users' requirements that specifies the known functional needs of the application
- Next is to create a conceptual schema for the database, using a high-level conceptual data model
- The conceptual schema includes detailed entity, type, relationship, and constraint descriptions, which are easier to understand as they don't include implementation details
The Process of Conceptual Design
- Basic data model operations are used to specify high-level user operations during functional analysis, confirming the conceptual schema meets all requirements.
- Use of commercial DBMS to implement the data model, using relational or object-relational models and transforming from high-level to implementation data
- The result is a database schema in the implementation data model
- Last the physical database design has internal storage structures, indexes, and access paths specified
- Create application programs as transactional high level specifications
Company Database Application Example
- Conceptual schema step-by-step development by introducing modeling concepts: Tracks company employees, departments, and projects
- After the requirements phase, the database designer provided the following description: The company is organized into departments, which have a unique name, unique number, a particular employee who manages the department and a location.
- A department controls a number of projects, each of which has a unique name, a unique number, and a single location
- Store employee names, social security numbers, addresses, salaries, sex, and birthdates, and which department they are assigned to
- Employee's may work on several projects, which are not controlled by the same department
- Track the number of hours an employee works on the project and the supervisor
- Track all insurance dependents by first name, birth date, and relationship to the employee
ER Diagrams
- ER model data depiction: entities, relationships, and attributes
- Explanation as step-by-step process
- ER describes data as entities, relationships, and attributes, first introducing entity and attribute concepts
- Define entity types vs key attributes
- Initial conceptual design uses the COMPANY database, with relationships to be described in the final section
Entities and Attributes
- ER model is a entity with independent existence consisting of either physical or conceptual
- ER model is described by attributes or particular properties
- Each entity has a value for each its attributes, making entity a major part of the database
- Examples of attributes
- simple vs composite
- single value vs multi valued
- and stored value vs derived value
- Introduction of NULL for a null attribute
Attribute Properties
- Composite attributes can be divided into smaller subparts that represent more basic units with independent meanings
- Attributes that are not divisible are simple or atomic with no particular type or need to represent
- Single valued attributes have one value per entity while multi valued attributes can have several values for the same entity
Relationships
-
Stored Vs Derived attributes -Some value attribute is related, with age and birth date -Derived is for the value of age known from value of birthdate from the database
-
NULL Value -Sometimes a particular entity doesn't have a particular value for a attribute -Created a value called NULL, where address can have NULL
Entity Types, Sets, Keys Attributes and Values
- Key point, databases has similar groups
- Employee is an entity type and has certain attributes like employee’s name that are equal across
- Each entity has it’s of unique data
- Key is for unique constrain or entities or entity types value , unique identify
- Type has an attribute whose values are distinct
- Example, name for types
Conceptual Design
- Based on requirements
- Defined several entity types to refine
- DEPARTMENT
- Name
- Number
- Location
- Manager start date
- Project
- Name
- Number
- location
- attributes Name and Number
- EMPLOYEE - NAME - SSN - SEX - ADDRESS , -SALARY
- DEPARTMENT
Relationship Types, Sets, Roles, and Structural Constraints.
- The following relationship type in figure 3.6 contains various types among the various types of data
- Attributes of employee and department have explicit relationships between other entities
- Relationships should represented as relationships
Relationship Types, Sets, and Instances
- A type among the N entities is a set of assosciates or a relationship set among entities
- R is a set of INSTANCES that have 1 or more entities that are in a mathematical setting
- Type represents fact entities that are related in the mini world with employees and departments -Each instant has 1 employee and 1 department
Relationship Degree and Role Names
- The degree is amount of entity types
- Relationship to another degree calls it binary
- Relations with more are called ternary
- Usually types have some constraints -Limit possible cobo
Cardinality, Participation, Contraints
- Cardinality for a a binary sets for many instances that can participate for example it can relate 1 and many
- Participations: Where entities depends if other entities have relationship
- Specification of minimum -There are types or participates total or partial.
Database Design Refinement
- You can refine the relationships by changing the relationships
- Cardio and each are used determine total
- Relationships: MANAGES, WORKS FOR, CONTROLS, SUPOERVISION -Relationships for total employee on total supervisor.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Explore database states, schemas, and the three-schema architecture. Understand how user applications are separated from the physical database. Learn about transforming requests between levels in a DBMS.