Department of Computer Science
Database Programming
Course : Advance Database Management System
Instructor: Ahsan Ali
[email protected]How to Learn Database Programming
• Databases are essential to programming.
• This is where all the data related to your application is stored.
• If you’ve built any kind of app, you’ve interacted with a database.
• You as a full-stack developer, back-end, or front-end, have had to
create, update, and delete data through the use of frameworks.
• Full-stack frameworks such as Ruby on Rails have conventions in place
to persist data to a database for you, while front-end frameworks,
such as React, use fetch requests and actions to persist or delete data.
How to Learn Database Programming
• Knowing directly about database programming is useful, regardless of
how you build.
• As programmers, we know there is no magic in code.
• Gaining a full understanding of what we are building makes for more
robust (strong) code, and more stable applications.
What is Database Programming?
• Database programming involves designing and maintaining a database for
an application.
• Best practices include establishing relationships between different data
sets and testing for errors and duplicate records.
• Retrieving instances of data from the database is another key responsibility
in database programming.
• Retrieving, also known as querying, specific data from a database is done
through the SQL programming language.
• SQL (pronounced “sequel”) is short for Structured Query Language and is
how data is created, updated, retrieved and deleted from the database.
What is Database Programming Used For?
• Database programming is used in creating and maintaining an app’s
database.
• This means, storing and updating data to avoid duplicate entries of
records.
• In larger programs with multiple tables of data, drawing relationships
between these tables is also involved.
• All developers interact with a database to some degree.
• Learning database programming can be effective in organizing your
app’s data and keeping the app running efficiently.
• Database programming has a number of use cases including:
What is Database Programming Used For?
• Building a database from scratch. This includes creating all necessary
tables and relationships between tables. Doing so ensures the
organization of the entire database into smaller pieces.
• Creating new records without duplicating. By using SQL to query the
database, we can search for existing instances of data, thus updating
it rather than creating a new instance.
• An example would be a database for your app’s users. A field for a
user may be their address. If that user moves, it will make sense to
simply update the entry with the new address rather than creating a
new record altogether. This keeps the database organized and
reflective of the state of the app.
What is Database Programming Used For?
• Retrieving and deleting records. We’ve talked about how to
appropriately create and update entries.
• We can also retrieve specific data points and display them to the user
by using SQL.
• We can also use SQL to delete records in the case of a user deleting
an account or no longer offering a certain product.
Learning Database Programming
• Learning about database programming is beneficial to your career
development.
• Database programming is essential to learning full-stack or back-end
development.
• Front-end programmers could also benefit from understanding how
the data they are trying to access is stored.
• Learning database programming depends your understanding of the
app building process.
• Knowing what goes into creating and maintaining a database
strengthens your programming skills and builds stable, scalable apps.
How Long Does It Take to Learn Database
Programming
• Learning the basics of database programming can be done in a couple
of days. But if you want to go deeper and become a master at
database programming, it could take weeks. Database programming
is multi-faceted, but most developers find mastering the basics deeply
enhances their programming.
• How to Learn Database Programming: Step-By-Step
• The first thing to do before beginning to program a database is learn
about database conventions. Knowing what a database is, how it can
be organized, and its role in storing data helps you. Consider the steps
below before embarking on your database programming journey.
How to Learn Database Programming: Step-By-Step
• Know what a database is and how it’s used. Having some familiarity
of databases and their role in manipulating data is useful when
beginning to learn about programming.
• This database schema guide covers the organization of databases in
depth.
• Be familiar with SQL ,This query language is the standard for
querying databases.
• Knowing how SQL queries a database is essential to debugging back-
end related errors in your app.