Lecture 0: Introduction to Database Flashcards

1
Q

What is a Metadata

A

metadata are data that provides information about other data. They can include relationships, permissions and the structure of the tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a DBMS?

A

Database Management System. This is a software that allows users to control the database through either:

  1. Creating
  2. Modifying
  3. Maintaining etc..
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a database application program?

A

It is a software application that interacts with a DB by using the correct commands . E.g. MySQL workbench, Command Line Interface, any 3rd parties

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a database server?

A

it is a dedicated computer system which runs the DBMS and contains the database and underlying data? This may or may not be a distributed system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DDL?

A

Data definition language. Specifies data types and structures. Specifies the database schema

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DML?

A

data manipulation language. allows insertion, deletions, retrieval. used to both read and update the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SQL?

A

structured query language. it is the combination of ddl and dml. it is a high level programming language with rules on what to say in the language, and ensuring you understand how the computer will interpret what you say

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the steps on building an entity relationship Model (the conceptual design) ?

A
  1. Identify the entity types
  2. Identify the relationship types:
    - name
    - direction
    - multiplicity
  3. Identify the attributes
  4. State the Primary Keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a logical DB design?

A

A logical design, is when the entity relationship model turns into the relation model (a table that defines how data is related). Also includes the foreign keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens to the DB from logical to Physical design?

A

The logical design (relational model) gets translated into a physical implementation.

The physical implementation allows data to be stored and queried

Physical implementation is created using SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe what a database schema is.

A

The overall description of a databases structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many types of schemas are there?

A
  1. The DBMS is responsible for mapping between these schemas
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How many types of data independence are there?

A
  1. Logical and Physical
    Logical is the immunity between external and conceptual.

Physical refers to the immunity of the conceptual and internal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is a data model?

A

Is a collection of concepts that can be used to describe a set of data
the operations to manipulate the data
and a set of integrity constraints for the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How many data models are there?

A

3.
conceptual data model
logical data model
physical data model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is another name of conceptual data model?

A

object based data model.

Conceptual data models use objects such as entities, attributes and relationships to describe a use case

17
Q

What is a logical data model?

A

represents a database as a number of fixed-format record. Is constructed based on the conceptual model.

18
Q

What is another name for logical data model?

A

record based models

19
Q

Give examples of a logical data model

A

relational
network
hierarchical

20
Q

What is the client-server architecture?

A

there is a client that requires a resource and a server that provides that resource. in this approach the server handles the database functionality

21
Q

Explain three-tier model (n-tiers).

A

user interface (presentation), software functionality (business logic) and database, are distributed over different machines that together make a usable solution

22
Q

What is an index?

A

indexes allow the database application to find data fast, without reading the whole table.

23
Q

What are the disadvantages of using indexes

A

They take take up disk space and have to be updated each time the data is modified.

24
Q

What is a view?

A

a view is a virtual table based on the result-set of an SQL query.

Usually you can save a query in the database, so this is a good way to do it if you frequently run the same query

25
Q

What does a view contain

A

contains row and columns, just like a real table. The fields in a view are fields from one or more real tables in the database. You can add SQL functions, WHERE and JOIN statements to a view and present the data as if the data were coming from one single table.

26
Q

Where do we perform views?

A

We add views for queries that would need to be performed often.

E.g. Salon database daily appointments might need to be printed daily, so we would create the following view

27
Q

What two types of database security does relational DBMS provide?

A
  1. system Security

2. data security

28
Q

explain system security

A

covers access and use of the database at the system level. such as user name and password

29
Q

explain data security

A

covers access and use of database objects (such as relations and views) and the actions that users can have on the objects

30
Q

How do you configure these security settings?

A

through mySQL workbench.

31
Q

how do you export data ?

A

mysqldump -u root -p DATABASE NAME > FILE LOCATION\DATABASE NAME.sql