Components of a Database System
Users
- The reason that the database exists.
- Enter data, perform queries, ...
Application
- A high level program, probably produced in house
- Contains customized business knowledge
DBMS
- Usually a professional software package.
- Specialized knowledge on how to organize, store and search data
Database
- The collection of data, tables, relations ...
But SQL is a fifth element which shows up at various stages.
The Application Program
- Basic Functions
- Create and process forms.
- The forms used by the business
- Order form, restock form, ....
- All the paperwork
- In some cases, the application becomes the forms.
- These are unique to each business
- These have nothing to do with how the data is organized or stored.
- Process User Queries
- Ask the DBMS for data
- This is probably done in SQL, but most users don't know SQL
- So the application is required to translate user input into SQL
- And present the results back to the user.
- Create and process reports
- Companies live on reports of the status of the company
- What should be produced today?
- What should be ordered?
- How many units were sold last week?
- These are all examples of regular reports that need to be generated.
- They are all customized to the individual business
- They all require data from the database
- Execute application logic
- When does the company need to reorder parts?
- When should a production line be shutdown?
- Should a student be permitted to sign up for 21 credits?
- These are all examples of application logic
- When data is entered into the database, or an attempt is made to enter data, some other action may be required.
- This again, is all local business logic
- Control the application.
- This is related to the previous set.
- Who has access to what.
- For example, not everyone should be able to read salaries
- Control multiple dbms operations
- For example, require that either an entire order be entered or nothing.
DBMS
- Create database
- Create tables in a database
- Create supporting structures (index, functions, views)
- These three are all base database creation functions.
- Modify database data (insert, delete, update)
- Read database data
- Maintain database structures
- These are all associated with storing and retrieving data from the database.
- Enforce rules
- referential integrity constraints.
- Prevent good data from becoming corrupt.
- Control concurrency
- An OS related task, make sure that some sense of data manipulation order is maintained.
- Readers/Writers problem
- Plus other OS like things
- Security
- Disk usage
- Caching
- Backup and Recovery
Database
- Databases have integrated tables.
- The table contains the data
- But also the relations between the data.
- Databases are self-describing
- They contain a description of how the table is built
- And a description of the data in the table.
- Metadata - data about data.
- This column is an integer.
- There is also information on users, permissions, ...