Unit 1- Understanding Database Systems Flashcards
What’s a database management system (DBMS)?
This is the
software that manages and controls access to the
database.
What’s a database?
A database is a collection of related data.
What’s a Character?
Collection of related bits (8-bits - byte)
What’s a – Fields (columns):?
single category of data to be
stored in a database
What’re a – Records (rows/tuples):
collection of related
fields in a database
What’s a table?
collection of related records
What’s a file?
a group of related records
What’s a primary key?
A primary key is a constraint in a table which uniquely
identifies each row record in a database
Characteristics of primary keys?
- There can be only one primary key in a table.
- Null or duplicate values are not allowed for the primary
key column - A primary key column must contain unique values
Characteristics of primary keys?
- There can be only one primary key in a table.
- Null or duplicate values are not allowed for the primary
key column - A primary key column must contain unique values
What’s a foreign key?
Foreign keys are the field of the table used to point to the
primary key of another table.
Characteristics of foreign keys
- Using a foreign key we can identify records from multiple
tables. - It accepts duplicate values as well as null values.
- The purpose of foreign keys is to maintain data integrity and
allow navigation between two different instances of an entity. - Foreign key also helps you to reduce data redundancy.
whats a candidate key?
A candidate key is a set of one or multiple columns in a
database table.
Characteristics of candidate keys
- It can identify a record uniquely just like a primary key.
- The Primary Key of a table is selected from one of the
candidate keys. - So, candidate keys have the same properties as the primary
keys.
– Candidate Key is a super key with no repeated attributes. - There can be more than one candidate keys in a table.
What’s a secondary key?
A secondary key shows the secondary value that is
unique for each record
Characteristics of secondary key
- In the event that a primary key is not enough to
distinguish the record, a secondary key can be used
to identify the record - It is also termed as Alternate Key
What’s a composite key?
Composite Key is a combination of two or more columns
that uniquely identify rows in a table.
Characteristics of composite key
The attributes in the set may not be unique when
considered separately.
* However, when taken all together, they will ensure
uniqueness.
– The combination of columns guarantees uniqueness,
though individual uniqueness is not guaranteed.
Whats a super key?
A super key is a group of single or multiple keys which
identifies rows in a table.
– Super Key is the set of all the keys which help to identify rows in a
table uniquely
Characteristics of Super key
- This means that all those columns of a table than capable of
identifying the other columns of that table uniquely will all
be considered super keys. - A Super key may have additional attributes not needed for
unique identification. - A super key is a superset of a candidate key
Whats An index key
An index key is a column, an ordered collection of columns, or an
expression on which you define an index.
What is Structural dependence?
This exists when changes in the database
structure affect DBMS ability to access data
What is Structural independence ?
exists when changes in the
database structure do not affect DBMS ability to
access data
What is * Data dependence ?
- Data dependence is a function of the data storage
characteristics, rather than of the file structure
What’s Data independence
Data independence exists when it is possible to make
changes in the data storage characteristics without
affecting the application program’s ability to access
the data.
What is a File-based system:
– A collection of application programs that perform
services for the end-users, such as the production of
reports.
File-based systems were an early attempt to computerize
the manual filing system
list some File-oriented Approach
Disadvantages
- Data redundancy: There will be duplicates, as the files are created
independently.
– This increases maintenance costs
– And also leads to data inconsistency, due to duplicates and/or similar data stored in
different formats. - Separation and isolation of data: When data is isolated in separate files, it is
more difficult to access data that should be available. - Data dependence to the physical format (the files themselves)
- Lack of flexibility: This means we are very limited on what we can do with our
data:
– Limited information retrieval options
– Can only use pre-programmed reports - Incompatible file formats: Because the structure of files is embedded in the
application programs, the structures are dependent on the application
programming language
*What is the Database Approach?
- Database Approach
– Shared collection of logically related data which
can be shared among application
list 5 advantages of the DB APPROACH
Reduced Data Redundancy – Most data items are stored in only one file, which greatly
reduces duplicate data.
2. Improved Data Integrity – When users modify data in the database, they make changes
to one file instead of multiple files. Thus, the database approach increases the data’s
integrity by reducing the possibility of introducing inconsistencies.
3. Shared Data – The data in a database environment belongs to and is shared, usually
over a network, by the entire organization. Organizations that use databases typically
have security settings to define who can access, add, modify, and delete the data in a
database.
4. Easier Access – The database approach allows nontechnical users to access and maintain
data, providing they have the necessary privileges.
5. Reduced Development Time
LIST 3 Differences BETWEEN File based system AND Database system
- The data and program are inter- dependent IN THE FILE APPROACH WHILE IN DB The data and program are independent of each other.
- File-based systems caused data redundancy While Database system control data redundancy.
- File-based systems caused data inconsistency HOWEVER In database systems data is always consistent. Because data
appeared only once.
HOW DOES Data Support Business
Decisions?
A strong data strategy can help businesses stay one
step ahead of competitors, helping tap into niche
markets and predict trends.
ALSO
Effective decision making, whether it’s around
company growth, hiring practices, sales or marketing
campaigns.
– File retrieval and maintenance?
A DBMS provides several tools that allow users and programs to retrieve and maintain data in the database. Requests for information from a database are made in the form of a query.
data manipulation?
The act of changing or modifying data to make it more understandable and structured is known as data manipulation.
● Data manipulation provides organizations with many advantages, such as consistent data, project data, and more in-depth analysis.
Query language?
This used to retrieve information from a database.
They provide a means of retrieving records or parts of records and performing various calculations before displaying the results.
Forms?
-A form is a window or screen that contains numerous fields to enter data, each with a field label to make it more user friendly than generating queries.
- Reports??
A report is a database object that comes in handy when you want to present the information in your database for any of the following uses:
Display or distribute a summary of data. Archive snapshots of the data. Provide details about individual records.
- Data security???
Data security refers to the protective measures employed to secure data against unapproved access and to preserve data confidentiality, integrity, and availability.
Backup DBMS????
A backup is a copy of data that protects against unexpected data loss and application errors, allowing you to make it available again if needed.
- Recovery??????
Recovery techniques in DBMS are used to recover the data when the new state of the data is lost or the entire data in the system is lost.
Logs are used to keep a record of the actions in a database and these logs are used to recover the data to the database.
WHAT ARE THE Components of a DBMS?
● DDL
● DML
● Query Language-
● Report Generator
DDL- The Data Definition Level ??
The Data Definition Level (DDL) is used to define the contents and structure of a database, which can be viewed at the logical, conceptual, or physical levels.
● DML?
● DML- The DML provides procedural commands for data manipulation, such as Delete, Sort, Insert, Select, Display, Add, etc.
Data Manipulation Language or DML is a subset of operations used to insert, delete, and update data in a database.
A DML is often a sublanguage of a more extensive language like SQL; DML comprises some of the operators in the language●
● Query Language-??
● Query Language-Query language is a user-oriented language that allows users to make ad-hoc queries from a database using simple words from a natural language.
It is similar to DML, but offers more commands for retrieval of information. SQL is a set of standard commands that allow users to make any query from a data-base using powerful commands like SELECT, PROJECT and JOIN.
List all the Types of database models:
– Hierarchical Model
– Network Model
– Relational Model
– Object-oriented Model
– Object- relational Model
– Multi-dimensional Model
– NOSQL
- Hierarchical model ???????
- Hierarchical model organizes data into a tree-like-structure,
with a single root, to which all the other data is linked.
- Hierarchical model ???????
- Hierarchical model organizes data into a tree-like-structure,
with a single root, to which all the other data is linked.
Hierarchical model efficiently
describes many real-world
relationships like index of a book,
recipes etc.
Network Model ??????
Network Model is an extension of the Hierarchical model
* In this model data is organized more like a graph, and are
allowed to have more than one parent node.
Relational model??
In relational model, data is organized in twodimensional tables and the relationship is maintained by
storing a common field.
Object oriented data model??
- Object oriented data model is based upon real world
situations
– These situations are represented as objects, with
different attributes
– All these object have multiple relationships
between them
Object oriented data model??
- Object oriented data model is based upon real world
situations
– These situations are represented as objects, with
different attributes
– All these object have multiple relationships
between them
Objects?
The real world entities and situations are represented as
objects
ATTRIBUTES?
Every object has certain characteristics.
These are represented using Attributes. The behaviour of the
objects is represented using Methods
- Class?
.
Similar attributes and methods are grouped together using a
class. An object can be called as an instance of the class.
- Inheritance??
A new class can be derived from the original class.
The derived class contains attributes and methods of the original
class as well as its own
An Object relational model (HYBRID)
An Object relational model is a combination of a Object oriented
model and a Relational model
* This means that when developing these databases, you can include
methods and data types.
Multidimensional model ?
Multidimensional model is defined by dimensions and facts
– The dimensions are the perspectives or entities concerning
which an organization keeps records