Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a simple database schema

I'm new to SQL and could use some help in creating a database schema for my program, which manages and installs programs for my home network. Are there any guidelines/tutorials for creating database schemas?

like image 946
RCIX Avatar asked Aug 25 '09 08:08

RCIX


People also ask

How do you design a database schema example?

There are mainly two tools you'd use to create a database schema. The first is an RDBMS, or a relational database management system. Examples of RDBMSs include SQL Server, MySQL, and PostgreSQL. The second and most important tool is SQL (structured query language).

What is database schema with example?

In MySQL, schema is synonymous with database. You can substitute the keyword SCHEMA for DATABASE in MySQL SQL syntax. Some other database products draw a distinction. For example, in the Oracle Database product, a schema represents only a part of a database: the tables and other objects are owned by a single user.

What are the 3 types of database schema?

Schema is of three types: Logical Schema, Physical Schema and view Schema.

How do you create a simple database?

Create a blank databaseOn the File tab, click New, and then click Blank Database. Type a file name in the File Name box. To change the location of the file from the default, click Browse for a location to put your database (next to the File Name box), browse to the new location, and then click OK. Click Create.


1 Answers

Probably the most important concept to understand before you design your schema (you'll thank yourself for it later, trust me! :-) is that of Normalisation. The tutorial at db.grussell.org doesn't look too shabby and will give you a good grounding. In fact, if you click the "Up One Level" link and take a look around, some of the other information might be quite useful as well.

My "top tip" is: Write it down on paper or in notepad, or anything other than a database, before you start writing code. Get a good idea of what you need your schema to be able to do before you set it in stone (And by "set it in stone" I mean, realise that you've written a load of code against the schema that would have to be re-written if you change it to do what you've just realised you now need).

like image 164
Rob Avatar answered Sep 30 '22 12:09

Rob