The flashcards below were created by user
on FreezingBlue Flashcards.
What are some Advantages of relational databases?
There is a clear separation between the data and the "how" of accessing and manipulating it
What is a relational database?
A database that presents the information in tables with rows and columns that can be linked to other tables based off of what relationships you chose to apply to them.
What is MySQL?
- SQL (Structured Query Language)
- It is a database management system (developed by Oracle) use to add, access, and process data stored in a database.
What is PHPMyAdmin?
- It is a free software tool written in PHP, intended to handle the administration of MySQL over the web.
- Frequently used operations can be performed via the user interface, while you still have the ability to directly execute any SQL statement.
What is JDBC?
Java Database Connectivity
A Java API that enables Java programmers to execute SQL statements allowing the Java programs to interact with and SQL-compliant database.
What is an ORM?
A programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages, creating a "virtual object database" that can be used from within the programming language.
What is the purpose of a database management system?
It organizes your files to give you more control over your data
What is normalization?
The process of organizing the fields and tables of a relational database to minimize redundancy and dependency.
What is a primary key?
It is a field in a table that is unique and does not change.
What is a foreign key?
Is a field in one table that uniquely identifies a row of another table? It is a combination of columns that is used to establish and enforce a link in the data from two tables
What is a one-to-one relationship? Give an example.
A relationship of two items in which one can only belong with the other.
EX: a car model is made by one company
What is a one-to-many relationship? Give an example.
A relationship where one item can have several child records in another table.
EX: a customer can have many orders
What is a many-to-many relationship? Give an example.
When one or more rows in a table are associated with one or more rows in another table
EX: multiple customers can purchase the same or multiple products
What is referential integrity?
Ensures that relationships between tables remain consistent.
EX: one table has a foreign key to another table; you may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table. Also cascading update and delete
What is a transaction?
A unit of work that is treated as "a whole". it has to either happen in full, or not at all. EX: money out of the bank
What does commit mean?
The response is sent for the client to see it / becomes live to everyone
What does rollback mean?
an object previously read, should no longer be used, and is no longer pare of the persistence context. It was erased and not committed.
What is a dangling reference?
They point to memory that is no longer valid and which will be reallocated when there is a new memory request, but the pointers will be used as though they still pointed to the original memory. In Database: book points to author that was deleted, no longer exists
What is a bridge table?
Is the creation of a new table using two primary keys from two separate tables
What types of relationships require a bridge table?
It requires a many to many relationship
What is a validation table?
A static table in the database that stores valid codes and descriptions
EX: NATION table contains a 5 character abbreviation for each nation
What does cascade mean?
If you insert, update or delete an object, related objects are inserted, updated or deleted as well. If you do not use cascade you would have to save both objects independently. If you initially create objects and you do not cascade then you must save each object explicitly.
What is a SQL Inner Join?
selects all rows from both tables as long as there is a match between the columns in both tables.
Explain a SQL Left Join
returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side when there is no match.
Explain a SQL right join
The RIGHT JOIN keyword returns all rows from the right table (table2), with the matching rows in the left table (table1). The result is NULL in the left side when there is no match.
Explain a Full Outer Join
The FULL OUTER JOIN keyword returns all rows from the left table (table1) and from the right table (table2).The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT joins.
What is a Union
combines the result of two or more selection statements
SQL what is a primary key
uniquely identifies each record in a database table, must be UNIQUE
SQL What is a foreign key constraint?
- it is a foreign key in one table points to a primary key in another table
- EX: order Id number