What is a dictionary table in SQL? - mysql

I have to build this retail site, and aparently all the properties info comes from a third party company. Everything looked fine, they sent me a .mdb file with all the tables (which convert to a .sql file), and later I get emailed with data to update those tables.
What confused me was the fact that a few of these tables already have values in them. And when looking at the documentation, it says that I will also get emailed 'dictionary tables'. It says: "These tables contain fixed values in reference to value tables".
I have googled and searched here at stalkoverflow but couldnt find an answer. What I read was something about 'sas' and 'proc sql' which I haven't heard before.
Could someone please explain me (or kindly point me to some understandable documentation) what this tables are (are they in fact tables?), and how can I use them to build my site? I also use Codeigniter, can I use active records on them? Or what would be the correct SQL to access that table? I'm pretty much lost here :(
I use Codeigniter 2.x and Mysql.
Thanks guys, I will be infinetely grateful for your help.

Two guesses:
a data dictionary provides information about tables in a database:
field names, field types, field sizes
stored procedures associated with certain tables
OR
simply a fixed table that provides lookup or validation for a separate updatable table.

Related

Need help starting simple MySQL database using data from Excel

I'm and intern and I've been tasked with something I'm pretty unfamiliar with. My manager has requested I create a simple MySQL database using data from an Excel file(s) and I have no idea where to start. I would normally ask someone here for help but everyone seems to be really busy. Basically, the purpose of the database is to see what different object-groups relate to one another so as to keep things standardized. Trying not to go into detail about things not really relevant.
I was asked to first design a schema for the database and then I would get an update on how to implement it. Would I just start by writing queries to create tables? I'm assuming I would need to convert the Excel files to .csv, how do I read this data and send it to the correct table based on Object Type (an attribute of each object, represented in a column)?
I don't want to ask too much right now, but if someone could help me understand what I need to do to get started I would really appreciate it.
Look at the column headers in your spread sheet.
Decide which columns relate to Objects and which columns relate to Groups
The columns that relate to just Objects will become your field names for the Object table. Give this table an ID field so you can uniquely identify each Object.
The columns that relate to the Groups will become field names for a Group table. Give this table an ID field so you can uniquely identify each Group.
Think about if an Object can be in more than one Group - if so you will probably need an Object-Group table. This table would most likely contain an ObjectID and a GroupID.

MySQL Foreign Key Lookup in Editor

I am flummoxed that no one seems to have ever asked this question, which indicates that the question itself is flawed. But, I don't know how to find out the right question, or answer, other than asking, so here goes:
I'm trying out a couple of tools to connect to MySQL databases and view and edit the data. So far I've tried MySQL Workbench and Database Browser. MySQL Workbench seems to be much more robust and lets you set up foreign keys without having to write any SQL.
The problem, though, is that when inserting and updating data in columns that are foreign keys, I have to manually enter the numeric id of the parent row, and once entered, I have to manually look up which record that number refers to if I want to know. Is there no way to set a display field in the parent table and then be able to choose a value off a dropdown menu when editing the child table? phpMyAdmin does this. I'm perplexed that, not only can't I find a way to achieve this in any non-web-based database tool (I've tried Access before, too), but that no one seems ever to have needed to do it before. Am I completely thinking about this wrong? Do people not use these tools to do this type of work? Is everyone writing their own custom lookup interfaces from scratch in Qbasic? Should I memorize all the ids for my parent rows?
Or are people laughing up their sleeves at this question because it's framed so awkwardly?
SQLYog provides such functionality
https://blog.webyog.com/wp-content/uploads/2011/04/FK-Dropdown1.png

Adding tables via DAO to a database

As a general question which would really help me "connect the dots" with my studies.
I am currently doing exercises working with DAO and Learning how to add tables automatically. Although i have been working with databases for many years, i question, what type of scenerarios would it be vantagious to use this function. When is it necessary to add tables to a database in an automatic way? Up until now, in all my experiences the tables i need have Always been defined from the beginning and I cant think of a situation where I could of benefited from using this function. For example, i use frequently delete queries to help me clear tables and re-populate them, but when would it be necessary to actually "create" a new table"?
Yes, I have seen a scenario where new tables were created 'on the fly' (either via SQL create, or just DAO). With a shared database on a server, the application called for importing Excel data that a particular user was responsible for, so a table was created on the fly. Multiple users, changes in staff, need to keep data independent, etc. we could create their own table (name based on userid) that they had interfaces to do whatever they wanted with their own data. Not a typical scenario, but worked well for this application.

How do I to add multiple directories to an SQL database while sharing the same schema?

A buddy of mine needed help adding multiple directories to an SQL database while sharing the same schema yet have different listings. I've scoured my "MySQL" books and Google, I can't find any definitive information. I was just hoping someone here knew how to do this.
To clarify, there are a total of 12 directories. 11 are to be searched independently of one another and the 12th (which already exists) will be a directory comprised of all 11 directories, all of which will have the same schema.
The goals are to create these unique directories using the existing schema model, and to upload multiple directory entries at a time to the directories.
Does this mean the names of the directory entries have to be unique (ie. Name_1, Name_2, Name_3, etc...?) Or, will it be a matter of duplicating the schema under a different name? Any advise will help.
A directory, in this context, is like a roledex. I mean to have 12 roledexes with each rolodex having unique entries frem eachother. How do you approach this database-wise?
After logging into your PHPMyadmin select or go in to the table you want to duplicate-and-rename, then click on "Operations." There you see a series of boxes with one called "Copy table to (database.table)" You can choose to duplicate structure and data, or structure only. Type the name you want and click go. And your new table with listing will be ready to edit and search!
If I understand what you're asking... I think you want to create a new database for each "directory," as you put it, with the same table definitions in it.
The word "database" in mySQL parlance means the same thing as "schema" in the parlance of some other RDBMS systems. You can't have two sets of data with the same table names in the same database (a/k/a schema). You need a different schema for this.
It's very common to have lots of databases in a single server with precisely the same tables / columns / keys etc. And yes, phpmyadmin can handle this.
The word "directory" is confusing, though. It ordinarily refers to the on-disk data storage used by the mySQL (RDBMS) server program. But I don't think that's what you mean. If you DO mean it, please make sure you are highly skilled at system administration before you try to muck around with the file systems on the mySQL server. It's easy to break stuff. (Ask me how I know how easy it is to break stuff :-) :-)

Where is user profile information stored in the Dotnetnuke database?

Here is the situation I'm in:
I just implemented a DNN site. I already have a huge database table of users. Now when my users come in to register for my DNN site, they're required to put in a first name, last name and DOB. I will then use this information to match their records to the existing user table via a SQL query. The only problem is I can't find "DOB" field anywhere, in any table or for that matter most of the rest of the profile information. Is it even stored in the database? or am I just blind?
The best answer I could find was from a dnn forum which stated
"User profile information is stored in several tables in the database. The 'Users' table is the place to start for basic information. There are several tables that have "profile" in the name that also are important."
I've looked through almost every table in the database, but with no luck...
I'm using DNN 6.0 with SQL Server 2008
I've looked everywhere but can't find it. Any help or guidance from anyone would be much appreciated! Even a paid solution like a pre-built module would work.
Thanks
Look in the ProfilePropertyDefinition table for the PropertyDefinitionId of the dateOfBirth property. Then, with that id, and the id of the user, you can query the UserProfile table to retrieve the value.
There is more at this blog post
http://erikvanballegoij.com/Home/itemid/28/Selecting-profile-properties-the-easy-way