database management Flashcards
how is data stored?
data is stored in files that contains records, and in turn contain fields
what is a database
is a collection of data or information which is stored in a logical and structured way
other names of a database software?
-Database manager
-Database management system (DBMS
what is database software used for?
store, organise and manipulate data
what does data manipulation include
-adding new data
-deleting old data (which is not necessary to store any longer)
-updating data/information
why do we need a database
-To keep records of customers, staffs, products, etc.
-To develop reports
-To perform research
For longitudinal tracking
examples of non computerised database
dictionary, telephone directory, address book
(printed)
examples of computerised database
Netflix, phone contacts, game library, Facebook
electronic
how is Netflix a database
- it stores movies/films in a datbase
-easily searched and sorted
-can search by genre, rating, age
-can sort by release date, takings
how is your phone contacts a database
- all info about contacts are stored in a database on the phone
- can store pictures, names, numbers, emails
easily searched and sorted
some common areas of using database applications
banking (transactions)
airlines (reservations/schedules)
universities(registration, grades)
popular database software
oracle, microsoft SQL, mySQL, microsoft access
name 3 data models
relational mode, hierarchal model, object-oriented model
what is the relational database model
A data store designed in an organised way, making it easier to search for the information you need.
entities and relationships are stored in tables
what is a record in relational database model?
A Relational Database is a collection of tables that are related to one another based on a common field
Each line or row in a table is called a Record
what is the primary key in relational database model?
Each record should have a field which is unique in every record and this field is called Primary Key
such as id number of student
what is a foreign key in relational database model
The Primary Key of one entity is a Foreign Key in another entity
what are the fields of an entity in a relational database model
The fields of an Entity are column headings in a table and each field has a particular data type such as customer_Id is a text type data and order-date is a date type data
what is a query in a relational database model
If we want to find some particular records from a number of records, we need to run a query
what is a data model?
A data model attempts to represent the data requirements of the organisation
-describing data
-relationships between data
-constraints on the data used by an organisation
what is the purpose of a data model?
The purpose of data model is to represent data and to make sure the data is understandable. If it does this, then it can be used to design a database.
One of data model is known as Relational model
what are the structural components of relational models
field (attribute) - a named column of a relation
Record (Tuple) - A row of a relation
file (relation) - A table with columns and rows
Domain - Range of allowable values for one or more attributes
relational database - A collection of tables that are related to one another based on a common field
relational model in terms of university students
some info uni keeps of a student : id number, name, address, number, gender, nationality, DOB
each of these is 1 piece of information, this is called a field
all of the fields put together to make a record (all data about 1 person in a table)
all records are stored together in a file
a file consists of a collection of particular records
why is the domain concept important
The domain concept is important because it allows us to define the meaning and source of values that attributes can hold.
As a result, more information is available to the system and can reject operations that do not make sense
a field or a collection of fields is called the ______ ____ to provide uniqueness
primary key
when does primary key become foreign key
When the primary key of one table is represented in a second table to form a relationship, it is called a foreign key
name 7 properties of a relational table
Table name is distinct from all other table names in the database
Each cell of a table contains one single value
Each column has a distinct name
Values of a column are of the same domain
Each record is distinct
Order of columns (fields) has no significance
Order of records has no significance
what does DBMS mean
database management system
what is a DBMS
Consists of programs that control the database structure and access to the data
Information changes only have to be updated once
what are the 4 functions of a DBMS
-Data storage, retrieval and update
-Concurrency control services
-Recovery services
-Security
what does concurrency control services mean in DBMS
Multiple users make updates to the database simultaneously
ensures that updates are made correctly and at the end the result is accurate
important data could be lost or inaccurately stored if there is no intervention
what is security as a function of a DBMS
-Protection of DB against unauthorised access
-users may only be access certain pieces of the database, and be denied access to areas that does not relate to their specific needs
what are recovery services in relation to DBMS
DBMS provides ways to recover a database so that data is not permanently lost