Chapter 3 Flashcards
Definition of Database
A database is an organized collection of structured information, or data, typically stored electronically in a computer system
What controls a database
A database is usually controlled by a database management system (DBMS), such as Microsoft Access, MySQL, and Oracle.
What does a database contain
A database also contains metadata
What are spreadsheets
Spreadsheets were originally designed for one user, and their characteristics reflect that. They’re great for a single user or small number of users who don’t need to do a lot of incredibly complicated data manipulation.
What are databases designed for
Databases, on the other hand, are designed to hold much larger collections of organized information—massive amounts, sometimes. Databases allow multiple users at the same time to quickly and securely access and query the data using highly complex logic and language.
What is metadata
Metadata is data about data. It means it is a description and context of the data. It helps to organize, find and understand data.
What is rational database
Relational databases stores and provide access not only data but also metadata in a structure called data dictionary or system catalog. And holds information of
- Tables
- Columns
- Data types
- Constraints
- Table relationships
What is a record
Contains specific data, like information about a particular employee or a product.
What is a field
Contains data about one aspect of the table subject, such as first name or e-mail address.
What is a field value
Each record has a field value. For example, Contoso, Ltd. or someone@example.com.
What is primary key
A primary key is a special relational database table column (or combination of columns) designated to uniquely identify each table record. It is used as a unique identifier to quickly parse data within the table. A table cannot have more than one primary key.
Main features of primary key
- It must contain a unique value for each row of data
- It cannot contain null (empty) values
- Every row must have a primary key value
Common database data types
• Integer (INT)
A whole number that can have a positive, negative or zero value. It cannot be a fraction nor can have decimal places
• Floating Point Number (FLOAT) A number that contains decimals.
• Character (CHAR)
Refers to any number, letter, space, or symbol that can be entered in a computer
• String (STRING)
Used to represent text. It is composed of a one or multiple characters
• Date, Time and Timestamp
These data types are used to work with data containing dates and times.
Common practices
- Age is not stored because it may be changed every second. Date of birth should be stored instead.
- Phone number is stored as Strings instead of integers, otherwise, it will ruin the formatting, remove preceding 0s (such as 012-12345612123456) and other undesirable things
Data hierarchy
Database > table > record > field