dbms ==> database management system basically comprises of (database + a program to manage it)
to better categorize the database, there are certain types of data model
relational :
there are tables to represent data + the relationships between them, table contain columns, tables are also called relations and columns as attributes.
ER model : contain set of entities( like objects ) and set of relationships among these objects
object oriented : not that much important will deal in later posts :-)
to specify database obviously we need a language : this language comprises of two parts
1) data definition language (DDL) specifies schema
2) data modification language (DML) database queries and updates.
they are basically implemented as different types of statements in one general language like SQL
lets not go into the details of DML for now, and focus on DML
every data has some sort of constraints on like, roll number of students can't be negative , cell numbers can't be zero digit etc
so while specifying database we need some way to specify these contraints as well. this is done in DDL,
some contraints are
1) domain constraints
2) referential integrity
3) assertions
4) authorizations
DDL is an interpreted language and its output is stored in a data dictionary which contains metadata.
now we have some good basics , so lets dive into some detailed topics
? what is database design?
basically database design means that you have to design schema for database
design process : ( from korth )
1) understand the user requirements
2) and decide the data model (quite obvious)
3) using the model, transform user requirements into conceptual schema of database
if model is relational decide tables, columns.
use normalization enter the set of attributes and get the tables as output
or we can use ER model as well .
the widely (particularly for large scale) used data model is the ER model .
ER model has some mapping cardinalities which are the additional rules to be satisfied by the database contents, ( the number of entities to which another entity can be associated )
the concept of normalization : gives us the benefit of auto generated tables with no lesser redundancy but on the cose of extra information required called functional dependencies
two bad things that can go while designing a database is
1) information can get repeated
2) we may get unable to represent certain desired information
definitions
atomicity : all or none
consistency : same everywhere
isolation
durability : persistance even after the system failure
transaction : collection of operations that perform a single logical function.