473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Basics

Hello all,
This might sound so rudimentary nobody pays any attention to it, but in all
the manuals I have scoured in the last week - trying to understand the
fundamentals of My SQL - it has never been discussed - and I need to know
the following:-
(1) "What is the structure of a database" (What is the directory tree like
on the server) -
(2)"What is the relationship to a "table" to the data contained in the
database.?:
(3)" Can a database support many "Tables" or are the tables data specific
like "user_file" containing records = "User Screen Name, User E-mail, User
Join date, etc" and can a data value be inserted into the database that is
derived from a previous field( user join date + 6 months)
(4) about 25 years ago I dabbled in a database from Campbell Systems for
the Spectrum home computer where a report was a selective print out of
certain data fields - what is that analogous to in today's terminology?
I am sure that when I understand these fundamental points I shall get on
like a house on fire.
Someone dial 911!
Jul 23 '05 #1
2 1324
Bodger (no****@spamcop.net) wrote:
: Hello all,
: This might sound so rudimentary nobody pays any attention to it, but in all
: the manuals I have scoured in the last week - trying to understand the
: fundamentals of My SQL - it has never been discussed - and I need to know
: the following:-
: (1) "What is the structure of a database" (What is the directory tree like
: on the server) -

I suspect this is documented in the reference manuals somewhere, mysql has
lots of documentation online at their site.

On my system, creating a database appears to create a directory in
/var/lib/mysql. The directory name is the database name. Each table
appears to create several files within that direcotry, with a name based
on the table name.

HOWEVER, I never ever normally look at these files. I didn't even
remember where they where excep by looking around. Mysql has programs
that maintain the data, so you don't ever need to know about the files
except for your backups (and even then, mysql has commands you can use for
doing database specific backups).
: (2)"What is the relationship to a "table" to the data contained in the
: database.?:

The rows (i.e. records) of data are stored in tables. (The tables, are
stored in the files mentioned above).
: (3)" Can a database support many "Tables" or are the tables data specific
: like "user_file" containing records = "User Screen Name, User E-mail, User
: Join date, etc" and can a data value be inserted into the database that is
: derived from a previous field( user join date + 6 months)

-- Can a database support many "Tables", etc, etc

Yes, that is the whole point.
: (4) about 25 years ago I dabbled in a database from Campbell Systems for
: the Spectrum home computer where a report was a selective print out of
: certain data fields - what is that analogous to in today's terminology?

Use the mysql program to login to a specific database.

Then use the SELECT statement to choose the data you want to see from
within the tables that contain the data.
--

This space not for rent.
Jul 23 '05 #2
Bodger wrote:
Hello all,
This might sound so rudimentary nobody pays any attention to it, but in all
the manuals I have scoured in the last week - trying to understand the
fundamentals of My SQL - it has never been discussed - and I need to know
the following:-
(1) "What is the structure of a database" (What is the directory tree like
on the server) -
MySQL supports several storage types, the most commonly used are MyISAM
and InnoDB.

MyISAM stores databases under <datadir>/<database>/. For instance, if
your datadir is C:\Program Files\MySQL\MySQL Server 4.1\data, and your
database name is "accounts", then you'll see a subdirectory called
accounts below that data directory. In the accounts directory, for each
table, there are three files. <tablename>.frm stores the structure of
the table. <tablename>.MYD stores the data. <tablename>.MYI stores the
index structures.

InnoDB is different. By default, all table structures, data, and
indexes are collected together in one file called "ibdata1" in the data
dir. Multiple databases, each of which can consist of multiple tables,
all share this file. That's the default configuration; there are
options for storing InnoDB tables in individual files.

But this is usually academic, because as another poster points out, the
database management software takes care of these details of storage for you.
(2)"What is the relationship to a "table" to the data contained in the
database.?:
A table belongs to one database. A table stores a set of records
(rows). All records in a given table share the same set of fields
(columns). I'm not sure if this answers your question.
(3)" Can a database support many "Tables" or are the tables data specific
like "user_file" containing records = "User Screen Name, User E-mail, User
Join date, etc" and
Each table has a set of fields, and all records in that table must have
those fields. But a database can contain many tables, each with their
own distinct set of fields.

You seem to be using the term "record", but the conventional term is
"field" for what you're describing. A record is a row of values, one
value for each field in the table.
can a data value be inserted into the database that is
derived from a previous field( user join date + 6 months)
Certainly. There are many ways to do it, just as there are usually many
ways to do a given task in any programming language. The best method
depends on the situation, like who's doing the work, how often does it
need to be done, how many data are being inserted, etc.
(4) about 25 years ago I dabbled in a database from Campbell Systems for
the Spectrum home computer where a report was a selective print out of
certain data fields - what is that analogous to in today's terminology?


Sure. There are many fancy report-generation tools out there, but
basically they all do that task in common: based on some criteria and
choices that you give it, reports are selections from one or more
tables, related and calculated in various ways.

You might want to get an introductory book on SQL and database design.
It will be a lot quicker than waiting for newsgroup people to answer all
your questions. :-) "SQL for Dummies" is a pretty good choice (I'm not
trying to be condescending--it's actually a good book for introductory
concepts).

Regards,
Bill K.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: enki | last post by:
I have been learning perl and C++, and I have been looking into Java. I know very little about the language, I have found some realy bad books that realy served to confues me and I have to find...
0
by: James Messick | last post by:
I'm just getting started with MySQL. Got my first db created and can run SQL against it in the phpAdmin program. Is there a tutorial online somewhere that shows me the basics of accessing it from a...
2
by: Kurien Baker Fenn | last post by:
I would like to show the progress of an application using the progress bar in visual basics using the timer.Please help me. Thanks in advance.
1
by: manish | last post by:
Hi, I am a fresher in the programming field i.e although I have done programming at the basic level but at professional level I am very new and I am facing many problems. These probllems are...
1
by: ThunderMusic | last post by:
Hi, I need to send some data from my app to a remote server. So, after some searches, I found the best way would be to use web services (unless you can suggest me other ways). The data sent will...
14
by: chitu | last post by:
Hi pals, Hope u all of r intersted in C programming.Let start from d basics.
5
by: Jyoti Khalap | last post by:
HI Can Anyone help me out with my problem its very urgent I want to import text file to my visual basics application because everytime its a new text file depending on that text file i want to...
3
Mague
by: Mague | last post by:
Hey, I need help to some how open a exe file with Microsoft Visual basics. You mite think im trying to steal someone elses project but im not i wont to no how they did it and upgrade it if...
0
by: babu8880 | last post by:
www.convensysglobal.com/elearn You can login and attend courses and similar resources ask your doubts from experienced engineers in iphone and Objective C Domain You can attend live classes...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.